WebSphere

Dynamic properties and mediation policies

Dynamic properties can be overridden, at run time, using mediation policies.

Introduction

Any property that you promote on a mediation primitive is also a dynamic property. Dynamic properties can occur in a request, response, or fault flow; they can be overridden, at run time, using mediation policies in a registry. Although you can override promoted properties dynamically, you must always specify a valid default value.

Promoted properties have a group name, an alias name, a type, and value: all of which you can set from WebSphere® Integration Developer. Multiple promoted properties can be given the same alias name if they are of the same type. You can see the promoted properties on the runtime administrative console, and you can set the property values administratively.

When you use mediation policies, the property group name is used to construct the mediation policy namespace, and the alias name must map to an assertion name in the mediation policy. For example, suppose a property has an alias name of beforeRequestTransform and a group of stockQuoteGroup. The mediation policy refers to the property with the name beforeRequestTransform, and uses the group stockQuoteGroup as the namespace of the mediation policy assertion.

Note: If mediation primitives occur in subflows, the mediation primitive properties need to be promoted to the top level request, response, or fault flow in order to be modified dynamically.

SMO context

After mediation policy information has been retrieved from the registry, the run time stores it in the dynamicProperty context of the service message object (SMO). The information in the dynamicProperty context can be used to override the values of promoted properties that come later in the flow.

The dynamicProperty context is a system-defined context object; therefore, WebSphere Integration Developer defines the structure. For every dynamic property, the dynamicProperty context includes the group name, the property name, the property value, and the property type.
Table 1. Elements of the dynamicProperty context
Element Value Description
group String The group name of the property to be overridden.
name String The alias name of the property to be overridden.
value String The value to be used.
type String The property type.

How to override properties

If you want to override a property dynamically you must take the following steps:
  1. From WebSphere Integration Developer:
    1. Promote the property you want to override.
    2. Set the elements of the property. Pay particular attention to the group and the alias name.
    3. Add a Policy Resolution mediation primitive to your mediation flow. Add it before the mediation primitive whose property you want to override.
    4. Export the EAR file containing your Service Component Architecture (SCA) module.
  2. From WSRR:
    1. Import the EAR file containing the SCA module. This adds the Service Component Architecture (SCA) module to your registry.
    2. Create a suitable mediation policy and attach it to your SCA module. Refer to alias name of your property.
  3. From the administrative console:
    1. Import the EAR file containing the SCA module.
    2. Ensure that the server is using the correct registry instance.

When available, the mediation policy values take precedence at run time. If a mediation policy is not found, or is unsuitable, the run time uses the promoted property values shown on the administrative console.

If the dynamic override fails for a particular mediation primitive, the fail terminal of that mediation primitive is fired. A dynamic override can fail for a number of reasons. For example, if you try to override the XSL stylesheet of the XSL Transformation primitive, but the stylesheet cannot be found at run time.


reference Reference topic

Terms of use | Feedback


Timestamp icon Last updated: 20 June 2010 00:40:04 BST (DRAFT)


http://publib.boulder.ibm.com/infocenter/dmndhelp/v6r2mx/topic//com.ibm.wbit.help.medprim620.doc/ref/rwesb_policydynamicprops.html
Copyright IBM Corporation 2005, 2010. All Rights Reserved.
This information center is powered by Eclipse technology (http://www.eclipse.org).
iDoc on