Skip Headers
Oracle® Communications Design Studio Modeling OSM Orchestration
Release 7.2.4
Go to Design Studio Help Home
Go to Table of Contents
Go to Feedback page

Go to previous page
Go to next page
Mobi · ePub

About Order Data Change Wait Condition XQuery Expressions

This topic describes how to use the Fulfillment Pattern editor, Orchestration Plan tab, Dependencies subtab, Wait Condition subtab, Wait for Condition area, XQuery subtab for the Data Change Notification selection,

This topic describes how to use one of the following fields:

to write an expression that specifies a value that must exist in order item property (typically a blocking order item property) before a waiting order item starts.

The following example shows the XQuery that evaluates the data change. The dependency is met when all blocking order items have reached a state of PROVISION STARTED.

(:   The $blockingIndexes variable contains data element indexes for all blocking order items:   :)
declare variable $blockingIndexes as xs:integer* external;
(:   Specify "PROVISION STARTED" as the data value that must be met:   :)
let $expectedMilestoneCode := "PROVISION STARTED"
(:   $milestoneValues contains a set of milestones for all blocking order items:   :)
let $milestoneValues := 
     /GetOrder.Response/_root/ControlData/Functions/ProvisioningFunction/orderItem/orderItemRef[
     fn:index-of($blockingIndexes, xs:integer(@referencedIndex)) !=
     0]/milestone[text() eq $expectedMilestoneCode]
(:   Return true only if all the milestones in ProvisioningFunction/orderItem/orderItemRef are PROVISION STARTED:   :)
return fn:count($milestoneValues) eq fn:count($blockingIndexes)

The following example returns true when at least one blocking item is completed.

declare namespace oms="urn:com:metasolv:oms:xmlapi:1";
declare variable $blockingIndexes as xs:integer* external;
let $component := //ControlData/Functions/NetworkProvisionFunction
let $lineItem := $component/orderItem/orderItemRef[fn:index-of($blockingIndexes, xs:integer(@referencedIndex)) != 0]
return
     if (fn:exists($lineItem))
     then
        let $statusValue := $lineItem/OrderItemStatus/text() = "completed"
        return
        if (fn:count($statusValue)>0) 
        then 
            fn:true()
        else 
            fn:false()
     else 
        fn:false()