IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Developing monitor models > What are monitor models? > Monitor XML schema definition (monitor.xsd) > XML schema (monitor.xsd) description

StopwatchType

StopwatchType defines a stopwatch used by a monitoringContext. A stopwatch contains an elapsed time, such as a duration, and can be started, stopped, and reset by triggers. The type must always be set to the duration type defined in the XML Schema Datatypes specification.

Elements

Name Min-max Description
startedWhen 1 - n The trigger or inbound event that causes the stopwatch to start. At least one of these triggers or inbound events must be specified.
stoppedWhen 0 - n The trigger or inbound event that causes the stopwatch to stop.
resetWhen 0 - n The trigger or inbound event that causes the stopwatch to reset.
description 0 - 1 A user-provided description.

Attributes

Name Required or optional Type Description
displayName Optional String The name to display in the Monitor Model editor and Business Monitor dashboards. If the attribute is not set, the ID attribute will be used for the display name.
id Required String The unique identifier for the stopwatch. The ID field must be unique according to the constraints defined in ID uniqueness constraints.
isAccumulated Optional Boolean Whether this is an accumulating stopwatch. An accumulating stopwatch allows multiple stopwatches with the accumulated time representing the total time for each of the stopwatches. A non-accumulating stopwatch can only be started and stopped, although it can be started and stopped multiple times.
isSortable Optional Boolean Whether the stopwatch can be used for sorting. The default value is false.
type Required Duration The data type of the stopwatch, which must be Duration.

Restrictions

  • The type for a stopwatch must be xs:duration.

  • All references (in startedWhen, stoppedWhen, and resetWhen) must exist.

  • All references (in startedWhen, stoppedWhen, and resetWhen) must refer to triggers or inboundEvents.

  • All referenced triggers and inboundEvents must be in the current context or in a child context of the current context.

Schema definition

<xsd:complexType name="StopwatchType" >
    <xsd:complexContent>
        <xsd:extension base="mon:BaseMetricType">
            <xsd:choice minOccurs="0" maxOccurs="unbounded">
                <xsd:element name="startedWhen" type="mon:ReferenceType" 
                      minOccurs="1" maxOccurs="unbounded"/>
                <xsd:element name="stoppedWhen" type="mon:ReferenceType" 
                      minOccurs="0" maxOccurs="unbounded"/>
                <xsd:element name="resetWhen" type="mon:ReferenceType" 
                      minOccurs="0" maxOccurs="unbounded"/>
            </xsd:choice>
            <xsd:attribute name="isAccumulated" type="xsd:boolean" 
                  default="false"/>                
        </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>

XML schema (monitor.xsd) description