App.
app.workflow(...)
| Argument | Meaning |
|---|---|
name | Sidebar label and workflow name |
scope | "user", "owner", or "app" |
icon | Sidebar icon name |
description | Short description shown in the workflow launcher |
Workflow object registers handlers.
@workflow.ui()
Registers an optional launcher UI. The function must return cpsl.ui.WorkflowShell.
@workflow.start()
Registers the handler called when a workflow run starts.
@workflow.action(name)
Registers a named structured action.
@workflow.message()
Registers the freeform chat handler for an active workflow session.
WorkflowInput
WorkflowInput wraps submitted launcher or action data.
Launcher widgets
Workflow launcher UIs use the samecpsl.ui namespace.
Common workflow widgets:
| Widget | Purpose |
|---|---|
WorkflowShell(title, children=...) | Root workflow launcher |
FormSection(label, children=...) | Labelled form section |
TextInput(...) | Text input |
NumberInput(...) | Number input |
Select(...) | Select input |
FileInput(...) | File upload input |
ActionBar(...) | Submit/action controls |
SubmitButton(...) | Submit to @workflow.start() or a named action |
RunStatus(...) | Current run state |
RunList(...) | List of workflow runs |