State¶
SWF workflow execution state construction.
Child workflow execution state. |
|
Decision failure event. |
|
Workflow execution state. |
|
Lambda task state. |
|
Marker state. |
|
Signal state. |
|
Activity task state. |
|
Activity task status. |
|
Timer state. |
|
Timer status. |
|
Build workflow execution state. |
- class swf_typed.ChildExecutionState(execution: _executions.ExecutionId, workflow: _workflows.WorkflowId, status: _executions.ExecutionStatus, configuration: _executions.ExecutionConfiguration, started: datetime, ended: datetime = None, input: str = None, result: str = None, timeout_type: _history.TimeoutType = None, failure_reason: str = None, stop_details: str = None, decider_control: str = None)[source]¶
Child workflow execution state.
- configuration: _executions.ExecutionConfiguration¶
Child execution configuration.
- execution: _executions.ExecutionId¶
Child execution ID.
- status: _executions.ExecutionStatus¶
Child execution status.
- timeout_type: _history.TimeoutType = None¶
Child execution timeout type.
- workflow: _workflows.WorkflowId¶
Child execution workflow.
- class swf_typed.DecisionFailure(event: _history.Event, is_new: bool = True)[source]¶
Decision failure event.
- event: _history.Event¶
History event for decision failure.
- class swf_typed.ExecutionState(workflow: _workflows.WorkflowId, status: _executions.ExecutionStatus, configuration: _executions.ExecutionConfiguration, started: ~datetime.datetime, ended: ~datetime.datetime = None, tasks: ~typing.List[~swf_typed._state.TaskState | ~swf_typed._state.LambdaTaskState] = <factory>, child_executions: ~typing.List[~swf_typed._state.ChildExecutionState] = <factory>, timers: ~typing.List[~swf_typed._state.TimerState] = <factory>, signals: ~typing.List[~swf_typed._state.SignalState] = <factory>, markers: ~typing.List[~swf_typed._state.MarkerState] = <factory>, decision_failures: ~typing.List[~swf_typed._state.DecisionFailure] = <factory>, input: str = None, cancel_requested: bool = False, result: str = None, failure_reason: str = None, stop_details: str = None, continuing_execution_run_id: str = None)[source]¶
Workflow execution state.
- child_executions: List[ChildExecutionState]¶
Execution child executions.
- configuration: _executions.ExecutionConfiguration¶
Execution configuration.
- decision_failures: List[DecisionFailure]¶
Execution decision failures.
- markers: List[MarkerState]¶
Execution markers.
- signals: List[SignalState]¶
Execution signals.
- status: _executions.ExecutionStatus¶
Execution status.
- tasks: List[TaskState | LambdaTaskState]¶
Execution activity and Lambda function invocation tasks.
- timers: List[TimerState]¶
Execution timers.
- workflow: _workflows.WorkflowId¶
Child execution workflow.
- class swf_typed.LambdaTaskState(id: str, status: TaskStatus, lambda_function: str, scheduled: datetime, started: datetime = None, ended: datetime = None, timeout: timedelta = None, input: str = None, result: str = None, failure_reason: str = None, stop_details: str = None, decider_control: str = None)[source]¶
Lambda task state.
- status: TaskStatus¶
Task status.
- class swf_typed.MarkerState(name: str, recorded: datetime, details: str = None, is_new: bool = True)[source]¶
Marker state.
- class swf_typed.SignalState(name: str, received: datetime, input: str = None, is_new: bool = True)[source]¶
Signal state.
- class swf_typed.TaskState(id: str, status: TaskStatus, activity: _activities.ActivityId, configuration: _tasks.TaskConfiguration, scheduled: datetime, started: datetime = None, ended: datetime = None, input: str = None, worker_identity: str = None, cancel_requested: bool = False, result: str = None, timeout_type: _history.TimeoutType = None, failure_reason: str = None, stop_details: str = None, decider_control: str = None)[source]¶
Activity task state.
- activity: _activities.ActivityId¶
Task activity.
- configuration: _tasks.TaskConfiguration¶
Task configuration.
- status: TaskStatus¶
Task status.
- timeout_type: _history.TimeoutType = None¶
Task timeout type.
- class swf_typed.TaskStatus(*values)[source]¶
Activity task status.
- cancelled = 5¶
Task has been cancelled.
- completed = 3¶
Task has finished.
- failed = 4¶
Task has failed.
- scheduled = 1¶
Task has been scheduled.
- started = 2¶
Task is running.
- timed_out = 6¶
Task has timed out.
- class swf_typed.TimerState(id: str, status: TimerStatus, duraction: timedelta, started: datetime, ended: datetime = None, input: str = None, decider_control: str = None)[source]¶
Timer state.
- status: TimerStatus¶
Timer status.
- class swf_typed.TimerStatus(*values)[source]¶
Timer status.
- cancelled = 3¶
Timer has been cancelled.
- fired = 2¶
Timer has finished.
- started = 1¶
Timer has started.
- swf_typed.build_state(execution_history: Iterable[ForwardRef('_history.Event')]) ExecutionState[source]¶
Build workflow execution state.
- Parameters:
execution_history – workflow execution history events, earliest events must be first
- Returns:
workflow execution state