Execution State Machine
In Julep, an Execution represents an instance of a Task that has been started with some input. The Execution follows a specific state machine model, ensuring consistent and predictable behavior throughout its lifecycle.
Execution States
An Execution can be in one of the following states:
queued: The execution is waiting to start
starting: The execution is in the process of starting
running: The execution is actively running
awaiting_input: The execution is suspended and waiting for input to resume
succeeded: The execution has completed successfully
failed: The execution has failed
cancelled: The execution has been cancelled by the user
State Transitions
The valid transitions between execution states are as follows:
queued
→starting
starting
→running
,awaiting_input
,cancelled
,succeeded
,failed
running
→running
,awaiting_input
,cancelled
,succeeded
,failed
awaiting_input
→running
,cancelled
cancelled
,succeeded
,failed
→ (terminal states, no further transitions)
Transition Types
Executions can go through various transition types:
init
: Initializes the executioninit_branch
: Starts a new branch in the executionfinish
: Completes the execution successfullyfinish_branch
: Completes a branch in the executionwait
: Pauses the execution, waiting for inputresume
: Resumes a paused executionerror
: Indicates an error occurredstep
: Represents a step in the execution processcancelled
: Indicates the execution was cancelled
State Machine Diagram
This state machine ensures that executions in Julep follow a consistent and predictable flow, allowing for complex workflows while maintaining clear status tracking. It provides a robust framework for managing long-running tasks, handling interruptions, and recovering from failures.
Last updated