# Simple Work Flow (SWF)

## 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!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook.nicacton.com/cloud-computing/aws/application-services/simple-work-flow-swf.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
