approval.request.collect-and-expire ​
Create an approval request, notify approvers, collect decision events, and expire the request when timeout elapses.
Create an approval request, notify approvers, collect decision events, and expire the request when timeout elapses.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Dag |
| Library | App-slack |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
workflow_run_id | string | No | — | DAG-stamped parent run id. |
organization_uuid | uuid | Yes | — | Organization UUID for tenant isolation. |
actor | string | No | — | User or service actor initiating the workflow. |
idempotency_key | string | No | — | Caller-supplied idempotency key for safe retries. |
dry_run | boolean | No | — | Validate and plan without mutating external resources. |
subject | string | Yes | — | Approval subject. |
approvers | list | Yes | — | Approvers or approval channels. |
policy | json | No | — | Approval policy. |
timeout_seconds | integer | No | — | Approval timeout. |
notification_channels | list | No | — | Notification channels. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | No | — | Organization uuid. |
workflow_run_uuid | uuid | No | — | Workflow run uuid. |
status | string | No | — | Status. |
summary | json | No | — | Summary. |
resource_refs | json | No | — | Resource refs. |
warnings | list | No | — | Warnings. |
completed_at | string | No | — | Completed at. |
compensation_trigger | string | No | — | Compensation trigger. |
compensation_results | json | No | — | Compensation results. |
identity_user_query | json | No | — | Output state_data from DAG step identity_user_query. |
slack_channel_resolve | json | No | — | Output state_data from DAG step slack_channel_resolve. |
slack_approval_request | json | No | — | Output state_data from DAG step slack_approval_request. |
slack_interaction_dispatch | json | No | — | Output state_data from DAG step slack_interaction_dispatch. |
slack_message_send | json | No | — | Output state_data from DAG step slack_message_send. |
failure_reason | string | No | — | Failure reason. |
failed_step | json | No | — | Failed step. |
failed_layer | json | No | — | Failed layer. |
failed_at_state | string | No | — | Failed at state. |
error | string | No | — | Error. |
error_type | string | No | — | Error type. |
failed_at | string | No | — | Failed at. |
DAG Layers ​
| # | Layer | Steps | Compensation |
|---|---|---|---|
| 1 | 01_identity_user_query | identity.user.query | — |
| 2 | 02_slack_channel_resolve | slack.channel.resolve | — |
| 3 | 03_slack_approval_request | slack.approval.request | — |
| 4 | 04_slack_interaction_dispatch | slack.interaction.dispatch | — |
| 5 | 05_slack_message_send | slack.message.send | — |
Execution Flow ​
Sub-workflows ​
| Sub-workflow | Step name |
|---|---|
identity.user.query | identity_user_query |
slack.channel.resolve | slack_channel_resolve |
slack.approval.request | slack_approval_request |
slack.interaction.dispatch | slack_interaction_dispatch |
slack.message.send | slack_message_send |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "approval.request.collect-and-expire",
"initial_data": {
"organization_uuid": "value",
"subject": "value",
"approvers": "value"
}
}