Executions¶
SWF workflow execution management.
Child workflow execution ending policy on parent termination. |
|
Workflow execution filter on execution close-status. |
|
Workflow execution filter on close-time. |
|
Current open workflow execution specifier. |
|
Workflow execution configuration. |
|
Workflow execution details, configuration, open-counts and snapshot. |
|
Workflow execution filter. |
|
Workflow execution identifier. |
|
Workflow execution details. |
|
Counts of workflow executions' open tasks/timers/children. |
|
Workflow execution status. |
|
Workflow execution filter on execution workflow-ID. |
|
Partial workflow execution configuration. |
|
Workflow execution filter on start-time. |
|
Workflow execution filter on execution tags. |
|
Workflow execution filter on execution workflow-type. |
|
Describe a workflow execution. |
|
Get the number of closed workflow executions. |
|
Get the number of open workflow executions. |
|
List closed workflow executions; retrieved semi-lazily. |
|
List open workflow executions; retrieved semi-lazily. |
|
Request the cancellation of a workflow execution. |
|
Send a signal to a workflow execution. |
|
Start a workflow execution. |
|
Terminate (immediately close) a workflow execution. |
- class swf_typed.ChildExecutionTerminationPolicy(*values)[source]¶
Child workflow execution ending policy on parent termination.
- abandon = 'ABANDON'¶
Abandon child executions.
- request_cancel = 'REQUEST_CANCEL'¶
Request for child execution cancellation.
- terminate = 'TERMINATE'¶
Terminate child executions.
- class swf_typed.CloseStatusExecutionFilter(status: str)[source]¶
Workflow execution filter on execution close-status.
- class swf_typed.CloseTimeExecutionFilter(earliest: datetime, latest: datetime = None)[source]¶
Workflow execution filter on close-time.
- to_api()¶
Serialise to SWF API request data.
- class swf_typed.CurrentExecutionId(id: str)[source]¶
Current open workflow execution specifier.
- classmethod from_api(data) CurrentExecutionId[source]¶
Deserialise from SWF API response data.
- class swf_typed.ExecutionConfiguration(timeout: timedelta | None, decision_task_timeout: timedelta | None, decision_task_list: str, child_execution_policy_on_termination: ChildExecutionTerminationPolicy, decision_task_priority: int = None, lambda_iam_role_arn: str = None)[source]¶
Workflow execution configuration.
- child_execution_policy_on_termination: ChildExecutionTerminationPolicy¶
Child workflow execution ending policy on termination.
- classmethod from_api(data) ExecutionConfiguration[source]¶
Deserialise from SWF API response data.
- class swf_typed.ExecutionDetails(info: ExecutionInfo, configuration: ExecutionConfiguration = None, n_open: ExecutionOpenCounts = None, latest_activity_task_scheduled: datetime = None, latest_context: str = None)[source]¶
Workflow execution details, configuration, open-counts and snapshot.
- configuration: ExecutionConfiguration = None¶
Execution configuration.
- classmethod from_api(data) ExecutionDetails[source]¶
- info: ExecutionInfo¶
Execution details.
- n_open: ExecutionOpenCounts = None¶
Counts of open tasks/timers/children in execution.
- class swf_typed.ExecutionId(id: str, run_id: str)[source]¶
Workflow execution identifier.
- classmethod from_api(data) ExecutionId[source]¶
Deserialise from SWF API response data.
- class swf_typed.ExecutionInfo(execution: ExecutionId, workflow: _workflows.WorkflowId, started: datetime, status: ExecutionStatus, cancel_requested: bool, closed: datetime = None, parent: ExecutionId = None, tags: List[str] = None)[source]¶
Workflow execution details.
- execution: ExecutionId¶
Execution ID.
- classmethod from_api(data) ExecutionInfo[source]¶
Deserialise from SWF API response data.
- parent: ExecutionId = None¶
Parent execution ID.
- status: ExecutionStatus¶
Execution status.
- workflow: _workflows.WorkflowId¶
Execution workflow.
- class swf_typed.ExecutionOpenCounts(activity_tasks: int, decision_tasks: int, timers: int, child_executions: int, lambda_tasks: int = None)[source]¶
Counts of workflow executions’ open tasks/timers/children.
- classmethod from_api(data) ExecutionOpenCounts[source]¶
- class swf_typed.ExecutionStatus(*values)[source]¶
Workflow execution status.
- cancelled = 'CANCELED'¶
Execution has been cancelled.
- completed = 'COMPLETED'¶
Execution has finished successfully.
- continued_as_new = 'CONTINUED_AS_NEW'¶
Execution has been continued as a new execution.
- failed = 'FAILED'¶
Execution has failed.
- open = 'OPEN'¶
Execution is in-progress.
- started = 'OPEN'¶
Execution is in-progress.
- terminated = 'TERMINATED'¶
Execution has been terminated.
- timed_out = 'TIMED_OUT'¶
Execution has timed out.
- class swf_typed.IdExecutionFilter(execution: CurrentExecutionId)[source]¶
Workflow execution filter on execution workflow-ID.
- execution: CurrentExecutionId¶
Execution ID.
- class swf_typed.PartialExecutionConfiguration(timeout: timedelta | None = _Sentinel(), decision_task_timeout: timedelta | None = _Sentinel(), decision_task_list: str = None, child_execution_policy_on_termination: ChildExecutionTerminationPolicy = None, decision_task_priority: int = None, lambda_iam_role_arn: str = None)[source]¶
Partial workflow execution configuration.
- child_execution_policy_on_termination: ChildExecutionTerminationPolicy = None¶
Child workflow execution ending policy on termination.
- classmethod from_api(data) PartialExecutionConfiguration[source]¶
Deserialise from SWF API response data.
- class swf_typed.StartTimeExecutionFilter(earliest: datetime, latest: datetime = None)[source]¶
Workflow execution filter on start-time.
- to_api()¶
Serialise to SWF API request data.
- class swf_typed.WorkflowTypeExecutionFilter(workflow: ForwardRef('_workflows.WorkflowId') | ForwardRef('_workflows.WorkflowIdFilter'))[source]¶
Workflow execution filter on execution workflow-type.
- workflow: ForwardRef('_workflows.WorkflowId') | ForwardRef('_workflows.WorkflowIdFilter')¶
Execution workflow.
- swf_typed.describe_execution(execution: ExecutionId, domain: str, client: botocore.client.BaseClient = None) ExecutionDetails[source]¶
Describe a workflow execution.
- Parameters:
execution – workflow execution to describe
domain – domain of workflow execution
client – SWF client
- Returns:
workflow execution details, configuration, open-counts and snapshot
- swf_typed.get_number_of_closed_executions(domain: str, time_filter: StartTimeExecutionFilter | CloseTimeExecutionFilter = None, property_filter: IdExecutionFilter | WorkflowTypeExecutionFilter | TagExecutionFilter | CloseStatusExecutionFilter = None, client: botocore.client.BaseClient = None) int[source]¶
Get the number of closed workflow executions.
Warns if the number of matching executions is greater than what’s returned.
- Parameters:
domain – domain of executions
time_filter – execution start-time/close-time filter, default: executions closed less than 90 days ago
property_filter – execution workflow-ID/workflow-type/tags/close-status filter
client – SWF client
- Returns:
number of matching workflow executions
- swf_typed.get_number_of_open_executions(domain: str, started_filter: StartTimeExecutionFilter = None, property_filter: IdExecutionFilter | WorkflowTypeExecutionFilter | TagExecutionFilter = None, client: botocore.client.BaseClient = None) int[source]¶
Get the number of open workflow executions.
Warns if the number of matching executions is greater than what’s returned.
- Parameters:
domain – domain of executions
started_filter – execution start-time filter, default: executions opened less than 90 days ago
property_filter – execution workflow-ID/workflow-type/tags filter
client – SWF client
- Returns:
number of matching workflow executions
- swf_typed.list_closed_executions(domain: str, time_filter: StartTimeExecutionFilter | CloseTimeExecutionFilter = None, property_filter: IdExecutionFilter | WorkflowTypeExecutionFilter | TagExecutionFilter | CloseStatusExecutionFilter = None, reverse: bool = False, client: botocore.client.BaseClient = None) Generator[ExecutionInfo, None, None][source]¶
List closed workflow executions; retrieved semi-lazily.
- Parameters:
domain – domain of executions
time_filter – execution start-time/close-time filter, default: executions closed less than 90 days ago
property_filter – execution workflow-ID/workflow-type/tags/close-status filter
reverse – return results in reverse start/close order
client – SWF client
- Returns:
matching workflow executions
- swf_typed.list_open_executions(domain: str, started_filter: StartTimeExecutionFilter = None, property_filter: IdExecutionFilter | WorkflowTypeExecutionFilter | TagExecutionFilter = None, reverse: bool = False, client: botocore.client.BaseClient = None) Generator[ExecutionInfo, None, None][source]¶
List open workflow executions; retrieved semi-lazily.
- Parameters:
domain – domain of executions
started_filter – execution start-time filter, default: executions opened less than 90 days ago
property_filter – execution workflow-ID/workflow-type/tags filter
reverse – return results in reverse start order
client – SWF client
- Returns:
matching workflow executions
- swf_typed.request_cancel_execution(execution: CurrentExecutionId | ExecutionId, domain: str, client: botocore.client.BaseClient = None) None[source]¶
Request the cancellation of a workflow execution.
- Parameters:
execution – execution to cancel
domain – domain of execution
client – SWF client
- swf_typed.signal_execution(execution: CurrentExecutionId | ExecutionId, signal: str, domain: str, input_: str = None, client: botocore.client.BaseClient = None) None[source]¶
Send a signal to a workflow execution.
- Parameters:
execution – execution to signal
signal – signal name
domain – domain of execution
input – attached signal data
client – SWF client
- swf_typed.start_execution(workflow: _workflows.WorkflowId, execution: CurrentExecutionId, domain: str, input: str = None, configuration: PartialExecutionConfiguration = None, tags: List[str] = None, client: botocore.client.BaseClient = None) ExecutionId[source]¶
Start a workflow execution.
- Parameters:
workflow – workflow type for execution
execution – execution workflow-ID
domain – domain for execution
input – execution input
configuration – execution configuration, default: use defaults for workflow type
tags – execution tags
client – SWF client
- Returns:
workflow execution, with run-ID
- swf_typed.terminate_execution(execution: CurrentExecutionId | ExecutionId, domain: str, reason: str = None, details: str = None, child_execution_policy: ChildExecutionTerminationPolicy = None, client: botocore.client.BaseClient = None) None[source]¶
Terminate (immediately close) a workflow execution.
- Parameters:
execution – workflow execution to close
domain – domain od execution
reason – termination reason, usually for classification
details – termination details, usually for explanation
child_execution_policy – how to handle open child workflow executions, default: use default for workflow type
client – SWF client