WebSphere

This information applies to feature pack. To use what is described, you must have installed the optional feature pack Module Properties and Policies

Use the Module Properties and Policies widget to list all the promoted properties and policies defined for a module. Promoted properties can be modified at run time and do not require a server restart. Policies can be created and deleted.

The Module Properties and Policies widget interacts with the Module Browser widget and the Module Administration widget.

Module properties

The Module Properties and Policies widget lists the following information for each property:
  • Group Name: The group to which the property belongs. By default, the group name is the name of the mediation flow component. This value is read-only.
  • Property Name: The alias name of the property. The alias name identifies the property in the mediation flow. This value is read-only.
  • Type: The type of data accepted for the property (for example, Boolean, string, or integer). This value is read-only.
  • Value: The current value defined for the property. You can edit this value and have the change take effect immediately in the run time. Note that if you enter an incorrect value (for example, a string when the property requires an integer) the Module Properties and Policies widget displays an error message and prevents you from saving the change.

Using the widget to work with module properties

Important: In a deployment environment, make sure the deployment manager and node agent are running before using the Module Properties and Policies widget.

Select Module Properties from the Module Browser widget to display a list of all promoted properties defined for the module. Optionally, use the icons after each column heading in the table to sort the entries in ascending (^) or descending (v) order.

To modify module properties, edit the value in the property's Value field and then click Save. Generally, mediation flows use property changes immediately, unless the changes occur in a deployment manager cell. If you have a deployment environment, the deployment manager must be running before you can save changes. The node agent must also be running; changes take effect on each node in the cell after that node has been synchronized. Mediation flows that are in-flight at the time of the property value change continue to use previous values.

Module policies

The Module Properties and Policies widget displays the following information:
  • Module: The name of the module you are working with.
  • WSRR definition used: Initially, the default IBM® WebSphere® Service Registry and Repository (WSRR) definition. If you have more than one WSRR definition, make sure you select the definition used by your module.
  • Policy Attachment Name: If policy attachments exist for the WSRR you have selected, they are displayed. Policy attachments associate a policy with a module (in WSRR, the policy and policy attachment are separate). You can use the icon after the Policy Attachment Name heading to sort the entries in ascending (^) or descending (v) order.
After you select a particular policy attachment, the Module Properties and Policies widget displays the following information:
  • Assertions: The module properties that the policy can override. In WSRR, the module properties appear as policy assertions.
    • Group Name: The group to which the property belongs. By default, the group name is the name of the mediation flow component.
    • Property Name: The alias name of the property. The alias name identifies the property in the mediation flow.
    • Value: The current value in the policy, rather than the current value in the module. When available, the policy value takes precedence at run time. If a policy is not found, or is unsuitable, the run time uses the promoted property value.
  • Gate Conditions (Optional): Conditions that must be met before the policy can be used. In WSRR, gate conditions are user properties on the policy attachment object.
    • Name: The name of a gate condition is always prefixed with the string medGate_.
    • Value: The value of the gate condition, for example, country = "France" or Age > 59.

For further information on policies, see: Related information.

Using the widget to create module policies

You can use the Module Properties and Policies widget to create new policies and policy attachments, for the module you are working with. You must choose to override one or more module properties, by adding assertions. Optionally, you can create gate conditions for the policy.
Note: Using the Module Properties and Policies widget, you cannot edit policy information after you have created the policy. However, you can delete and then recreate policies.
  1. Select Module Policies from the Module Browser widget. The Module Properties and Policies widget is refreshed; if there are existing policy attachments they are displayed.
  2. If you have more than one WSRR definition, then select the definition used by your module.
  3. Enter the name of the new policy attachment.
  4. Click Create.
  5. Select a Group name.
  6. Select a Property name.
  7. Enter a suitable value in the Value field. For example, All or 10 or /body/input/address.
  8. Click Add Assertion. In WSRR, the module properties that you want to override appear as policy assertions.
  9. Optionally, create a gate condition. Using the Module Properties and Policies widget, you can only create a gate condition when you create the policy and policy attachment.
    1. Enter a gate condition name in the Gate condition name field.
    2. Enter a gate condition value in the Value field. The gate condition value is made up of the following parts: policy condition name, operation and gate value. The policy condition name you enter at this point, must map to a Policy condition name in the module. The operation can be any of the following: = , != , > , < , <= or >= . The gate value is the value being compared. If the gate value is a string, it should be delimited using single or double quotes, for example, country = "France".
    3. Click Add Gate Condition.
  10. Click Save. In WSRR, a single policy attachment is created and one policy for each group that has an assertion. If you added a gate condition, then WSRR creates a user property on the policy attachment; the user property represents the condition.

Using the widget to display module policies

You can use the Module Properties and Policies widget to display the policies that are attached to your module.
  1. Select Module Policies from the Module Browser widget. The Module Properties and Policies widget is refreshed and, if there are existing policy attachments they are displayed.
  2. If you have more than one WSRR definition, then select the definition used by your module.
  3. Click the pencil icon of the policy attachment that you want to work with. Each policy attachment row has a pencil icon, at the end of the row, that you can click to view policy information.

Using the widget to delete module policies

You can use the Module Properties and Policies widget to delete policy attachments and associated policies.
  1. Select Module Policies from the Module Browser widget. The Module Properties and Policies widget is refreshed and, if there are existing policy attachments they are displayed.
  2. If you have more than one WSRR definition, then select the definition used by your module.
  3. Click the delete icon of the policy attachment that you want to delete. Each policy attachment row has a cross icon, at the end of the row, that you can click to delete the policy and policy attachment. You are asked if you want to delete the policy attachment.
  4. Click OK. In WSRR, the policy attachment is deleted. Any associated policies are also deleted, unless they are being used by another attachment.

Related information

You can control service requests dynamically, by using policies that allow you to override module properties at run time. Such policies are sometimes referred to as mediation policies. You can define one or more policies for your module, and each policy can override one or more module properties. Optionally, you can create one or more gate conditions on each policy attachment. At run time, gate conditions are compared to the condition values in the message; all of the gate conditions must be met before an associated policy can be used. Whether property values are overridden for a particular service interaction depends on the message being processed and the Mediation policy processing model defined in the information center.

Before you use the Module Properties and Policies widget to create policies, you must use WebSphere Integration Developer to create a module that contains a Policy Resolution mediation primitive. When you configure the Policy Resolution primitive you can specify the WSRR definition to use, or take the default definition. If you want to use gate conditions, the Policy Resolution primitive must contain a Policy condition name that matches the gate condition on the policy. Also, you must 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. At run time, the value of condition Age would be set from /body/priceChecker/request/Age.

Before you can successfully run the module, the module and its policies must exist in WSRR. Load the EAR file, containing your SCA module, into WSRR; then you can use the Module Properties and Policies widget to create policies for the module. When you create a policy attachment using the Module Properties and Policies widget, the widget creates a single policy attachment and one policy for each group that has an assertion. When you delete a policy attachment using the Module Properties and Policies widget, the widget deletes the policy attachment and any of the policies it attached, unless the policies are being used by a different attachment.


topic Topic topic

Terms of use | Feedback


Timestamp icon Last updated: 23 June 2009


http://publib.boulder.ibm.com/infocenter/dmndhelp/v6r2mx/topic/com.ibm.websphere.wbpm.fep.psesb.620.doc/help_propropwidget/help_modulepropwidget.html
Copyright IBM Corporation 2005, 2009. All Rights Reserved.
This information center is powered by Eclipse technology (http://www.eclipse.org).