Step Context
The StepContext
class encapsulates the context and state of a single step within a process. It holds essential
information that is used throughout the execution of the step, ensuring that each step operates with the necessary data
and configuration.
Fields
Field | Description |
---|---|
id | The unique identifier for the step context. The id consists of a step id, step reference and the process id. |
parentId | The identifier of the parent step context, if any. |
parentExecutionId | The execution ID of the parent step, linking this step to its parent execution. |
stepDefinitionSnapshot | A snapshot of the step's definition at the time of execution, capturing its configuration and parameters. |
input | A key value pair containing the inputs provided to the step during execution. |
output | A key value pair containing the outputs produced by the step after execution. |
status | The current status of the step, indicating whether it is running, completed, failed, etc. Refer to Step Status for full list. |
workerId | The identifier of the worker responsible for executing the step. |
priority | The priority level assigned to the step, determining its execution order relative to other steps. |
optional | Indicates whether the step is optional, allowing the process to continue even if this step fails. |
start | The epoch timestamp indicating when the step started execution. |
schedule | The epoch timestamp indicating when the step is scheduled to execute. |
updated | The epoch timestamp indicating when the step was last updated. |
executions | A list of StepExecution instances representing each execution attempt of the step. |
StepExecution
The StepExecution
class represents a single execution attempt of a step. It tracks the lifecycle of the execution,
including scheduling, polling, starting, updating, and producing outputs.
Fields
Field | Description |
---|---|
id | The unique sequential identifier for the step execution. |
scheduled | The epoch timestamp when the execution was scheduled. |
polled | The epoch timestamp when the execution was polled by a worker for processing. |
start | The epoch timestamp when the execution started. |
updated | The epoch timestamp when the execution was last updated. |
executor | The identifier of the executor responsible for handling the execution. |
ref | A reference string associated with the execution |
runs | An integer tracking the number of times the execution has been attempted. |
output | A map containing the output produced by this specific execution attempt. This value is only populated if a new step execution happens after this execution. Until then the output is held in the main output of the step context. |