Workflows
State-machine orchestration on top of Infra Jobs. Workflows turn individual jobs into resumable DAGs with dependency tracking, catch steps, and explicit execution state.
depends_oncatchresumeCreate Workflow Blueprint
Define a workflow DAG on top of Infra Jobs. payload_template supports {{input.*}}, {{steps., {{execution.id}}, and {{failure.*}} placeholders. Workflow steps may use immediate, delayed, queue, or pull jobs.
curl -X POST https://api.saasignal.saastemly.com/infra/workflows/blueprints \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"name":"example","steps":[]}'
{ "status": "ok" }
const blueprint = await ss.infra.workflows.createBlueprint({
name: 'order-fulfillment',
steps: [
{
id: 'charge',
job_trigger: { trigger: { type: 'queue', queue: 'payments' } },
payload_template: { order_id: '{{input.order_id}}' },
},
{
id: 'ship',
depends_on: ['charge'],
job_trigger: { trigger: { type: 'queue', queue: 'shipping' } },
payload_template: {
order_id: '{{input.order_id}}',
charge_id: '{{steps.charge.output.charge_id}}',
},
},
],
})
- Open Dashboard → Workflows and select your project
- Fill in the blueprint name, optional description, and step JSON
- Click Create blueprint to save it and seed the trigger panel
name requireddescriptionsteps requiredmax_duration_secList Workflow Blueprints
List workflow blueprints for the current project.
curl https://api.saasignal.saastemly.com/infra/workflows/blueprints \
-H "Authorization: Bearer sk_live_..."
{ "status": "ok" }
const { blueprints } = await ss.infra.workflows.listBlueprints({ limit: 20 })
- Open Dashboard → Workflows and select your project
- Review the Blueprint catalog on the right side of the page
- Use Refresh blueprints or Load more to page through the project list
limit25cursorTrigger Workflow
Instantiate a blueprint into a live workflow execution and queue every eligible starting step.
curl -X POST https://api.saasignal.saastemly.com/infra/workflows/blueprints/{blueprint_id}/trigger \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{}'
{ "status": "ok" }
const run = await ss.infra.workflows.trigger('wf_01JNXS...', {
input_data: { order_id: 'ord_123' },
idempotency_key: 'order-ord_123',
})
- Open Dashboard → Workflows and select your project
- Choose or paste a blueprint ID in the Trigger execution card
- Optionally add input data and an idempotency key, then click Trigger
blueprint_id requiredinput_dataidempotency_keyGet Workflow Execution
Retrieve workflow execution status, step state, and accumulated outputs.
curl https://api.saasignal.saastemly.com/infra/workflows/executions/{execution_id} \
-H "Authorization: Bearer sk_live_..."
{ "status": "ok" }
const execution = await ss.infra.workflows.getExecution('wfexec_01JNXS...')
// execution.status, execution.steps, execution.result
- Open Dashboard → Workflows and select your project
- Paste the execution ID into Execution controls
- Click Inspect to load step states, payloads, and timestamps
execution_id requiredCancel Workflow Execution
Stop queuing any additional workflow steps. Already running jobs are allowed to finish.
curl -X POST https://api.saasignal.saastemly.com/infra/workflows/executions/{execution_id}/cancel \
-H "Authorization: Bearer sk_live_..."
{ "status": "ok" }
await ss.infra.workflows.cancel('wfexec_01JNXS...')
- Open Dashboard → Workflows and select your project
- Load the execution in Execution controls
- Click Cancel to stop future dependent steps from being queued
execution_id requiredResume Workflow Execution
Resume a paused, failed, or cancelled workflow. Provide step_id to retry a failed step, and optionally override_output to mark that step complete with supplied data instead of re-running it.
curl -X POST https://api.saasignal.saastemly.com/infra/workflows/executions/{execution_id}/resume \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{}'
{ "status": "ok" }
await ss.infra.workflows.resume('wfexec_01JNXS...', {
step_id: 'manual-review',
override_output: { approved: true, reviewer: 'ops-1' },
})
- Open Dashboard → Workflows and select your project
- Load the execution, then optionally fill in a failed step ID and override output JSON
- Click Resume to retry or unblock the graph
execution_id requiredstep_idoverride_output