Force end workflow

Hello!
I have a structured workflow, which is a sequence of smaller tasks.
My main workflow looks like this:

This how one of tasks looks like:

So, I want the main workflow to end it’s execution at some points of tasks (showed on the picture).
Any option how I can force end the main workflow based on tasks execution result (except sequence of IFs)?

Hi @Dmytro_Biletskyi , an idea to reach your goal, is using the Function node to return an empty items array, that way the next node (either an execute workflow node or other) will not execute.

The same idea applies when the last node of a subworkflow return 0 items, then the next node in the main workflow will stop.

for example; this main workflow, using a mock data first, then executing a workflow (that will always return an empty array items)

Executing this main workflow will always stop in the second node, because there is no more items to use in the 3rd one.
Workflow json:

The workflow used in the second node

Please give it a try and let me know if it helps.

1 Like

Hey @Dmytro_Biletskyi!

Did the above solution resolve your issue? Do let us know if you still need help :slight_smile: