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 wraps the Flow object with the following properties:
|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:
|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:
|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.
Can we improve this article ? Provide feedback