State

SWF workflow execution state construction.

ChildExecutionState

Child workflow execution state.

DecisionFailure

Decision failure event.

ExecutionState

Workflow execution state.

LambdaTaskState

Lambda task state.

MarkerState

Marker state.

SignalState

Signal state.

TaskState

Activity task state.

TaskStatus

Activity task status.

TimerState

Timer state.

TimerStatus

Timer status.

build_state

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.

decider_control: str = None

Message from decider attached to child execution.

ended: datetime = None

Child execution end date.

execution: _executions.ExecutionId

Child execution ID.

failure_reason: str = None

Child execution failure reason.

input: str = None

Child execution input.

result: str = None

Child execution result.

started: datetime

Child execution start date.

status: _executions.ExecutionStatus

Child execution status.

stop_details: str = None

Child execution ended details.

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.

is_new: bool = True

Most recent decision failed.

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.

cancel_requested: bool = False

Execution cancellation has been requested.

child_executions: List[ChildExecutionState]

Execution child executions.

configuration: _executions.ExecutionConfiguration

Execution configuration.

continuing_execution_run_id: str = None

ID of execution continuing this execution.

decision_failures: List[DecisionFailure]

Execution decision failures.

ended: datetime = None

Execution end date.

failure_reason: str = None

Execution failure reason.

input: str = None

Execution input.

markers: List[MarkerState]

Execution markers.

result: str = None

Execution result.

signals: List[SignalState]

Execution signals.

started: datetime

Execution start date.

status: _executions.ExecutionStatus

Execution status.

stop_details: str = None

Execution ended details.

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.

decider_control: str = None

Message from decider attached to task.

ended: datetime = None

Lambda function invocation end date.

failure_reason: str = None

Lambda function error reason.

property has_ended: bool

Lambda task has completed/failed/cancelled/timed-out.

id: str

Task ID.

input: str = None

Lambda function input.

lambda_function: str

Name of Lambda function invoked for task.

result: str = None

Lambda function result.

scheduled: datetime

Task schedule date.

started: datetime = None

Lambda function invocation date.

status: TaskStatus

Task status.

stop_details: str = None

Lambda function ended details.

timeout: timedelta = None

Lambda function invocation timeout.

class swf_typed.MarkerState(name: str, recorded: datetime, details: str = None, is_new: bool = True)[source]

Marker state.

details: str = None

Marker details.

is_new: bool = True

Marker was recorded after most recent decision.

name: str

Marker name.

recorded: datetime

Marker record date.

class swf_typed.SignalState(name: str, received: datetime, input: str = None, is_new: bool = True)[source]

Signal state.

input: str = None

Signal input.

is_new: bool = True

Execution was signalled after most recent decision.

name: str

Signal name.

received: datetime

Signal date.

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.

cancel_requested: bool = False

Task cancellation has been requested.

configuration: _tasks.TaskConfiguration

Task configuration.

decider_control: str = None

Message from decider attached to task.

ended: datetime = None

Task end date.

failure_reason: str = None

Task failure reason.

property has_ended: bool

Activity task has completed/failed/cancelled/timed-out.

id: str

Task ID.

input: str = None

Task input.

result: str = None

Task result.

scheduled: datetime

Task scheduled date.

started: datetime = None

Task start date.

status: TaskStatus

Task status.

stop_details: str = None

Task ended details.

timeout_type: _history.TimeoutType = None

Task timeout type.

worker_identity: str = None

Identity of worker which acquired task.

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.

decider_control: str = None

Message from decider attached to timer.

duraction: timedelta

Timer duration.

ended: datetime = None

Timer finish date.

id: str

Timer ID.

input: str = None

Timer input.

started: datetime

Timer start date.

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