The lifecycle of a Live Flow Session
There are 5 main statuses of the session lifecycle:
- Ready
- Running
- Waiting For user input
- Finished
- Failed
1. Triggering a live flow
When triggering a live flow, a session is created with the Ready status.
At this stage you will can pass in a payload of data for the INPUTS variable if used by your live flow.
The status will automatically transition into Running soon afterwards.
2. Running Session
Once the session is running, it will start computing the live flow step by step until it reaches a User Input node, completes all the steps successfully or crashes on a step.
3. Waiting For User Input
TrueState Live flows supports interaction from the end user while a session is running.
When a User Input node is reached by the session, it's status becomes Waiting for User Input. At this point the session will not proceed until input has been provided via the api.
Once provided the session will transition back into Running.
4. Finished
Once all the steps have been processed, the session will transition into Finished and won't be updated again.
5. Failed
If there are any errors at all throughout, the session will transition into Failed and won't be updated again.
The error will available in the session object however a properly built Live Flow should never have any errors for any given invocation, hence they can be used for debugging purposes but shouldn't be exposed to the end user.