Nilvees
Nilvees6d ago

Breaking the loop and triggering the next loop

If a node encounters an error in the loop, can I trigger it to break the current iteration and proceed with the next loop for the next object?
3 Replies
AI Support
AI Support6d ago
AI Support Bot Information
<@459421296762028045> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human! Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers. Please note: Team members will review and answer the questions on best efforts basis.
AI Support
AI Support6d ago
AI Response
Yes, you can manage the behavior of a node in a loop when it encounters an error using the "On Fail" feature in BuildShip. This feature allows you to define specific behaviors for nodes in case of a failure: 1. Retry: The system can automatically attempt the node logic again within specified intervals. 2. Terminate: The entire workflow is terminated if the specific node fails. 3. Custom Flow: You can create a custom sub-workflow to execute if a node fails, allowing you to handle the error and potentially continue with the next iteration. To enable the "On Fail" feature in a node: 1. Open the Node Menu for the desired node. 2. Click on "Add On Fail" to append an On Fail behavior section to the node. 3. Choose the desired On Fail behavior (Retry, Terminate, or Custom Flow). This setup allows you to manage errors effectively and proceed with subsequent iterations in your loop. For more detailed information, you can refer to the Node Failure handling documentation.
BuildShip AI Support
Gaurav Chadha
Gaurav Chadha14h ago
Hi @Nilvees currently break and continue is not supported directly in loop, we'll be adding this in near future, for now you may try to add a branch inside the loop, and place the nodes you wanna skip inside one of the paths. If the condition is true, those nodes will run, if it's false, the empty path is taken and they're skipped.

Did you find this page helpful?