About XQuery Expressions for Mapping Products and Fulfillment Patterns

OSM relies on the fulfillment pattern mapping property of the order item specification to determine the fulfillment pattern for a line item.

Historically, the fulfillment pattern name needed to be derived by cartridge developers at design time using a mapping file generated by Design Studio. Cartridges that have been developed using these patterns can continue to be built and deployed with the latest version of Design Studio.

This mechanism has been simplified, however, when using OSM 7.5.0 or later (target server version of the cartridges must reflect this) along with Design Studio 8.0.0.0.0 or later.

Cartridge developers can now simply populate the Fulfillment Pattern Mapping Property field with the product specification name and OSM will determine the correct fulfillment pattern based on new files generated by Design Studio.

This can be done by providing an XQuery that navigates the incoming order to the data structure where this data is held. The location of the product specification name will be specific to the incoming order payload.

For example, for a TMF 641 order, the following XQuery will return the service name:

(: Declare incoming order namespace:)
declare namespace tmf="http://oracle.communications.orchestration.com/tmf-api/serviceOrdering/%{TMF641_VERSION}/serviceOrder/inputMessage";

declare variable $line :=.;

fn:normalize-space($line/tmf:service/tmf:serviceSpecification/tmf:name/text())

For example, for a TMF 622 order, the following XQuery snippet will return the product name:

(: Declare incoming order namespace:)
declare namespacetmf="http://oracle.communications.orchestration.com/tmf-api/productOrderingManagement/%{TMF622_VERSION}/productOrder/inputMessage";

declare variable $line :=.;

let $ps := $line/tmf:product/tmf:productSpecification/tmf:name/text()
return $ps

Developers still have the option of returning the fulfillment pattern name if they wish. This is particularly useful when you have a default fulfillment pattern for line items that do not represent a product or service.

As an example, you could enhance the above XQuery examples with a check for an empty product or service name, and if necessary return a fulfillment pattern instead (where Non.Service.Offer is a fulfillment pattern).

   else
     'Non.Service.Offer'