About Component Specification Custom Component ID XQuery Expressions

This topic describes how to use the Order Component Specification editor, Component ID tab, Component ID area, XQuery subtab to write an expression that specifies a custom component ID for an order component. These custom component IDs are typically required when the default component IDs are not sufficiently specific (see OSM Modeling Guide for more information about the default component ID). The Component ID XQuery includes the following characteristics:

  • Context: The Component ID tab XQuery input document is the order item and the order item properties you want to use to create a custom component ID with. For example, the following order item contains the SiteID and requestedDeliveryDate order item properties. In a simple scenario, you can use this element to group all order items that share the same SiteID value and further delineate groups based on requestedDeliveryDate date range.

    <osm:orderItem 
     xmlns:osm="http://xmlns.oracle.com/communications/ordermanagement/model"
     id="1288881040699">
    .....
       <osm:properties
        xmlns:im="http://oracle.communications.ordermanagement.unsupported.
        centralom">
          <im:typeCode>Bundle</im:typeCode>
          <im:parentLineId>3</im:parentLineId>
          <im:requestedDeliveryDate>2013-06-31T12:00:00</im:requestedDeliveryDate>
          <im:lineItemName>Commercial Fixed Service [Add]</im:lineItemName>
          <im:lineId>4</im:lineId>
          <im:SiteID>10</im:SiteID>
          <im:ServiceActionCode>UPDATE</im:ServiceActionCode>
          <im:productClass>Fixed Service Plan Class</im:productClass>
          <im:serviceId>552131313131</im:serviceId>
          <im:productSpec>Service.Fixed</im:productSpec>
          <im:lineItemPayload> [34 lines]
          <im:region>Sao Paulo</im:region>
       <osm:properties>
    </osm:orderItem>
    
  • Prolog: You can declare the order item namespace and the OSM namespace in the XQuery prolog. In more complicated XQuery expressions, you can also use the OrchestrationXQueryFunctions OSM Java package to specify component IDs based on order item hierarchies, order item requested delivery date, order component duration, order component minimum duration separation, or a combination of some or all of them. For example:

    declare namespace osm="http://xmlns.oracle.com/communications/ordermanagement/model";
    declare namespace im="http://oracle.communications.ordermanagement.unsupported.centralom";
    declare namespace osmfn = "java:oracle.communications.ordermanagement.orchestration.generation.OrchestrationXQueryFunctions";
    

    See "OSM XQuery Functions" for more information about the OrchestrationXQueryFunctions class.

  • Body: The body must return a string. Every order item that ends with the same string gets included in the order component. For example, if you wanted to group all order items based on the SiteID value, you could specify the following XQuery:

    return osm:properties/im:SiteID/text() 
    

The following topics describe OSM Java package methods.

For more information about how the OrchestrationXQueryFunctions are used in custom Component ID XQuery expressions and for more complicated custom group ID generation scenarios that use Orchestration XQueryFunction, see the following topics: