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

Combining Order Item Hierarchy with Duration Based Groupings

You can combine the function to create custom Component IDs based on order item requested delivery date, duration, and minimum duration separation, or a combination of these functions with order component ID generation based on order item hierarchy. The following example creates separate component IDs for order items that, although they have the same requested delivery date, are part of different order item hierarchical groupings:

declare namespace osm="http://xmlns.oracle.com/communications/ordermanagement/model";
declare namespace prop="http://oracle.communications.ordermanagement.unsupported.centralom";
declare namespace osmfn = "java:oracle.communications.ordermanagement.orchestration.generation.OrchestrationXQueryFunctions";
let $groupDuration := "P2D"
let $minSeparationDuration := "P1D"
return
osmfn: getGroupIdByDateTime ($groupDuration, $minSeparationDuration)
let $rootAncestorID := osmfn:ancestors("eboLineItem", "default", "http://xmlns.oracle.com/communications/ordermanagement")[fn:last()]/osm:properties/prop:BaseLineId/text()
return fn:concat($rootAncestorId, '/', $groupId)

The following table shows how five hierarchically divided order items would be grouped given a one day minimum separation duration.

Order Item Requested Delivery Data Group ID Component ID
A.1 June 9, 2014 Group1 A/Group1
A.1.1 June 11, 2014 Group1 A/Group1
A1.2 June 19, 2014 Group2 A/Group2
A.1.3 June 20, 2014 Group2 A/Group2
B.1 June 9, 2014 Group1 B/Group1
B.1.1 June 11, 2014 Group1 B/Group1
B.1.2 June 12, 2014 Group1 B/Group2

See "About Component Specification Custom Component IDs XQuery Expressions" for more information about the context, prolog, and body of this XQuery. See "OSM XQuery Functions" For more information about the OrchestrationXQueryFunctions class.