2.5.3.6 EventTrigger

If present, the EventTrigger specifies that the task can start upon occurrence of an event matching an event subscription query, as specified in [MS-EVEN6] section 2.2.16, or on the occurrence of a number of events of the same type (same EventId) in a given period of time.

 <!-- EventTrigger -->
 <xs:complexType name="eventTriggerType">
   <xs:complexContent>
     <xs:extension base="triggerBaseType">
       <xs:sequence>
         <xs:element name="Subscription" type="nonEmptyString"/>
         <xs:element name="Delay" type="xs:duration" default="PT0M" 
         minOccurs="0"/>
         <xs:element name="PeriodOfOccurrence" type="xs:duration" 
         default="PT0M" minOccurs="0"/>
         <xs:element name="NumberOfOccurrences" default="1" 
         minOccurs="0">
           <xs:simpleType>
              <xs:restriction base="xs:unsignedByte">
                 <xs:minInclusive value="1"/>
                 <xs:maxInclusive value="32"/>
               </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="MatchingElement" type="nonEmptyString" 
         minOccurs="0"/>
         <xs:element name="ValueQueries" type="namedValues" 
         minOccurs="0"/>
     </xs:sequence>
   </xs:extension>
 </xs:complexContent>
 </xs:complexType>
 <xs:complexType name="namedValues">
   <xs:sequence>
     <xs:element name="Value" type="namedValue" maxOccurs="32"/>
   </xs:sequence>
 </xs:complexType>
 <xs:complexType name="namedValue">
     <xs:simpleContent>
       <xs:extension base="nonEmptyString">
         <xs:attribute name="name" type="nonEmptyString" use="required"/>
     </xs:extension>
   </xs:simpleContent>
 </xs:complexType>

Subscription: This field is not optional and contains an XPATH XML query for an event ([MS-EVEN6] section 2.2.16).

Delay: If present, this field contains a user-specified delay value as specified for "time duration" in section 2.5.1.1. The task can have a delayed start after event occurrence; the time duration of the delayed start is equal to the delay value.

NumberOfOccurrences: If present, this field contains an integer value between 1 and 32, inclusive. The trigger can fire after NumberOfOccurrences occurrences of the MatchingElement query (subject to the PeriodOfOccurrence field; see the following field).

PeriodOfOccurrence: If present, this field contains a time period as specified in section 2.5.1.1, which is greater than or equal to 1 minute. If present, this field indicates the occurrences of the MatchingElement query that occurred prior to the last PeriodOfOccurrence time period that are not counted.

MatchingElement: If present, this field specifies an XML field name. For more information, see [MS-EVEN6] section 3.1.4.31.

ValueQueries: If present, this field specifies a set of XML elements. The set has between 1 and 32 members, inclusive. When an event matches the subscription and fires the trigger, element values from the event for task action parameterization (section 2.5.9) can be retrieved.