Sim Studio

Execution Basics

Understanding the fundamental execution flow in Sim Studio

When you run a workflow in Sim Studio, the execution engine follows a systematic process to ensure blocks are executed in the correct order and data flows properly between them.

Execution Flow

The execution of a workflow follows these key steps:

Validation

Before execution begins, the workflow is validated to ensure it has:

  • An enabled starter block with no incoming connections
  • Properly connected blocks with valid configurations
  • No circular dependencies (except in intentional loops)
  • Valid input and output types between connected blocks

Initialization

The execution context is created, which includes:

  • Environment variables for the workflow
  • Input values from the starter block
  • Initial state for all blocks
  • Execution path tracking
  • Loop iteration counters

Block Execution

Blocks are executed in topological order (based on dependencies):

  • The system identifies which blocks can be executed next
  • Inputs for each block are resolved from previous block outputs
  • Each block is executed by its specialized handler
  • Outputs are stored in the execution context

Path Determination

As execution progresses, the system determines which paths to follow:

  • Router and conditional blocks make decisions about execution paths
  • Only blocks on active paths are executed
  • The path tracker maintains the current execution state

Result Collection

After all blocks have executed:

  • Final outputs are collected
  • Execution logs are compiled
  • Performance metrics are calculated
  • Results are presented in the UI

Block Types and Execution

Different block types have different execution behaviors:

Orchestration blocks control the flow of execution through your workflow.

Starter Block
Router Block
Condition Block

Execution Methods

Sim Studio offers multiple ways to trigger workflow execution:

Manual Execution

Run workflows on-demand through the Sim Studio interface by clicking the "Run" button. This is perfect for:

  • Testing during development
  • One-off tasks
  • Workflows that need human supervision

Scheduled Execution

Configure workflows to run automatically on a specified schedule:

  • Set up recurring executions using cron expressions
  • Define start times and frequency
  • Configure timezone settings
  • Set minimum and maximum execution intervals

API Endpoints

Each workflow can be exposed as an API endpoint:

  • Get a unique URL for your workflow
  • Configure authentication requirements
  • Send custom inputs via POST requests
  • Receive execution results as JSON responses

Webhooks

Configure workflows to execute in response to external events:

  • Set up webhook triggers from third-party services
  • Process incoming webhook data as workflow input
  • Configure webhook security settings
  • Support for specialized webhooks (GitHub, Stripe, etc.)

The execution method you choose depends on your workflow's purpose. Manual execution is great for development, while scheduled execution, API endpoints, and webhooks are better for production use cases.

Execution Context

Each workflow execution maintains a detailed context that includes:

  • Block States: Outputs and execution status of each block
  • Execution Path: The active path through the workflow
  • Routing Decisions: Records of which paths were selected
  • Environment Variables: Configuration values for the workflow
  • Execution Logs: Detailed records of each step in the execution

This context is maintained throughout the execution and is used to:

  • Resolve inputs for blocks
  • Determine which blocks to execute next
  • Track the progress of execution
  • Provide debugging information
  • Store intermediate results

Real-Time Execution Monitoring

As your workflow executes, you can monitor its progress in real-time:

  • Active Block Highlighting: The currently executing block is highlighted
  • Live Logs: Execution logs appear in real-time in the logs panel
  • Block States: Visual indicators show each block's execution state
  • Performance Metrics: Timing information for each block's execution

These monitoring features help you understand how your workflow is executing and identify any issues that arise.

On this page

On this page