> For the complete documentation index, see [llms.txt](https://gitbook.nicacton.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.nicacton.com/cloud-computing/aws/application-services/simple-work-flow-swf.md).

# Simple Work Flow (SWF)

Orchestration for coordination and management of activity execution.

## Essentials

* Fully-managed "workflow" orchestration service provided by AWS
* A workflow allows an architect/developer to implement distributed, asynchronous applications as a work flow
* A workflow coordinates and manages the execution of activities that can be run asynchronously across multiple computing devices
* SWF has consistent execution
* Guarantees the order in which tasks are executed
* There are no duplicate tasks
* The SWF service is primarily an API which an application can integrate it's workflow service into. This allows the service to be used by non-AWS services, such as an on-premise data center
* A workflow execution can last up to 1 year!

### Components

* Starter: Starts the workflow
* Workflow: A sequence of steps required to perform a specific taskk.
  * A workflow is also commonly referred to as a decider
* Activities: A single step (or unit of work) in the workflow
* Tasks: What interacts with the "workers" that are part of a workflow
  * Activity task - tell the worker to perform a function
  * Decision task - tells the decider the state of the work flow execution, which allows the decider to determine the next activity to be performed
* Worker: Responsible for receiving a task and taking action on it
  * Can be any type of component such as an EC2 instance, or even a person.

### AWS Flow Framework for Java

* Simplifies working with SWF by providing objects and classes

DO the sample workflow in the AWS Console!
