IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Developing monitor models > What are monitor models? > Expression support

Extended XPath 2.0 support

Business events can contain complex XML that might contain constructs such as repeating elements (sequences), information that is qualified by parent, child, or sibling nodes, or information whose location or interpretation depends on other content.

For processing such complex event content, Business Monitor provides the built-in functions.

Built-in functions
Function Purpose
wbm:serialize(...) Extract and convert XML document fragments from an inbound event into a single string.
wbm:evaluate(...) Evaluate XPath 2.0 expressions on the string representation of an XML document and produce a string result.
wbm:send-events(...) Create and send an outbound event for each item in a sequence. These events can be received as inbound events and used to create new monitoring contexts, one per item.
wbm:escape-special-characters(...) Replace all special characters so that the string representation of the XML can be displayed in a web browser (for example, replace < with &lt;).

Each of these functions is described below. The sample expressions used in the descriptions assume that incoming order events contain content similar to the following example, which the orderPart event part definition refers to:

<ord:order xmlns:ord="http://www.example.org/order">
        <ord:orderNumber>F0004391</ord:orderNumber>
        <ord:orderEntryTimestamp>2009-01-17T17:56:25-05:00</ord:orderEntryTimestamp>
        <ord:customer>
            <ord:name>The Other Company</ord:name>
            <ord:shippingAddress>
                <ord:street>1000 Main Street</ord:street>
                <ord:city>Any Town</ord:city>
                <ord:state>XY</ord:state>
                <ord:zip>10001</ord:zip>
            </ord:shippingAddress>
        </ord:customer>
        <ord:items>
            <ord:item ord:sku="190123">
                <ord:description>my item</ord:description>
                <ord:due>2009-01-20-05:00</ord:due>
                <ord:quantity>32</ord:quantity>
                <ord:price>12.20</ord:price>
            </ord:item>
            <ord:item ord:sku="030234">
                <ord:description>your item</ord:description>
                <ord:due>2009-01-22-05:00</ord:due>
                <ord:quantity>12</ord:quantity>
                <ord:price>1604.98</ord:price>
            </ord:item>
            <ord:item ord:sku="030405">
                <ord:description>her item</ord:description>
                <ord:due>2009-01-23-05:00</ord:due>
                <ord:quantity>125</ord:quantity>
                <ord:price>199.25</ord:price>
            </ord:item>
        </ord:items>
        <ord:deliveryDates>
            <ord:date>2009-01-20-05:00</ord:date>
            <ord:date>2009-01-22-05:00</ord:date>
            <ord:date>2009-01-23-05:00</ord:date>
        </ord:deliveryDates>
        <ord:tax>2673.38</ord:tax>
        <ord:total>44556.41</ord:total>
    </ord:order>

The following namespace declarations are used on this page.

xmlns:wbm="http://www.ibm.com/xmlns/prod/websphere/monitoring/6.2.0/functions" 
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ord="http://www.example.org/order"


wbm:serialize(...)

To retrieve some or all of an event's XML content (the information in the xs:any slot) into a string, use the wbm:serialize(...) function.

wbm:serialize( $xml as xs:anyType? ) as xs:string? 

wbm:serialize( $xml as xs:anyType?, $delimiter as xs:string? ) as xs:string?
where: