B2B Integration 10.4 | Administering and Monitoring B2B Transactions | Service Development Help | Failure Handling in Flow Services Using the TRY, CATCH, and FINALLY Steps | Normal and Abrupt Completion and Failure of TRY, CATCH, and FINALLY Steps
 
Normal and Abrupt Completion and Failure of TRY, CATCH, and FINALLY Steps
 
Notable Behavior for Abrupt Completion in TRY, CATCH, and FINALLY Steps
The TRY, CATCH, and FINALLY steps can complete normally, complete abruptly, or end with failure.
*Normal completion occurs when the TRY, CATCH, or FINALLY step executes all the way to the end without exit or failure.
*Abrupt completion occurs when the TRY, CATCH, or FINALLY step ends because Integration Server executes a child EXIT step configured to exit from a TRY, CATCH, or FINALLY and signal success. The abrupt completion transfers execution of the flow out of the containing TRY, CATCH, or FINALLY step. Abrupt completion is not a failure.
*Failure occurs when the TRY, CATCH, or FINALLY step executes incompletely due to failure in a child step. Failure is caused by an exception that occurs during service execution or an EXIT step configured to exit the TRY, CATCH, or FINALLY flow step and signal failure.
Because Integration Server treats a set of TRY, CATCH, and FINALLY steps as a unit, how a TRY, CATCH, or FINALLY step completes determines which step Integration Server executes next.
The following table describes how Integration Server proceeds with flow service execution based upon the type of completion for a TRY, CATCH, or FINALLY step.
Flow Step
Completion
Action after flow step completion
TRY
Normal
The TRY step succeeds. Integration Server executes any FINALLY step associated with the TRY step.
Abrupt
Integration Server executes the associated FINALLY step if one exists and then transfers control to the flow step indicated by the Exit from property for the EXIT step.
Failure
Integration Server executes the first matching CATCH step. If there is no matching CATCH step, Integration Server executes the FINALLY step, if one exists. Integration Server propagates the uncaught failure to the parent flow step.
CATCH
Normal
Integration Server discards the caught failure and then executes any FINALLY step associated with the TRY step.
Abrupt
Integration Server executes any FINALLY step associated with the TRY step and then transfers control to the flow step indicated by the Exit from property for the EXIT step.
Failure
The new failure replaces the caught failure as the pending failure. Integration Server executes any FINALLY step associated with the TRY step. Integration Server propagates the new pending failure to the parent of the TRY step. The new pending failure may be caught by a CATCH step that exists at higher level.
FINALLY
Normal
If there is no uncaught failure, the associated TRY step succeeds and service execution continues with the flow step that follows the FINALLY step. If there is an uncaught failure, Integration Server propagates the failure to the parent flow step for error handling.
Abrupt
Integration Server discards any uncaught failure. Service execution continues with the step that follows the step from which the EXIT step is configured to exit. The Exit from property of the EXIT step determines the step from which Integration Server exits.
When the EXIT step configured to exit-on success is executed within a FINALLY step and there is a pending failure, Integration Server discards the failure.
Failure
The new failure replaces any pending failure. Integration Server propagates the new failure to the parent flow step for error handling.

Copyright © 2016- 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release