Designer 10.7 | webMethods Service Development Help | Failure Handling in Flow Services Using the TRY, CATCH, and FINALLY Steps | Limitations for the TRY, CATCH, and FINALLY Steps | CATCH Step Considerations
 
CATCH Step Considerations
The CATCH step contains logic that Integration Server executes when the associated TRY step fails. In combination, the CATCH step properties Failure and Selection determine which failures the CATCH step handles.
Keep the following information in mind when setting the Failure and Selection properties:
*The Selection property indicates that the CATCH step handles all of the failures included in the Failures property (INCLUDE) or all failures except those listed in the Failures property (EXCLUDE).
*The Failures property specifies failures using the class name of the exception.
*If a failure name contains any of the following characters, Integration Server treats the value as a Java regular expression: \ { } ( ) [ ] ^ $ or *, .
Even though . (period) is a regular expression character, Integration Server treats a failure name that contains . but none of the other special characters like a String rather than a pattern. To force Integration Server to treat a name containing . and no other special characters as a regular expression pattern, escape the . using a \ (backslash).
*If the Failures property of a CATCH step is left empty, the CATCH step will handle the last failure thrown regardless of what it is.
*When a CATCH step is configured to handle multiple failures, executing the built-in service pub.flow:getLastFailureCaught can be used to determine which failure the CATCH step is handling at run time. The service returns the class name, associated Exception instance, and any message associated with the failure.
*Exiting a CATCH step by using an EXIT step configured to exit from $parent and signal failure terminates the CATCH step and establishes a new pending failure.