IBM BPM, V8.0.1, All platforms > Reference > User interface help reference > Widgets for Process Portal spaces > Administration widgets > Mediation Policy Administration
Learn about mediation policies
Using mediation policies you can dynamically control service interactions, using contextual information. Learn how modules, target services, and mediation policies interrelate.
Mediation policies
Using mediation policies you can dynamically configure service interactions, by overriding the values of module properties. The module properties that you can override are defined in a mediation flow. You define the override values in a mediation policy.
Mediation policies are stored in WebSphere Service Registry and Repository (WSRR), but you can create them using the Mediation Policy Administration widget.
Create modules that can use mediation policies
You use IBM Integration Designer to create modules with a mediation flow. The mediation flow must include a Policy Resolution mediation primitive, which can access mediation policies in WSRR. You define whether the Policy Resolution mediation primitive retrieves mediation policies associated with the module, a target service, or both.
When you create the mediation flow you must include other mediation primitives, that have properties you want to override.
- Use IBM Integration Designer to create a module containing a Policy Resolution mediation primitive. The Policy Resolution primitive must be placed before any primitives that have properties you want to modify.
- Configure the Policy Resolution primitive.
- Specify the WSRR definition to use, or take the default definition.
- Define whether to retrieve mediation policies associated with the module, a target service, or both.
- If you want to use a gate condition, create a Policy condition name that matches the gate condition on the policy. Specify where the condition value is found in the message, by providing an XPath expression.
For example, you could create a Policy condition name of Age and an XPath expression of /body/priceChecker/request/Age. When service requests are processed, the value of condition Age is set from /body/priceChecker/request/Age.
- If you want to associate mediation policies with a target service rather than a module, add an Endpoint Lookup mediation primitive before the Policy Resolution mediation primitive.
- Add other mediation primitives.
- Promote any properties that you want to override dynamically. Only promoted properties can be overridden by mediation policies.
Configure WebSphere ESB or IBM BPM
The application server must contain your module and be aware of the correct WSRR.
- Deploy your module to WebSphere ESB or IBM BPM.
- Ensure that WebSphere ESB or IBM BPM have a suitable WSRR definition for your module.
Configure WSRR
When the Policy Resolution mediation primitive processes service requests, it queries WSRR. Therefore, WSRR must contain the relevant information about your modules and services.
- Load the EAR file, containing your SCA module, into WSRR.
- If necessary, load the WSDL for the target services that you want to use.
Use the Mediation Policy Administration widget
You can use the Mediation Policy Administration widget to create mediation policies and associate them with either modules or target services. In addition, the widget creates policy attachments that associate mediation policies with modules or target services. The mediation policies and policy attachments are created in WSRR.
For every property that you want to override, you add an assertion. The widget refers to the properties that you want to override as assertions. In WSRR, the property overrides are assertions on the policy. If you want to create a conditional mediation policy, add a gate condition. In WSRR, the gate conditions are user properties on the policy attachment.
- When you create a policy attachment using the Mediation Policy Administration widget, the widget creates a single policy attachment and one mediation policy for each group that has an assertion.
- When you delete a policy attachment using the Mediation Policy Administration widget, the widget deletes the policy attachment and any of the mediation policies it attached, unless the policies are being used by a different attachment.
When you use the Mediation Policy Administration widget to attach mediation policies to target services, you can attach the policies at the following levels:
- Service
- Endpoint
- Operation