Apps in workflows
How apps and workflows meet today. A task can carry an app that collects its output, and the sommatic.app.handoff node ends a run by handing its result to an app through a task.
A workflow prepares the case; an app is where a person finishes it. Today they meet through tasks: the task is the durable link between a run and a person, and the app is the screen the person uses to resolve it.
A task that opens an app
A task can name the app that collects its output in execution:
| Field | What it is |
|---|---|
app_slug | The app to open. Without it, the task shows the form generated from required_output. |
launch_mode | The mode the app opens in. |
input_payload | Extra data for the app. |
app_session_id | Filled at runtime when the app session opens. |
{
"title": "Review the extracted invoice",
"type": { "id": 12, "name": "review", "title": "Review" },
"priority": { "id": 3, "name": "high", "title": "High" },
"required_output": {
"schema": { "type": "object", "required": ["decision"], "properties": { "decision": { "type": "string" } } }
},
"execution": {
"app_slug": "<app-slug>",
"launch_mode": "task",
"input_payload": { "invoice_id": "<invoice-id>" }
}
}Create it with POST /work-management/task/. In the portal, the task shows Open App. The app opens with an input
that carries task_id, the task itself, the fields of the task payload and the input_payload. When the app calls
sdk.submitOutput(), the output becomes the task’s outputs: a decision of rejected rejects the task, any other
output completes it, after the output validation.
The human.task.create node does not set execution today. Create app-bound tasks through the API.
Hand a run’s result to an app
sommatic.app.handoff is a terminal node: the run ends and delivers its result to
an app.
{
"target": {
"app_slug": "<app-slug>",
"route": "/review",
"launch_mode": "command-center"
},
"input_mapping": {
"case_id": "{{ $json.case_id }}",
"summary": "{{ $('Summarize').item.json.summary }}"
},
"organization_id": "<organization-id>",
"assignee": "<user-identity>",
"task_title": "Review the prepared case"
}| Field | Required | Default |
|---|---|---|
target.app_slug | Yes | |
target.route | No | / |
target.launch_mode | No | command-center |
input_mapping | No | {}. Expressions are resolved on the server. |
organization_id, assignee, task_title | Yes | |
task_type, task_priority | No | Review, medium. |
What it does:
- It resolves the open descriptor on the server:
{ app_slug, route_path, input_payload, launch_mode }. - It creates a task assigned to
assignee, which carries the descriptor. The task is durable: it waits in the person’s inbox even if they are offline when the run ends. - It leaves through
outwithapp_handoff_descriptor,task_idandtask_title, and the run’s result keeps the descriptor. When the run was started from the Command Center, the app opens there as soon as the run ends.
The run does not resume after the handoff. Whatever the person does in the app happens outside that run.