Use the Fail mediation primitive to stop a mediation flow, and generate an exception.
The Fail mediation primitive halts a mediation flow and raises an exception. The Fail mediation primitive allows you to raise an exception at a point you choose in the flow. It also lets you add information about a failure.
The Fail mediation primitive has one input terminal. The input terminal is wired to accept a message that triggers a FailFlowException. You can wire the output terminal of another mediation primitive to the input terminal of a Fail mediation primitive, to cause a FailFlowException.
You can use the Fail mediation primitive to define your own error conditions, based on the business logic of the flow.
You can use the Error message property to provide an additional error message that is specific to your business logic or domain. The Error message you create is added to the automatically generated exception.
You can use the Fail mediation primitive to roll back a global transaction under certain conditions. For example, if you wire an output terminal of a Message Filter mediation primitive to a Fail mediation primitive, then the transaction is rolled back if the filter condition occurs.
Property | Valid Values | Default |
---|---|---|
Error message | String |