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 | About Failure Handling in Flow Services | What Happens When a Failure Occurs? | com.wm.lang.flow.FlowException versus com.wm.lang.flow.Failure
 
com.wm.lang.flow.FlowException versus com.wm.lang.flow.Failure
Prior to Integration Server version 10.3, the webMethods flow language used FlowExceptions (com.wm.lang.flow.FlowException) to indicate one of the following:
*Failure of a flow service due to a flow definition error, such as exiting from a label that does not exist.
*Execution of an EXIT step configured to exit the flow service (the Exit from property is set to $flow) and signal failure.
*Execution of an EXIT step configured to exit the parent flow step (the Exit from property is set to $parent) and signal failure at the top level of the flow service.
*Execution of an EXIT step configured to exit the parent (the Exit from property is set to $parent) and signal failure in a nested statement that is not intercepted by a SEQUENCE step configured to exit on done.
These were the only situations in which the flow engine instantiated an exception.
Beginning with Integration Server 10.3, the flow language includes the ability to instantiate an exception with an EXIT step configured to signal failure when exiting a parent flow step. Here, a parent flow step means any ancestor step to the EXIT step. By default, the exception is of type com.wm.lang.flow.Failure. However, the EXIT step can be configured to throw another type of exception. Exceptions thrown by the EXIT step can be caught and handled.
The introduction of a new type of exception (com.wm.lang.flow.Failure) makes it possible for the flow service author to differentiate between fatal failures that terminate an invoked flow service and failures caused by an EXIT step configured to exit on failure.
For more information about using the EXIT step in TRY, CATCH and FINALLY steps, see EXIT Step Considerations in TRY, CATCH, or FINALLY. For more general information about the EXIT step, see The EXIT Step.