Mediation Tasks

You can place mediation tasks on input, output, or fault paths, to perform business logic required by your application.

For example, if the schema of the input message of your mediation operation does not match the schema of the input message of the target operation, you can use a Transform task to change the schema to the desired format.

The Mediation Flow Editor includes a variety of mediation tasks:

  • Invoke Operation: Enables you to invoke an operation of an interface in the target interface list during processing of an input, output, or fault path. For example, you can invoke an operation on the input mediation path and use the data in the reply message in subsequent tasks in the input path before the mediation flow invokes the specified target operation. For more information, see Invoking an Operation.
  • Query Database: Performs a SQL SELECT statement on a database. The task can specify one or more tables in the FROM clause of the SELECT statement, one or more columns to return in the SELECT list, and one or more conditions in the WHERE clause. Optionally, you can specify the maximum number of rows to return. For more information, see Querying a Database.
  • Transform: Takes information from the mediation exchange (described in Mediation Exchange on page 10) and changes it to the appropriate format. For more information, see Transform Tasks.
  • Parse XML: Used when you have an XML document stored in a string or binary field. This task produces a tree representation of the XML that can be used by subsequent tasks in the mediation flow. This task can be paired with the Render XML task to convert the parsed XML back into a string or binary field for transmission within a message. For more information, see Parse XML.
  • Render XML: Converts an XML tree for a specified schema to a string or binary element that contains the XML document. This task can be paired with the Parse XML task to convert the parsed XML back into a string or binary field for transmission within a message. For more information, see Render XML.
  • Validate XML: Provides validation of XML messages using an XML Schema that is configured at design-time or specified dynamically at runtime. Validation errors may be caught and handled in the current flow path, or handled by the fault catch mechanism. For more information, see Validate XML.
  • Set Exchange Variable: Sets the value of the items within the exchange variable. The Input tab of the Set Exchange Variable task is a mapper panel that enables you to set the exchange variable for the currently selected operation. For more information, see Setting the Exchange Variable, and Set Exchange Variable.
  • Route and XPath Route: Route tasks enable you to specify more than one potential destination for messages sent by a mediation operation. The message is sent to the appropriate target operation based on criteria you specify. In Route tasks, the criteria for routing conditions are simple comparison operations. XPath Route tasks are similar to Route tasks, but you can specify more complex criteria for routing conditions. For more information, see Routing Messages in a Mediation Flow.
  • Throw Fault: Stops processing in the current mediation flow and transfers control to the fault path. This task is useful if a mediation operation is deprecated and you want to return a fault to the requestors of the operation. This task is also useful if you want to specify fault conditions for Route or XPath route tasks. For more information about faults and the Throw Fault task, see Fault Processing in a Mediation Flow.
  • Generate Reply and Handle Reply: In some situations, you might want to send a reply message to a consumer without invoking the target operation. The Generate Reply and Handle Reply tasks enable you to bypass the target operation and send reply messages to the consumer directly from the mediation flow. For more information, see Replying to Messages.
  • End Mediation: Ends a one-way (in-only) message exchange pattern for operations that don’t involve a response. End Mediation includes a message re-delivery feature, so that you can request that a message be re-delivered if it encounters a fault during processing. For more information, see End Mediation.
  • Set Dynamic Reference: Provides the values needed for resolving a service provider in a dynamic target interface. Each Set Dynamic Reference task sets the value of the service provider for the specified dynamic target interface. The value is then used by the next service invocation that refers to that dynamic target interface. For more information, see Set Dynamic Reference Task.
Note: You can extend the functionality of mediation flows by creating your own Custom tasks. For more information, see Custom Mediation Tasks.