Use the Module Administration widget,
or the Module Properties and Policies widget,
to create new policies and policy attachments in WebSphere® Service Registry and Repository
(WSRR) . You can control service requests dynamically by using policies
that allow you to override module properties at run time.
Before you begin
- Deploy and configure the administration widgets.
- If administrative security is enabled for Business Space, then
enable application security.
- If you are responsible for creating a module that can use policies,
see: Creating
modules that can use policies.
About this task
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 and are
stored in WSRR. 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.
Procedure
- Log on to Business Space.
- Open a Module Administration page. When you
install the feature pack and select the Administration feature, the
Extended Solution Management template is added. The Extended Solution
Management template can be used to create a Module Administration
business space.
- From the Module Browser widget, select Module
Policies. The Module Administration widget
is refreshed; if there are existing policy attachments they are displayed.
- If you have more than one WSRR definition, select the definition
used by your module.
- Enter the name of the new policy attachment. Policy
attachments associate a policy with a module (in WSRR, the policy
and policy attachment are separate).
- Click Create... You can
now add assertions and gate conditions.
Note: Using Business Space,
you cannot edit mediation policy information after you have created
a new policy attachment. Therefore, you must add any assertions and
gate conditions before you save a new policy attachment.
- Create one or more assertions. Assertions are
module properties that the policy can override. In WSRR, the module
properties that you want to override appear as policy assertions.
Note: The
widget requires each policy attachment to have at least one assertion.
- Select a Group name. This
is the group to which the property belongs. By default, the group
name is the name of the mediation flow component.
- Select a Property name. This
is the alias name of the property. The alias name identifies the property
in the mediation flow.
- Enter a suitable value in the Value field;
for example, All or 10 or /body/input/address. 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.
- Click Add Assertion.
- Optional: Create one or more gate conditions. Gate conditions must be met before the policy can be used. In
WSRR, gate conditions are user properties on the policy attachment
object.
- Enter a gate condition name in the Gate condition
name field. The name of a gate condition is
always prefixed with the string medGate_.
- 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".
- Click Add Gate Condition.
- Optional: If you want to delete an assertion
or gate condition, click the delete icon of the appropriate assertion
or gate condition. If you hover over an assertion or gate
condition, you will see the delete icon, a cross, at the end of the
row.
- Click Save.
Results
In WSRR, a single policy attachment is created, and one policy
is created for each group that has an assertion. If you added a gate
condition, WSRR creates a user property on the policy attachment;
the user property represents the condition.