Break Loop
Usage
The "Break Loop" action in the Control Flow category for Zenphi is used to terminate the execution of a specified loop prematurely. This action is useful when certain conditions are met within a loop, and you no longer need to continue iterating. It helps optimize workflows by avoiding unnecessary iterations, ensuring efficient execution of your processes.
Fields
- Loop
Specify the loop that should be terminated when the "Break Loop" action is triggered. This field requires the loop identifier or name, which is used to uniquely identify the loop in your workflow. For example, if you have multiple nested loops, you can indicate exactly which loop should stop execution.
Demonstration on how to use it in a flow
1.Drag and drop Break Loop action in a loop into the flow.
2.The Name section is pre-filled by the action name but you can configure this section according to your preference.
3.Click the gear icon to open its settings.
- Identify the loop you want to terminate and specify its name or identifier in the Loop field. For example, if you are iterating through a list of emails to process but want to stop the loop upon finding a specific condition (e.g., a critical keyword in the email subject), you would specify the loop managing the iteration. Add this "Break Loop" action within the loop, ensuring it is triggered only under the condition where the loop should terminate. Save and run the workflow to see the action in effect.
Conclusion
The "Break Loop" action is a powerful tool for controlling the flow of your Zenphi workflows by allowing you to stop specific loops prematurely. By specifying the loop to terminate, you can optimize your workflow, preventing unnecessary iterations and ensuring that processes run more efficiently when certain conditions are met.
Updated 24 days ago