Software AG Products 10.7 | Service Development Help | Failure Handling in Flow Services Using the TRY, CATCH, and FINALLY Steps | Limitations for the TRY, CATCH, and FINALLY Steps | Positioning Guidelines and Limitations for TRY, CATCH, and FINALLY Steps
 
Positioning Guidelines and Limitations for TRY, CATCH, and FINALLY Steps
The TRY, CATCH, and FINALLY steps are unique among steps in the webMethods flow language in that they work together as a group and are sensitive to ordering. Unlike other flow steps which may appear in any order without regard for what steps precede of follow them, the TRY, CATCH, and FINALLY steps have ordering requirements.
Keep the following guidelines regarding positioning of the TRY, CATCH, and FINALLY steps in mind:
*A TRY step may stand alone without a following CATCH step and/or FINALLY step. In this configuration, a TRY step behaves exactly like a SEQUENCE step set to exit on failure.
*A TRY step can be directly followed by zero or more CATCH steps.
*A TRY step can be directly followed by zero or one FINALLY step if it is not followed by a CATCH step.
*The CATCH step or group of CATCH steps following a TRY step may be followed by zero or one FINALLY steps.
*CATCH steps and FINALLY steps must be associated with and preceded by an enabled TRY step. CATCH and FINALLY steps that are not preceded by an enabled TRY step are ignored at run time.
*When evaluating the positions of the TRY, CATCH, and FINALLY steps in relationship to each other, Integration Server ignores intervening disabled steps.
*A TRY, CATCH, or FINALLY group may appear at the top-level of a flow services, anywhere in a SEQUENCE, LOOP, or REPEAT step, and inside another TRY, CATCH, or FINALLY step.
*TRY, CATCH, and FINALLY steps cannot be the direct child of a BRANCH step. To use TRY, CATCH, and/or FINALLY steps within a BRANCH step, wrap the steps with a SEQUENCE, REPEAT, or LOOP step.
Designer provides a visual, semantic warning when a TRY step is not followed by a CATCH or FINALLY step or when a CATCH or FINALLY step is not preceded by a TRY step. Specifically, Designer displays in the vertical margin next to the flow step in the flow editor.