Software AG Products 10.7 | Integrating On-Premises and Cloud Applications | Service Development | Failure Handling in Flow Services Using the TRY, CATCH, and FINALLY Steps | Overview of Building the TRY, CATCH, and FINALLY Steps
 
Overview of Building the TRY, CATCH, and FINALLY Steps
The TRY, CATCH, and FINALLY steps provide flow service authors with the ability to execute a group of flow steps, optionally catch any failures that occur in that group, and then perform any cleanup logic. When adding the TRY, CATCH, and FINALLY steps to a flow service, decide which usage pattern you want to use. This can be a TRY-CATCH, a TRY-FINALLY, or a TRY-CATCH-FINALLY.
In general, before adding the TRY, CATCH, and/or FINALLY steps to a service, consider the following:
*Identify the logic for which you want to provide exception handling. The flow steps for this logic belongs in the TRY step.
*Decide whether you want to handle exceptions and if so, which ones. CATCH steps can handle all exceptions or specific exceptions. If the service handles exceptions, what recovery logic or logging needs to be added?
*Identify any cleanup logic that you want the service to perform. That is, decide if you need to include a FINALLY step.