Policy usage in the IBM® SOA Policy Pattern

Policies in WSRR are administered using the Business Space user interface. Policies can be added, edited, or removed at any time. Policies are selected based on their PolicySelector property value and governance state. Policies are valid if they are in the Approved, Deprecated, or Superseded governance states, and policies in other governance states are discarded during schedule validation. The Schedule condition is the only condition that this pattern accepts, and the routing action is the only action that is accepted by this pattern.

Accessing Business Space

To access the Business Space user interface to administer policies, see Connecting to WSRR. For more information about the Business Space user interface and managing policies, see WebSphere® Service Registry and Repository Version 8.0 Information Center - Using the Business Space user interface.

The PolicySelector property value

Policies are identified in WSRR based on the PolicySelector property value. The PolicySelector property is a customizable string. For example, in the sample data provided with this pattern there are two policies, each with a different PolicySelector value, GID007 and GID008.

Policies with the same PolicySelector value are considered to be different versions of the same policy. If multiple policies exist with the same PolicySelector property value and matching date and time conditions, the policy selected to use is based on the governance state of the policy in the following order of precedence:
  1. Approved governance state
  2. Superseded governance state
  3. Deprecated governance state
Where multiple policies have the same PolicySelector value and same valid governance state, the most recently updated policy is selected.

To assign the PolicySelector value to a new policy, see Assigning the PolicySelector property for new policies.

The Schedule specification

The Schedule element describes the schedule requirements for the days and times when the policy is valid. Here is an example of the policy document schema for the schedule specification:
<xs:element name="Schedule">
  <xs:complexType>
   <xs:sequence>
    <xs:element name="Daily" maxOccurs="1" minOccurs="0">
     <xs:complexType>
      <xs:attribute name="StartTime" type="xs:time" />
      <xs:attribute name="StopTime" type="xs:time" />
     </xs:complexType>
    </xs:element>
    <xs:element name="WeekDays" maxOccurs="1" minOccurs="0">
     <xs:complexType>
      <xs:attribute name="Days" type="xs:string" />
     </xs:complexType>
    </xs:element>
   </xs:sequence>
   <xs:attribute name="StartDate" type="xs:date" use="optional" />
   <xs:attribute name="StopDate" type="xs:date" use="optional" />
  </xs:complexType>
 </xs:element>
The Schedule element is the root element of the schedule specification in the policy document. If the schedule element is missing, the schedule starts immediately and continues indefinitely so the policy always applies. If the Schedule element is present, the following elements are used for policy validation: For more information about policies that span midnight, see the Policies that span midnight section.

Policies that span midnight

The policy spans a midnight boundary if the policy StopTime time is earlier than, or equal to, the StartTime time. This means that the policy still applies until the stop time the following day, even if that day is equal to the StopDate date or not one of the specified valid WeekDays days. For example, if a schedule is set to start at 11 p.m. and to run for 2 hours on Wednesdays, the policy will effectively end on Thursday at 1 a.m.

The following examples are some schedules that span midnight:
  1. If a schedule contains <WeekDays Days="Monday"/> and <Daily StartTime="22:00:00" StopTime="02:00:00"/>, this describes one interval that starts on Monday night and ends on Tuesday morning because Monday was specified as the day the policy starts to apply. This will repeat weekly unless dates are specified.
  2. The following schedule applies for the last 2 hours of April 1, and the first 2 hours of April 2 because the StartDate and StopDate dates have specified that the policy starts on April 1 and stops on April 2: 
    <Schedule StartDate="2012-04-01" StopDate="2012-04-02">
        <Daily StartTime="22:00:00" StopTime="02:00:00"/>
     </Schedule>

Concept Concept

Feedback

Timestamp icon Last updated: Thursday, 3 July 2014
http://publib.boulder.ibm.com/infocenter/prodconn/v1r0m0/topic/com.ibm.scenarios.soawmbwsrr.doc/topics/csoa_policies.htm