Workflows

SWF workflow type management.

DefaultExecutionConfiguration

Default workflow execution configuration.

WorkflowDetails

Workflow type details and default workflow execution configuration.

WorkflowId

Workflow type identifier.

WorkflowIdFilter

Workflow type filter on workflow name.

WorkflowInfo

Workflow type details.

delete_workflow

Delete a (deprecated/inactive) workflow type.

deprecate_workflow

Deprecate (deactivate) a workflow type.

describe_workflow

Describe a workflow type.

list_workflows

List workflow types; retrieved semi-lazily.

register_workflow

Register a new workflow type.

undeprecate_workflow

Undeprecate (reactivate) a workflow type.

class swf_typed.DefaultExecutionConfiguration(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]

Default workflow execution configuration.

child_execution_policy_on_termination: ChildExecutionTerminationPolicy = None

Child workflow execution ending policy on termination.

decision_task_list: str = None

Decision task task-list.

decision_task_priority: int = None

Decision task priority.

decision_task_timeout: t.Union[datetime.timedelta, None] = _Sentinel()

Decision task timeout.

classmethod from_api(data) DefaultExecutionConfiguration[source]

Deserialise from SWF API response data.

get_api_args()[source]

Serialise to SWF API request arguments.

lambda_iam_role_arn: str = None

Execution IAM role ARN for Lambda invocations.

timeout: t.Union[datetime.timedelta, None] = _Sentinel()

Execution run-time timeout.

class swf_typed.WorkflowDetails(info: WorkflowInfo, default_execution_configuration: DefaultExecutionConfiguration)[source]

Workflow type details and default workflow execution configuration.

default_execution_configuration: DefaultExecutionConfiguration

Default execution configuration, can be overriden when starting.

classmethod from_api(data) WorkflowDetails[source]

Deserialise from SWF API response data.

info: WorkflowInfo

Workflow details.

class swf_typed.WorkflowId(name: str, version: str)[source]

Workflow type identifier.

classmethod from_api(data) WorkflowId[source]

Deserialise from SWF API response data.

name: str

Workflow name.

to_api()[source]

Serialise to SWF API request data.

version: str

Workflow version.

class swf_typed.WorkflowIdFilter(name: str)[source]

Workflow type filter on workflow name.

get_api_args()[source]

Serialise to SWF API request arguments.

name: str

Workflow name.

to_api()[source]

Serialise to SWF API request data.

class swf_typed.WorkflowInfo(workflow: WorkflowId, is_deprecated: bool, created: datetime, description: str = None, deprecated: datetime = None)[source]

Workflow type details.

created: datetime

Creation date.

deprecated: datetime = None

Deprecation date.

description: str = None

Workflow description.

classmethod from_api(data) WorkflowInfo[source]

Deserialise from SWF API response data.

is_deprecated: bool

Workflow is deprecated and not active.

workflow: WorkflowId

Workflow ID.

swf_typed.delete_workflow(workflow: WorkflowId, domain: str, client: botocore.client.BaseClient = None) None[source]

Delete a (deprecated/inactive) workflow type.

Parameters:
  • workflow – workflow type to delete

  • domain – domain of workflow type

  • client – SWF client

swf_typed.deprecate_workflow(workflow: WorkflowId, domain: str, client: botocore.client.BaseClient = None) None[source]

Deprecate (deactivate) a workflow type.

Parameters:
  • workflow – workflow type to deprecate

  • domain – domain of workflow type

  • client – SWF client

swf_typed.describe_workflow(workflow: WorkflowId, domain: str, client: botocore.client.BaseClient = None) WorkflowDetails[source]

Describe a workflow type.

Parameters:
  • workflow – workflow type to describe

  • domain – domain of workflow type

  • client – SWF client

Returns:

workflow type details and default workflow execution configuration

swf_typed.list_workflows(domain: str, deprecated: bool = False, workflow_filter: WorkflowIdFilter = None, reverse: bool = False, client: botocore.client.BaseClient = None) Generator[WorkflowInfo, None, None][source]

List workflow types; retrieved semi-lazily.

Parameters:
  • domain – domain of workflow types

  • deprecated – list deprecated workflow types instead of non-deprecated

  • workflow_filter – filter returned workflow types by name

  • reverse – return results in reverse alphabetical order

  • client – SWF client

Returns:

matching workflow types

swf_typed.register_workflow(workflow: WorkflowId, domain: str, description: str = None, default_execution_configuration: DefaultExecutionConfiguration = None, client: botocore.client.BaseClient = None) None[source]

Register a new workflow type.

Parameters:
  • workflow – workflow type name and version

  • domain – domain to register in

  • description – workflow type description

  • default_execution_configuration – default configuration for workflow executions with this workflow type

  • client – SWF client

swf_typed.undeprecate_workflow(workflow: WorkflowId, domain: str, client: botocore.client.BaseClient = None) None[source]

Undeprecate (reactivate) a workflow type.

Parameters:
  • workflow – workflow type to undeprecate

  • domain – domain of workflow type

  • client – SWF client