JustPaid Workflows
Execution

Execution

How workflows execute, monitoring runs, and debugging failures

When a workflow is triggered, the execution engine compiles the canvas into a directed acyclic graph (DAG) and runs each block in dependency order. Independent blocks execute concurrently. This section covers how execution works, how to monitor runs, and how to debug failures.

Sections

Execution Overview

How It Works

  1. Trigger fires -- A webhook, schedule, event, or API call starts the workflow
  2. DAG compilation -- The canvas is compiled into an ordered graph of steps
  3. Step execution -- Each step runs when all its dependencies are satisfied
  4. Concurrent processing -- Independent steps run in parallel automatically
  5. Result collection -- Outputs are captured and passed to downstream steps
  6. Completion -- The workflow run is marked as completed or failed

Run States

StateDescription
pendingRun created, waiting to start
runningCurrently executing steps
suspendedPaused for approval or external event
completedAll steps finished successfully
failedA step failed after all retries
cancelledManually cancelled via API or dashboard

Error Handling

Every step can be configured with error handling:

StrategyBehavior
failStop the workflow immediately (default)
continueLog the error and proceed to the next step
retryRetry with exponential backoff (configurable attempts)

Retry Configuration

{
  "retryConfig": {
    "maxAttempts": 3,
    "initialDelayMs": 1000,
    "maxDelayMs": 30000,
    "backoffMultiplier": 2
  }
}

Key Principles

  • Dependency-based execution -- Blocks run only when all upstream blocks complete
  • Automatic parallelization -- Independent blocks run concurrently without configuration
  • Idempotency -- Design workflows to be safely re-run with the same input
  • Observability -- Every step captures inputs, outputs, timing, and errors in execution logs
  • Cycle protection -- Sub-workflow call chains are limited to 25 hops to prevent infinite loops

Frequently Asked Questions

On this page