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

Building a Simple Workflow

Build a complete workflow from scratch

Working with Human Tasks

Implement approval workflows with human decision points

Parallel Execution

Run multiple steps simultaneously

Conditional Logic and Gateways

Add branching and decision points with gateways

Database Persistence

Store workflow state in a database for durability

Web Plugin (REST API)

Add REST API for workflow management

Choosing a Pattern

Use this decision tree to find the right pattern:

Do you need human approval?

Do steps need to run simultaneously?

Do you need conditional branching?

Do you need a REST API for external access?

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"),
]