End Mediation
The End Mediation task ends a one-way (in-only) or a Request-Response (in-out) message exchange pattern operation.
One-way operations provide a way for service consumers to initiate operations for which they won’t receive a response—the End Mediation task is an orderly way to end the mediation execution. For example, you can log the operation's input data using the Log task and then terminate the input path of the mediation operation with an End task.
The End Mediation task can be also configured for both in-only operation and in-out operation to signal the framework to redeliver the request message or stop re-delivery of the request message.
The mediation input path of a one-way message exchange pattern operation can contain other mediation tasks before terminating with the End Mediation task. However, if any of the other tasks in the mediation input path produces a fault at run-time, this will terminate the execution of the mediation input path and transfer control to the mediation fault path. No reply is sent to the consumer, because the fault path also terminates with an End Mediation task.
You can mediate a one-way (in-only) message exchange pattern operation to a request-response (in-out) target operation. Although the mediation input path operation in this case is similar to that of a mediation flow containing a one-way operation to a request-response target operation, the behavior in the output and fault paths are different.
When mediating a one-way operation to a request-response operation, the target operation can either return a reply or throw a fault; Mediation Flow automatically terminates both with an End Mediation task:
- If the target operation returns a reply, the output path is executed and the path is terminated by the End Mediation task without sending a response to the requestor.
- If the target operation returns a fault, the target fault path is executed and the path is terminated by the End Mediation task without sending a fault to the requestor.
For a in-only message exchange pattern operation, if the end task is configured with either a Redeliver Message or Stop redeliver message option, an intent type of either At Least Once or One Way Transaction has to be defined for the mediation interface.
For a in-out message exchange pattern operation, if the end task is configured with either a Redeliver Message or Stop Redeliver Message option, an intent type of At Least Once has to be defined for the mediation interface.