---
title: "Flow"
slug: "flow"
abstract: "Overview and properties for the Flow Object and the Task Object."
---
# Flow

The Flow Object contains the state of the Flow. It actually consists of three parts:

- The Tasks that need to be performed, along with their dependencies and parameters.
- The state of which Tasks are completed, waiting or failed.
- The property bag used to communicate between Tasks and Actions.

The object returned by the [Flow Resource](https://doc.sitecore.com/ch/en/developers/cloud-dev/flow-1523374.html "Flow") wraps the Flow object with the following properties:

| Name | Type | Description |
| --- | --- | --- |
| `self` | Link | A link to this Flow resource |
| `flow` | Object | The actual Flow object |

## The Actual Flow Object

The actual Flow object has the following properties:

| Name | Type | Description |
| --- | --- | --- |
| `tasks` | Object | Contains a dictionary of all Task objects that need to be completed or failed before the Flow is considered to be completed. |
| `properties` | Object | Contains the property bag with all the properties read and written by the Actions and the Tasks to pass information. |
| `completed_tasks` | Array | Contains the names of the Tasks that have been completed. |
| `waiting_tasks` | Array | Contains the names of the Tasks that are waiting for a result from a third party service |
| `failed_tasks` | Object | Contains a dictionary of all the Tasks that have failed, along with the error message that was captured. |

File data is handled by the File Provider, and the file keys are exchanged as properties in the property bag.

## The Task Object

A Task object has the following properties:

| Name | Type | Description |
| --- | --- | --- |
| `type` | String | The name of the Task Handler responsible for processing this Task. |
| `deps` | Array | Optional. The names of the Tasks that this Task has a dependency on. This Task will not be processed until all of the dependencies have been completed. Should any of the dependencies fail, then this Task will automatically fail. |
| `do_yield` | Boolean | Optionally, indicates that after this Task has been completed, the Agent should yield the Flow, allowing other Agents to proceed. |
| `do_update` | Boolean | Optionally, indicates that after this Task has been completed, the Agent should update the Orchestrator on the intermediary state of the Flow before continuing with the next Task. |

Other properties on the Task object will be the parameters, depending on the Task type.