Introduction to executions
An execution represents a single run of a flow in Serverless Workflow. Each execution tracks its progress through history events and progresses through defined status values from start to completion. This topic describes execution properties and execution history events.
Flows and executions
A flow defines the logic and sequence of a business process. To run the process, you create an execution. Each execution is an independent run of the flow, typically with different input. For example, each time an order is placed, an order management flow runs with the order information as input.
Execution properties
An execution has input properties that you specify when you start the execution and output properties that the execution produces as it runs.
Input properties
ExecutionName: the name of the execution. The name must be unique within the same flow and must meet the following requirements:- The name can contain letters (a to z or A to Z), digits (0 to 9), underscores (), and hyphens (-).- The name must start with a letter (a to z or A to Z) or an underscore ().- The name is case-sensitive.- The name must be 1 to 128 characters in length.- Input: the input of the execution. If you customize the input of an execution, the input must be in the JSON object format.### Output properties
Output: the output of the execution, which must be in the JSON object format.- FlowDefinition: the flow definition. For more information, seeFlow Definition Language. To make sure that a flow update does not affect executions that have already started, each execution stores the flow definition that is in effect when the execution starts.- Status: the status of the execution. Valid values:
Starting: The execution is being initialized.
Running: The execution is in progress.
Stopped: The execution was manually stopped.
Succeeded: The execution completed successfully.
Failed: The execution ended due to a failure.
TimedOut: The execution exceeded its time limit.- StartedTime: the time when the execution started.- StoppedTime: the time when the execution ended.
Execution history events
A flow typically contains multiple steps. As a flow runs, each step generates events that record the execution status of that step. You can use these events to view information such as the current step, the input and output of each step, the duration of the execution, and the cause of a failure. The Serverless workflow service also uses this status data to track flow executions and ensure high availability (HA) of the system.
Each event has the following properties. The event details (EventDetail) are a string in the JSON object format. The content of the event details varies based on the event type (Type).
StepName: the name of the step. The name corresponds to the step name in the Flow Definition Language.- Type: the event type.- EventDetail: the details of the event.- Time: the time when the event occurred.- EventId: the ID of the event.- ScheduleEventId: the ID of the event that triggered the current event.