Represents a Simple Workflow domain.
Subclasses must set a name property. They may also set a retention_period property (defaults to ‘30’).
To register types, workflow_types and activity_types need to be set. They should be lists of types.Workflow and types.Activity subclasses.
High-level interface to iterate over activity tasks.
This method polls for new tasks of the given type indefinitely.
Parameters: | t – Subclass of types.Type. |
---|
High-level interface to iterate over decision tasks.
This method polls for new tasks of the given type indefinitely.
Parameters: | t – Subclass of types.Type. |
---|
Start execution.
Internally, this method creates an instance of t and calls its start method with the given input.
Parameters: | t – Subclass of types.Type. |
---|
Base class for activity types.
Subclasses must set name, task_list and version properties and implement a schedule class method.
Base class for Simple Workflow types (activities, workflows).
Subclasses must set name, version and task_list properties. They must also implement get_id_from_input.
Get id from input.
This class method is used to get unique workflow and activity ids.
A typical implementation may retrieve and id field from the input and append it to the class’s task list.
Parameters: | input – Input used when starting and scheduling workflows and tasks. |
---|
Base class for workflow types.
Subclasses must set name and task_list properties and implement a start method and a start_child class method.
Start child workflow execution.
input is serialized and a workflow id is generated from it using get_id_from_input.
Wrapper for “PollForActivityTask” results.
See http://docs.amazonwebservices.com/amazonswf/latest/apireference/API_PollForActivityTask.html.
Wrapper for the API data type.
See http://docs.amazonwebservices.com/amazonswf/latest/apireference/API_ActivityType.html.
Wrapper for “PollForDecisionTask” results.
See http://docs.amazonwebservices.com/amazonswf/latest/apireference/API_PollForDecisionTask.html.
This class assumes that history events are in reverse order (most recent first).
Schedule activity.
Internally, this method calls the schedule classmethod on the activity type with the given args and kwargs.
Parameters: | activity_type – Subclass of types.Activity. |
---|
Wrapper for the API data type.
See http://docs.amazonwebservices.com/amazonswf/latest/apireference/API_WorkflowExecution.html.
Wrapper for the API data type.
See http://docs.amazonwebservices.com/amazonswf/latest/apireference/API_WorkflowType.html.