How-To Guides¶
These guides provide step-by-step instructions for common workflow patterns and tasks. Unlike tutorials, they assume familiarity with the basics and focus on achieving specific goals.
Guide Overview¶
Guide |
What You’ll Learn |
|---|---|
Build a complete workflow from scratch |
|
Implement approval workflows with human decision points |
|
Run multiple steps simultaneously |
|
Add branching and decision points with gateways |
|
Store workflow state in a database for durability |
|
Add REST API for workflow management |
Choosing a Pattern¶
Use this decision tree to find the right pattern:
Do you need human approval?
Yes: See Working with Human Tasks
No: Continue below
Do steps need to run simultaneously?
Yes: See Parallel Execution
No: Continue below
Do you need conditional branching?
Yes: See Conditional Logic and Gateways
No: See Building a Simple Workflow
Do you need a REST API for external access?
Yes: See Web Plugin (REST API)
No: Use the engine directly
Common Patterns Quick Reference¶
Sequential Workflow¶
Steps execute one after another:
edges = [
Edge("step1", "step2"),
Edge("step2", "step3"),
]
Approval Workflow¶
Automated steps with human decision points:
edges = [
Edge("submit", "review"), # Human step
Edge("review", "process"),
]
Parallel Notifications¶
Multiple steps at once:
edges = [
Edge("process", "email"),
Edge("process", "slack"),
Edge("process", "sms"),
Edge("email", "complete"),
Edge("slack", "complete"),
Edge("sms", "complete"),
]
Conditional Branching¶
Different paths based on conditions:
edges = [
Edge("check", "approve", condition="ctx.get('amount') < 1000"),
Edge("check", "escalate", condition="ctx.get('amount') >= 1000"),
]