Skip to main content

Workflows

Create stateful workflows that can orchestrate complex business processes, handle long-running operations, and guarantee the durable execution of your code in the face of a failure.

durable workflow overview

Catalyst provides a high-performant workflow runtime powered by Dapr Workflow, enabling you to author and operate reliable, long-running business processes defined in your application code.

Workflow as Code

Define workflows programmatically using any supported language SDK (Python, JavaScript, .NET, Java, Go), allowing you to express complex orchestration logic with the full power and flexibility of a programming language.

@wfr.workflow(name="request_escalation")
def request_escalation_workflow(ctx: DaprWorkflowContext, order_str: str):
order = json.loads(order_str) if isinstance(order_str, str) else order_str
amount = order.get("amount", 0)

# Auto-approve orders under $1000
if amount < 1000:
yield ctx.call_activity(auto_approve_activity, input=order)
return

# Orders $1000+ require human approval (7 days max)
approval_event = ctx.wait_for_external_event("human_approval")
timeout = ctx.create_timer(timedelta(days=7))
winner = yield when_any([approval_event, timeout])

# Handle approval event or timeout
if winner == timeout:
yield ctx.call_activity(handle_timeout_activity, input=order)
return

approval_result = approval_event.get_result()
yield ctx.call_activity(process_approval_activity, input=approval_result)

Key features:

  • Durability - Every workflow step is persisted in a backing store (SQL, NoSQL, or cloud service), which allows workflows to survive process restarts and continue from their last recorded state.
  • Resiliency - Workflows apply durable retry policies that track retry state, wait with durable timers, and continue after restarts. Built-in retries, timeouts, and circuit breakers. These policies operate independently of Dapr resiliency.
  • Child workflows - Compose complex processes by breking them down into sub processes
  • Multi-application workflows - Orchestrate business processes that span across different application instances. This enables you to reuse existing workflows and their activities in new workflows for example.
  • Timers and reminders - Schedule delays or future events.
  • External events - Wait for human approvals or external triggers.

Observability and Auditing

Catalyst provides deep workflow observability through a unified dashboard that tracks all executions, workflow states, and success rates. You can view summaries by workflow type, drill down into individual runs, and visualize execution paths to understand how each activity progressed or failed.

workflow dashboard

Key features:

  • Workflow dashboard - Monitor workflow execution states (Running, Completed, Failed) and aggregate success rates across workflows for quick health insights.
  • Execution visualization - View real-time diagrams of workflow paths, including branching, parallel activities, and dependencies.
  • Execution history - View full workflow timelines, duration, and outcomes.
  • Input and output inspection - Examine data at each stage for debugging and monitoring.
  • API logs - Inspect real-time Dapr API calls including Workflow, State, Pub/Sub, and Invocation APIs directly for end-to-end visibility.

Workflow Patterns

Catalyst supports common stateful coordination patterns in microservice architectures.

Getting Started