Examples
Workflows

Workflows (StepFlow)

Simple workflow example.

Create Workflow

aio wf create hello-workflow --dsl hello-workflow.json

hello-workflow.json:

{
  "description": "Simple hello world workflow",
  "entry": "Greet",
  "steps": {
    "Greet": {
      "type": "set",
      "set": {
        "message": "Hello, {% input.name | default: 'World' %}!",
        "timestamp": "{% $now() %}"
      },
      "next": "Respond"
    },
    "Respond": {
      "type": "succeed",
      "output": {
        "greeting": "{% message %}",
        "time": "{% timestamp %}"
      }
    }
  }
}

Run Workflow

# Run with input
aio wf run hello-workflow --data '{"name": "Alice"}'
 
# Check executions
aio wf executions

Cleanup

aio wf delete hello-workflow --force