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 Item Inter Order Dependency XQuery Expressions

This topic describes how to use the Order Item Specification editor, Order Item Dependency tab, Order Item Selector area, XQuery tab to write an expression that creates dependencies between order items across orders.

The following example shows an XQuery for an inter-order dependency.

declare namespace ord="http://xmlns.oracle.com/communications/ordermanagement";
declare namespace im="CommunicationsSalesOrderFulfillmentPIP";
declare namespace
osmc="urn:oracle:names:ordermanagement:cartridge:
     CommunicationsSalesOrderFulfillmentPIP:1.0.0:view:CommunicationsSalesOrderQueryTask";
let $dependingLineId := fn:normalize-space(osm:properties/im:DependingSalesOrderBaseLineId)
return
     if(fn:not($dependingLineId = ''))
     then
(:   Use the data instance behavior "findOrder" to find the base order:   :)
     let $parentOrderId
           :=fn:normalize-space(vf:instance("findOrder")/ord:Order[last()]
              /ord:Amendments/ord:AmendedOrderSummary/ord:Id/text())
(:   Use the data instance behavior "getOrder" to find the associated order item ID in the base order:   :)
     let $parentOrderItemId :=
          fn:normalize-space(vf:instance("getOrder")/ord:Data/
          osmc:_root/osmc:ControlData/osmc:OrderItem[osmc:BaseLineId=$dependingLineId]/@index)
return
     if(fn:not($parentOrderId = '') and fn:not($parentOrderItemId = ''))
     then
(:   Return the dependency:   :)
     <osm:dependency fromOrderId="{$parentOrderId}" fromOrderItemId="{$parentOrderItemId}"/>
else()
else()