Loopfour
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

The execution engine builds a directed acyclic graph (DAG) from the edges on your canvas. Steps with no unresolved dependencies execute first. When a step completes, the engine checks if any downstream steps now have all dependencies satisfied and queues them for execution.

Yes. The execution engine automatically runs independent steps concurrently. If two blocks have no dependency relationship (neither depends on the other's output), they execute at the same time. No explicit Parallel block is needed for this.

Each trigger creates a new, independent run. Multiple runs of the same workflow can execute concurrently. Each run has its own state, inputs, and outputs.

Individual steps have configurable timeouts (default: 30 seconds). The total workflow timeout depends on the execution engine configuration. For long-running workflows, use Wait blocks and async patterns to avoid hitting timeouts.

Yes. Workflows can be cancelled via the REST API or the dashboard. Cancellation stops execution of any pending steps. Steps that have already completed are not rolled back.

On this page