This discussion is archived
1 Reply Latest reply: Jan 24, 2013 10:54 AM by Lucas Andres Muñoz RSS

OSM Inter-Order Dependency

user8246886 Newbie
Currently Being Moderated
Hi,

I'm trying to created an inter-order dependency in OSM with no success :(

I followed the OSM guide and used the xquey provided with a few changes:

declare namespace ord="http://xmlns.oracle.com/communications/ordermanagement";
declare namespace im="SalesOrderFulfillment";
declare namespace
osmc="urn:oracle:names:ordermanagement:cartridge:
SalesOrderFulfillment:1.0.0:view:SalesOrderQueryTask";
let $dependingLineId := fn:normalize-space(osm:properties/im:OrderItemId)
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()


When i submit an order i'm getting the following error:

Invalid Order Specification Fault
Failed to create and start the order due to java.lang.RuntimeException: com.mslv.oms.OMSException: encountered error starting orchestration caused by:XPath function instance('findOrder') failed - context not set.


Any idea why this error comes up and what is the issue?

Thanks in advance
  • 1. Re: OSM Inter-Order Dependency
    Lucas Andres Muñoz Newbie
    Currently Being Moderated
    Hi, I suppose that this is a configuration of an Order Item Specification in the tab of Order Item Dependencies, right? If yes, please check the configuration of your Instances for the same Order Item Dependency, you must define one that should use a data instance behavior "findOrder" to find the base order, you can find an example of this in a cartridge of Oracle Communications Order and Service Management 7.2 Cartridges for Oracle Application Integration Architecture Media Pack at edelivery.oracle.com.

    Best regards.

    Lucas.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points