You can control message flows using mediation policies,
and associated conditions.
Before you begin
Read the mediation policies scenario which provides an overview
of mediation policies, and explains how the integration developer,
the runtime administrator, and the WSRR administrator must work together.
About this task
If your goal is to use context information to control the
behavior of service requests, you can achieve this by using mediation
policies stored in WebSphere® Service
Registry and Repository (WSRR).
You can use mediation policies
on either the request flow or the response flow, or both. Mediation
policy information obtained on the request flow can be propagated
to the response flow.
To help the explanation of mediation policies
an example application is referred to. The example application is
a ticket discount system in which the discount applied depends on
the mediation policy used. The request flow extracts discount policies,
based on the age of the traveller, and the service provider supplies
the cost of a standard ticket for the journey. The response flow calculates
the overall cost to the traveler, based on the discount supplied by
the mediation policy.
Figure 1. Actor (service requester) and system
(ESB)
To control the results of a mediation flow by using mediation
policies, complete the following steps.
Note: these steps provide
an overview, they do not include all instructions for creating a complete mediation module or
a WSRR registry. You should refer to the product documentation for
these instructions.
Results
When a service request invokes your
mediation module ,
the service request causes the registry to be queried. If suitable
mediation policy information (dynamic property values) is returned,
it is kept for the response flow. The service is then invoked and
it sends a response. During the processing of the response flow, the
mediation policy information is used to override the response values.
Therefore, the response that the service requester receives depends
on the context of the message.