Hey,
I’m facing a problem with $.flow.exit(). I seems that it stops only the curent step and not aborting the whole workflow. Is it a feature or a bug ? And how can I abort the execution of the following steps (see picture).
Thanks in advance !
Hey,
I’m facing a problem with $.flow.exit(). I seems that it stops only the curent step and not aborting the whole workflow. Is it a feature or a bug ? And how can I abort the execution of the following steps (see picture).
Thanks in advance !
If you want to abort the workflow with an error, you can just throw new Error('message');
in a Node.js code step.
If you want to abort the workflow without error, use a boolean variable + a filter step.
@ag any chance that’s a replayed event that you’re looking at? I might’ve seen a bug with surfacing stale step results under certain circumstances, but return $.flow.exit()
should definitely end the workflow execution and not just the step (I just verified in a workflow).
Hello Danny,
With your message I have actually found the problem.
I just used $.flow.exit()
and it stopped the step but not the flow.
But I did it as it was in you message (with returning the result) return $.flow.exit()
and it actually stopped the whole flow.
Thanks !
AG