Decisions¶
SWF decision task management.
Cancel timer decider decision. |
|
Cancel workflow execution decider decision. |
|
Complete workflow execution decider decision. |
|
Continue as new workflow execution decider decision. |
|
Decider decision. |
|
Decider decision task. |
|
Fail workflow execution decider decision. |
|
Record marker decider decision. |
|
Cancel activity task request decider decision. |
|
Cancel external workflow execution request decider decision. |
|
Schedule activity task decider decision. |
|
Schedule Lambda function invocation decider decision. |
|
Signal external workflow execution decider decision. |
|
Start child workflow execution decider decision. |
|
Start timer decider decision. |
|
Get the number of pending decision tasks. |
|
Request (poll for) a decision task; blocks until task is received. |
|
Make decisions for a workflow execution, completing decision task. |
- class swf_typed.CancelWorkflowExecutionDecision(details: str = None)[source]¶
Cancel workflow execution decider decision.
- class swf_typed.CompleteWorkflowExecutionDecision(execution_result: str = None)[source]¶
Complete workflow execution decider decision.
- class swf_typed.ContinueAsNewWorkflowExecutionDecision(execution_input: str = None, workflow_version: str = None, execution_configuration: PartialExecutionConfiguration = None, tags: List[str] = None)[source]¶
Continue as new workflow execution decider decision.
- execution_configuration: PartialExecutionConfiguration = None¶
Continuing execution configuration overrides.
- class swf_typed.DecisionTask(token: str, execution: _executions.ExecutionId, workflow: _workflows.WorkflowId, _execution_history_iter: Iterable[ForwardRef('_history.Event')], decision_task_started_execution_history_event_id: int, previous_decision_task_started_execution_history_event_id: int = None)[source]¶
Decider decision task.
- execution: _executions.ExecutionId¶
Execution which decisions are being made for.
- property execution_history_iter: Generator[ForwardRef('_history.Event'), None, None]¶
Execution history events iterable.
- classmethod from_api(data, execution_history_iter: Iterable[ForwardRef('_history.Event')] = None) DecisionTask[source]¶
Deserialise decision task from SWF API response data.
- Parameters:
data – SWF API response decision task data
execution_history_iter – execution history events, for lazy handling of paginated history. Default: get from response data
- previous_decision_task_started_execution_history_event_id: int = None¶
History event ID for previous decision-task start.
- workflow: _workflows.WorkflowId¶
Execution workflow.
- class swf_typed.FailWorkflowExecutionDecision(reason: str = None, details: str = None)[source]¶
Fail workflow execution decider decision.
- class swf_typed.RecordMarkerDecision(marker_name: str, details: str = None)[source]¶
Record marker decider decision.
- class swf_typed.RequestCancelActivityTaskDecision(task_id: str)[source]¶
Cancel activity task request decider decision.
- class swf_typed.RequestCancelExternalWorkflowExecutionDecision(execution: ExecutionId | CurrentExecutionId, control: str = None)[source]¶
Cancel external workflow execution request decider decision.
- execution: ExecutionId | CurrentExecutionId¶
ID of execution to cancel.
- class swf_typed.ScheduleActivityTaskDecision(activity: _activities.ActivityId, task_id: str, task_input: str = None, task_configuration: _tasks.PartialTaskConfiguration = None, control: str = None)[source]¶
Schedule activity task decider decision.
- activity: _activities.ActivityId¶
Task activity.
- task_configuration: _tasks.PartialTaskConfiguration = None¶
Task configuration overrides.
- class swf_typed.ScheduleLambdaFunctionDecision(lambda_function: str, task_id: str, task_input: str = None, task_timeout: timedelta = _Sentinel(), control: str = None)[source]¶
Schedule Lambda function invocation decider decision.
- class swf_typed.SignalExternalWorkflowExecutionDecision(execution: ExecutionId | CurrentExecutionId, signal: str, signal_input: str = None, control: str = None)[source]¶
Signal external workflow execution decider decision.
- execution: ExecutionId | CurrentExecutionId¶
ID of execution to signal.
- class swf_typed.StartChildWorkflowExecutionDecision(workflow: _workflows.WorkflowId, execution: _executions.CurrentExecutionId, execution_input: str = None, execution_configuration: _executions.PartialExecutionConfiguration = None, tags: List[str] = None, control: str = None)[source]¶
Start child workflow execution decider decision.
- execution: _executions.CurrentExecutionId¶
Child execution workflow-ID.
- execution_configuration: _executions.PartialExecutionConfiguration = None¶
Child execution configuration overrides.
- workflow: _workflows.WorkflowId¶
Child execution workflow.
- class swf_typed.StartTimerDecision(timer_id: str, timer_duration: timedelta, control: str = None)[source]¶
Start timer decider decision.
- swf_typed.get_number_of_pending_decision_tasks(task_list: str, domain: str, client: botocore.client.BaseClient = None) int[source]¶
Get the number of pending decision tasks.
Warns if the number of pending tasks is greater than what’s returned.
- Parameters:
task_list – decision task-list
domain – domain of task-list
client – SWF client
- Returns:
number of pending tasks
- swf_typed.request_decision_task(task_list: str, domain: str, decider_identity: str = None, no_tasks_callback: Callable[[], None] = None, client: botocore.client.BaseClient = None) DecisionTask[source]¶
Request (poll for) a decision task; blocks until task is received.
Workflow execution history events are retrieved semi-lazily.
- Parameters:
task_list – decision task-list to request from
domain – domain of task-list
decider_identity – decider identity, recorded in execution history
no_tasks_callback – called after no tasks were provided by SWF
client – SWF client
- Returns:
decision task
- swf_typed.send_decisions(token: str, decisions: List[Decision], context: str = None, client: botocore.client.BaseClient = None) None[source]¶
Make decisions for a workflow execution, completing decision task.
- Parameters:
token – decision task identifying token
decisions – decisions to make
context – workflow execution context to set
client – SWF client