Using Amazon SWF to manage workflows within your application is easy. Amazon SWF acts as the coordination hub for all of the different components of your application:
- Maintaining application state
- Tracking workflow executions and logging their progress
- Holding and dispatching tasks
- Controlling which tasks each of your application hosts will be assigned to execute
To use Amazon SWF you simply:
- Use the AWS Management Console or the Amazon SWF APIs to specify the names of workflows.
- Use the Amazon SWF APIs to “start” a new workflow, which results in a particular sequence of workflow tasks, called a “workflow execution,” being kicked into action.
- Use the Amazon SWF APIs from your worker machines (a "worker" is a component of your application which handles specific tasks) to establish the task order, manage conditional flows, and execute loops for a workflow execution.
- Use the Amazon SWF APIs from your worker machines to request and execute workflow tasks in the cloud or on premises.
- Monitor the status and progress of workflow executions and their associated tasks in the AWS Management Console.
Amazon SWF is a fully managed workflow service for building scalable, resilient applications. Amazon SWF provides simple API calls that can be executed from code written in any language and run on your EC2 instances, or any of your machines located anywhere in the world that can access the Internet.
Amazon SWF acts as a coordination hub with which your application hosts interact. You create desired workflows with their associated tasks and any conditional logic you wish to apply and store them with Amazon SWF. Each time you execute a workflow, it is considered a distinct workflow execution. You program your application components to request various tasks to be performed in your workflow execution and Amazon SWF coordinates the tasks getting done, in the order you specified, on your hosts (whether the hosts are located in the cloud or on premises). Applications communicate with Amazon SWF using APIs to record success or failure of tasks. Amazon SWF then either continues the sequence of tasks by assigning the next workflow task to an application host, or by re-running a failed task depending on your business logic.
Log in to the AWS Management Console to start an Amazon SWF workflow execution. Alternatively, you can start a workflow execution via our Amazon SWF APIs. Amazon SWF employs a simple web service interface that is easy to use and highly flexible:
- StartWorkflowExecution: starts a sequence of workflow tasks and makes the first task available to one of your application hosts.
- DescribeWorkflowExecution: provides status of your workflow executions and tasks.
- PollForActivityTask: your application hosts (in the cloud or on premises) request and execute workflow tasks in a continuous loop.
- RespondActivityTaskCompleted: an application host tells Amazon SWF that it successfully completed a task. Amazon SWF will then continue the workflow execution by making the next task available to an application host.
- TerminateWorkflowExecution: stop driving a particular workflow execution forward. Amazon SWF will not assign any more tasks of this particular workflow execution to application host.
Your use of this service is subject to the Amazon Web Services Customer Agreement.