Flow Controls provide the ability to control the flow of execution from inside a piece. By using the ctx parameter in the run method of actions, you can perform various operations to control the flow.
You can stop the flow and provide a response to the webhook trigger, This can be useful when you want to terminate the execution of the piece and send a specific response back.Example with Response:
You can pause or delay the flow until a specific timestamp. Currently, the only supported type of pause is a delay based on a future timestamp.Example:
These flow hooks give you control over the execution of the piece by allowing you to stop the flow or pause it until a certain condition is met. You can use these hooks to customize the behavior and flow of your actions.