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.

Note: When mediating one-way operations to request-response target operations, it is good practice to set a Log task to capture the response message on the output and fault paths, before the path execution stops at the End Mediation task.
Field Description
Name Assign a name to the task, to identify the task in the mediation flow. This name appears in the tooltip that opens when you hover the cursor over the task icon in the mediation flow.
Description Describe the task briefly. This description appears in the tooltip that opens when you hover the cursor over the task icon in the mediation flow.
End Type Specifies how the End Mediation task exits.
  • Normal stops the mediation flow immediately.
  • Redeliver Message redelivers the message that initiated the mediation flow, re-executing the entire mediation flow.
  • Stop-Redeliver Message stops the redelivery of messages.
  • Signal an Exception generates an exception without enforcing an intent type of either At Least Once or One Way Transaction on the mediation flow and component.