This documentation is for WSO2 Enterprise Integrator version 6.1.1 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

All docs This doc
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Message mediation mode is one of the operational modes of the ESB profile where the ESB profile functions as an intermediate message router. When operating in this mode, it can filter, transform, drop or forward messages to an endpoint based on the given parameters. A unit of the mediation flow is a mediator. Sequences define the message mediation behavior of the ESB profile. A sequence is a series of mediators, where each mediator is a unit entity that can input a message, carry out a predefined processing task on the message, and output the message for further processing. 

What is debugging with respect to mediation

Debugging is where you want to know if these units, which function as separate entities are operating as intended, or if a combination of these units are operating as a whole as intended. The ESB profile packs the Mediation debugger that enables you to debug the ESB profile message mediation flow in the server. Tooling support for the Mediation debugger is provided by the WSO2 EI Tooling Plugin.

Creating the artifact

Follow the steps below to create a sample the ESB profile artifact, to which you apply mediation.

  1. Install the WSO2 EI Tooling Plugin and run it. For instructions, see Installing Enterprise Integrator Tooling. 
  2. Create the ESB profile artifact using the WSO2 EI Tooling Plugin. For instructions, see Managing Integration Flows via Tooling. 
  3. Deploy the artifact you created on the ESB profile. For instructions, see Packaging your Artifacts into Composite Applications.

Enabling mediation debugging 

Follow the steps below to enable debugging with respect to mediation.

  1. Click Run in the top menu of the WSO2 EI Tooling Plugin, and then click Debug Configurations.
  2. Double click EI Mediation Debugger as shown below.
    add debugging configuration
  3. Enter the details to create a new configuration as shown in the example below. You need to define two port numbers and a hostname to connect the ESB proflie with the WSO2 EI Tooling Plugin in the mediation debug mode.
    new configuration
  4. Execute the following command to s tart WSO2 EI server in the debug mode by passing a system variable at start up:    sh -Desb.debug=true
  5. Click Debug in the WSO2 EI Tooling Plugin when  the Console indicates the following.

    You have approximately a one-minute time span to connect the WSO2 EI Tooling Plugin with the EI server for the execution of the above created debug configuration. Otherwise, the EI server will stop listening and start without connecting with the debugger tool.

    Console of ESB

  6.   In the WSO2 EI Tooling Plugin, right click and add breakpoints or skip points on the desired mediators to start debugging as shown in the example below. 

    add breakpoints

    You can add the following debugging options on the mediators using the right click context menu.

    • Toggle Breakpoint: Adds a breakpoint to the selected mediator
    • Toggle Skip Point: Adds a skip point to the selected mediator
    • Resend EI Debug Points: If you re-start the the ESB profile, or if you re-deploy the proxy service after changing its Synapse configuration, you need to re-send the information on breakpoints to the WSO2 EI server. This re-sends all registered debugging points to the EI Server.   
    • Delete All EI Debug Points: Deletes all registered debug points from the EI Server and the WSO2 EI Tooling Plugin

Information provided by the Debugger Tool

When your target artifact gets a request message and when the mediation flow reaches a mediator marked as a breakpoint, the message mediation process suspends at that point. A tool tip message of the suspended mediator displays the message envelope of the message payload at that point as shown in the example below


You can view the message payload at that point of the message flow also in the Message Envelope tab as shown below.

Message Envelope view

Also, you can view the message mediation properties in the Variables view as shown in the example below.

Variables view displaying the properties

The Variable view contains properties of the following property scopes.

  • Axis2-Client Scope Properties

  • Axis2 Scope Properties

  • Operation Scope Properties

  • Synapse Scope Properties

  • Transport Scope Properties

You can have a list of selected properties out of the above, in the properties table of the Message Envelope tab, and view information on the property keys and values of them as shown below.

view property table

Click Add Property, specify the context and name of the property, and then click OK, to add that propert to the properties table in the Message Envelope tab as shown below.

Click Clear Property, to remove a property from the properties table.

add a new property to the properties table.

Changing the property values

There are three operations that you can perform on message mediation property values as described below.

Injecting new properties

Follow the steps below to inject new properties to the ESB profile server while debugging.

  1. Right click on the Variable view, click Inject/Clear Property, and then click Inject Property as shown below.
    inject property menu
  2. Enter the details about the property you prefer to add as shown in the example below.
    enter new property details
  3. Click OK.

Clearing a property

Follow the steps below to clear an existing property from the the ESB profile.

  1. Right click on the Variable view, click Inject/Clear Property, and then click Clear Property as shown below.
    inject property menu
  2. Enter the details about the property you want to clear as shown in the example below.
    clearing a property
  3. Click OK.

Modifying a property

Click on the value section of the preferred property and change the value in the Variable view as shown in the example below, to modify it.

modifying the value of a property

Viewing wire logs

You can view wire logs at the entry point of the ESB profile, while debugging a Synapse flow. For example, you can view wire logs of the incoming flow and the final response of a proxy service. Also, you can view wire logs for points, where it goes out from the ESB profile. For example, you can see the outgoing and incoming wire logs for specific mediators (i.e. Call mediator, Send mediator etc.). 

Viewing wire logs of a specific mediator

You need to put a debug point to the mediator, to view wire logs of it. When debugging is finished (or while debugging), right click on the mediator, and click Show WireLogs, to view wire logs for a specific mediator.

You can only view wire logs for a whole proxy service, call mediator, send mediator, or other API resources. However, you cannot view a wire log of a Synapse config (e.g. sequences), because there would not be anything written to wire, when the flow comes to the sequence etc. Hence, you can only view them in wire entry points.

click show wire logs option

Viewing wire logs while debugging

If you view wire logs while debugging, you view only the wire logs of mediators, whose execution is already completed as shown in the example below.

view wire logs while debugging

Viewing wire logs of a mediator after debugging execution of it

When you view wire logs of a mediator (e.g. send mediator) after debugging, you can view the request and response wire logs as shown in the example below.

view wire logs of a mediator after debugging

Viewing wire logs of a proxy service after debugging 

If you view wire logs of a proxy service after debugging finished, you view the request wire log and final response wire log of that proxy as shown in the example below.

view wire logs of a proxy after debugging

  • No labels