The PolicySelector property value in a policy document
is used to determine which policy to apply to a message. This value
must be manually specified for each new policy.
About this task
To determine which policies should be evaluated for a particular
message, a property called PolicySelector exists on all policy documents.
By setting this property to a value that matches the value within
the message itself, one or more policies can be associated with a
message. For all policies that have the PolicySelector property set
to the value in the message, the schedule condition in the policies
is evaluated to determine which policy should be enforced. For more
details about the scheduling condition within this pattern, see
Policy usage in the IBM SOA Policy Pattern.
Procedure
- Open the policy document for the policy. To do this, select
the policy document in the Service Registry Navigator Widget in the
lower-left of the screen. Alternatively, search for the name you specified,
including .xml on the end. The
policy document is displayed in the Service Registry Detail widget
on the right.
- To edit the policy, click the Edit icon
in the Service Registry Detail widget.
- Enter a value in the text box for PolicySelector.
This is the value that is matched against the value in the message
in order to select which policies to apply to it.
- Click Finish.
Results
Messages containing the PolicySelector value you entered for
this policy can now have this policy applied when this policy is in
a valid governance state.