1 Sequence ‘Main’ (exit on done)
1.1 Sequence ‘Try’ (exit on success)
1.11 Business Logic
1.12 Business Logic
1.13 Exit Sequence ‘Main’
1.2 Sequence ‘Catch’
1.21 Exception Handling
1.22 Exit Sequence ‘Main’
In this, if sequence 1.1 completes normally, then step 1.13 enacts and the flow is exited. If, for example, 1.12 fails, then the process exits 1.1, but since ‘Main’ requires completion the process proceeds to 1.2, where the exception handling stuff is placed.
Gamad–the flow you outlined looks just like the try/catch handling recommended in the wM GEAR docs. That is what I’ve used with success throughout the projects I’ve worked on.
Matthew–I assume that in 1.1 you meant to type (exit on failure). If you have exit on success, if step 1.11 succeeds the sequence will exit, skipping over 1.12 and 1.13. Set 1.1 to exit on failure and you can dump step 1.13. You can also dump step 1.22 as it is essentially a no op.
Also, in 1 it’s usually set to EXIT ON SUCCESS so that the catch block doesn’t get executed upon a successful ‘try’ block. The Catch is usually EXIT ON DONE so that each step within the catch will be attempted.