I am looking for a way to end a sequence and not continue with the other processes after a certain validation, is there any activity besides “throw” that allows me to do this? I am looking for something more similar to a break but without being exclusive for activities of type “For each”.
There is also Terminate Workflow but that processes similar to Throw and essentially results in an error being generated.
If you want it to stop running but stop more gracefully you’ll need to build your project with a Flowchart. After your Sequence, you use a Flowchart Decision and (for example) send True to the next Sequence to keep processing, and False to a “end process” Sequence that either does some final steps or nothing at all.
Another option is to use a Try/Catch and a Throw…
- do something on error
If the first Throw is executed then this entire segment will immediately jump down to the Catch portion. The second Sequence will not be processed.
Got it tsm!!
The Try/Catch method is what I use when I have a long step by step process that needs to stop if an undesired result is encountered during one of the steps. For example, I use it for validation of input parameters…
Inside one of those sub-sequences looks like this…
So if cfg_QueueName wasn’t provided, there’s no need to try to validate any of the rest of the parameters. Just jump to the end (the Catch) and do something (in this example it sends an email to admins and then Terminates Workflow so it shows as faulted in Orchestrator).
that really helps, thank you very much!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.