ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » IIB Embedded ODM Decision Service Problem

Post new topic  Reply to topic
 IIB Embedded ODM Decision Service Problem « View previous topic :: View next topic » 
Author Message
MikeOliverAZ
PostPosted: Wed Aug 06, 2014 12:02 am    Post subject: IIB Embedded ODM Decision Service Problem Reply with quote

Apprentice

Joined: 10 Jul 2013
Posts: 47

Using IIB V9.0.0.2

Have a Decision Service Node with the following Rules Defined.

Code:

Rule 1

if the event key of UDTO is "SVDMAIN" then 
set the subscriber number of the atomic service one request of the atomic request payload of the atomic request of UDTO to the subscriber number of the original request payload of the original request of UDTO ;
set the amount of the atomic service one request of the atomic request payload of the atomic request of UDTO to the amount of the original request payload of the original request of UDTO ;
set the atomic request reply to QName of the atomic request of UDTO to "StaticVsDynamic.IN" ;
set the route to label of the message variables of UDTO to ATOMICSERVICE ;
set the comments of the atomic service one request of the atomic request payload of the atomic request of UDTO to "This is the first pass" ;
set the atomic request QName of the atomic request of UDTO to "AtomicServiceOne.IN" ;

Rule 2

if the event key of UDTO is "SVDMAIN:AtomicServiceOne.IN" then
set the subscriber number of the atomic service two request of the atomic request payload of the atomic request of UDTO to the subscriber number of the original request payload of the original request of UDTO ;
set the amount of the atomic service two request of the atomic request payload of the atomic request of UDTO to the amount of the original request payload of the original request of UDTO ;
set the atomic request reply to QName of the atomic request of UDTO to "StaticVsDynamic.IN" ;
set the route to label of the message variables of UDTO to ATOMICSERVICE ;
set the AS2 remarks of the atomic service two request of the atomic request payload of the atomic request of UDTO to "This is the second pass" ;
set the atomic request QName of the atomic request of UDTO to "AtomicServiceTwo.IN" ;

Rule 3

if the event key of UDTO is "SVDMAIN:AtomicServiceOne.IN:AtomicServiceTwo.IN" then 
set the subscriber number of the atomic service three request of the atomic request payload of the atomic request of UDTO to the subscriber number of the original request payload of the original request of UDTO ;
set the amount of the atomic service two request of the atomic request payload of the atomic request of UDTO to the amount of the original request payload of the original request of UDTO ;
set the atomic request reply to QName of the atomic request of UDTO to "StaticVsDynamic.IN" ;
set the route to label of the message variables of UDTO to ATOMICSERVICE ;
set the atomic request QName of the atomic request of UDTO to "AtomicServiceThree.IN" ;
set the final tally of the atomic service three request of the atomic request payload of the atomic request of UDTO to "New Tally";

Rule 4

if the event key of UDTO is "SVDMAIN:AtomicServiceOne.IN:AtomicServiceTwo.IN:AtomicServiceThree.IN" then 
set the route to label of the message variables of UDTO to REPLYTO ;
set ReplyToQ to "StaticVsDynamic.REPLY" ;



The Rule 1 works fine, however when the event key is not "SVDMAIN" we get the following exception.

Code:

( ['MQROOT' : 0x2da41aa8]
  (0x01000000:Name):RecoverableException = (
    (0x03000000:NameValue):File                 = 'F:\build\slot1\S900_P\src\DataFlowEngine\MessageServices\ImbDataFlowNode.cpp' (CHARACTER)
    (0x03000000:NameValue):Line                 = 1155 (INTEGER)
    (0x03000000:NameValue):Function             = 'ImbDataFlowNode::createExceptionList' (CHARACTER)
    (0x03000000:NameValue):Type                 = 'ComIbmRouteNode' (CHARACTER)
    (0x03000000:NameValue):Name                 = 'StaticVsDynamicMain#FCMComposite_1_3' (CHARACTER)
    (0x03000000:NameValue):Label                = 'StaticVsDynamicMain.Route' (CHARACTER)
    (0x03000000:NameValue):Catalog              = 'BIPmsgs' (CHARACTER)
    (0x03000000:NameValue):Severity             = 3 (INTEGER)
    (0x03000000:NameValue):Number               = 2230 (INTEGER)
    (0x03000000:NameValue):Text                 = 'Node throwing exception' (CHARACTER)
    (0x01000000:Name     ):Insert               = (
      (0x03000000:NameValue):Type = 14 (INTEGER)
      (0x03000000:NameValue):Text = 'StaticVsDynamicMain.Route' (CHARACTER)
    )
    (0x01000000:Name     ):RecoverableException = (
      (0x03000000:NameValue):File                 = 'F:\build\slot1\S900_P\src\DataFlowEngine\PluginInterface\ImbJniNode.cpp' (CHARACTER)
      (0x03000000:NameValue):Line                 = 1304 (INTEGER)
      (0x03000000:NameValue):Function             = 'ImbJniNode::evaluate' (CHARACTER)
      (0x03000000:NameValue):Type                 = 'ComIbmDecisionServiceNode' (CHARACTER)
      (0x03000000:NameValue):Name                 = 'StaticVsDynamicMain#FCMComposite_1_5.DynamicRouting#FCMComposite_1_2' (CHARACTER)
      (0x03000000:NameValue):Label                = 'StaticVsDynamicMain.DynamicRouting.Decision Service' (CHARACTER)
      (0x03000000:NameValue):Catalog              = 'BIPmsgs' (CHARACTER)
      (0x03000000:NameValue):Severity             = 3 (INTEGER)
      (0x03000000:NameValue):Number               = 2230 (INTEGER)
      (0x03000000:NameValue):Text                 = 'Caught exception and rethrowing' (CHARACTER)
      (0x01000000:Name     ):Insert               = (
        (0x03000000:NameValue):Type = 14 (INTEGER)
        (0x03000000:NameValue):Text = 'StaticVsDynamicMain.DynamicRouting.Decision Service' (CHARACTER)
      )
      (0x01000000:Name     ):RecoverableException = (
        (0x03000000:NameValue):File     = 'DecisionServiceNode.java' (CHARACTER)
        (0x03000000:NameValue):Line     = 834 (INTEGER)
        (0x03000000:NameValue):Function = 'evaluate' (CHARACTER)
        (0x03000000:NameValue):Type     = '' (CHARACTER)
        (0x03000000:NameValue):Name     = '' (CHARACTER)
        (0x03000000:NameValue):Label    = '' (CHARACTER)
        (0x03000000:NameValue):Catalog  = 'BIPmsgs' (CHARACTER)
        (0x03000000:NameValue):Severity = 3 (INTEGER)
        (0x03000000:NameValue):Number   = 4310 (INTEGER)
        (0x03000000:NameValue):Text     = 'Attempt to execute rule failed' (CHARACTER)
        (0x01000000:Name     ):Insert   = (
          (0x03000000:NameValue):Type = 5 (INTEGER)
          (0x03000000:NameValue):Text = 'DynamicRouting.Decision Service' (CHARACTER)
        )
        (0x01000000:Name     ):Insert   = (
          (0x03000000:NameValue):Type = 5 (INTEGER)
          (0x03000000:NameValue):Text = 'StaticVsDynamicMain' (CHARACTER)
        )
        (0x01000000:Name     ):Insert   = (
          (0x03000000:NameValue):Type = 5 (INTEGER)
          (0x03000000:NameValue):Text = 'StaticVsDynamicExample' (CHARACTER)
        )
        (0x01000000:Name     ):Insert   = (
          (0x03000000:NameValue):Type = 5 (INTEGER)
          (0x03000000:NameValue):Text = '' (CHARACTER)
        )
        (0x01000000:Name     ):Insert   = (
          (0x03000000:NameValue):Type = 5 (INTEGER)
          (0x03000000:NameValue):Text = 'StaticVsDynamicExample' (CHARACTER)
        )
        (0x01000000:Name     ):Insert   = (
          (0x03000000:NameValue):Type = 5 (INTEGER)
          (0x03000000:NameValue):Text = 'ERROR RTERR011: in source ?, after line 1, before lines ?, Unexpected or unknown XML element: SubscriberNumber
ERROR RTERR013: in source ?, after line 1, before lines ?, The following attribute is required SubscriberNumber
ERROR RTERR013: in source ?, after line 1, before lines ?, The following attribute is required TimeStamp
' (CHARACTER)
        )
        (0x01000000:Name     ):Insert   = (
          (0x03000000:NameValue):Type = 5 (INTEGER)
          (0x03000000:NameValue):Text = 'ilog.rules.xml.runtime.IlrXmlUnmarshaller.throwXmlException(IlrXmlUnmarshaller.java:148)

ilog.rules.xml.runtime.IlrXmlUnmarshaller.unmarshal(IlrXmlUnmarshaller.java:134)

ilog.rules.xml.binding.IlrXmlDefaultDocumentDriver.readObject(IlrXmlDefaultDocumentDriver.java:213)

ilog.rules.res.xu.ruleset.xml.internal.IlrXMLObjectTransformer.toXMLObject(IlrXMLObjectTransformer.java:50)

ilog.rules.res.xu.ruleset.xml.internal.IlrXMLObjectService.toXMLObject(IlrXMLObjectService.java:165)

ilog.rules.res.xu.ruleset.xml.internal.IlrXMLObjectService.toParameterMap(IlrXMLObjectService.java:117)

com.ibm.rules.res.xu.engine.internal.BaseEngineManager.setParameters(BaseEngineManager.java:313)

com.ibm.rules.res.xu.engine.cre.internal.CREManager.setParameters(CREManager.java:286)

ilog.rules.res.xu.spi.IlrManagedXUConnection.engineSetParameters(IlrManagedXUConnection.java:1056)

ilog.rules.res.xu.cci.IlrXUConnection.engineSetParameters(IlrXUConnection.java:504)

com.ibm.rules.res.xu.client.internal.DirectXURuleEngineSession.setParameters(DirectXURuleEngineSession.java:81)

ilog.rules.res.session.impl.IlrStatefulSessionBase.execute(IlrStatefulSessionBase.java:561)

ilog.rules.res.session.impl.IlrStatefulSessionBase.execute(IlrStatefulSessionBase.java:513)

ilog.rules.res.session.impl.IlrStatefulSessionBase.execute(IlrStatefulSessionBase.java:236)

ilog.rules.res.session.impl.IlrStatefulSessionBase.execute(IlrStatefulSessionBase.java:198)

ilog.rules.res.session.internal.IlrRuleServiceBase.executeRuleset(IlrRuleServiceBase.java:128)

com.ibm.rules.sdk.res.XMLRuleService.executeRuleset(XMLRuleService.java:63)

com.ibm.broker.businessrules.wodm.RuleEngineImpl.executeRule(RuleEngineImpl.java:505)

com.ibm.broker.businessrules.DecisionServiceNode.evaluate(DecisionServiceNode.java:329)

com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1480)

com.ibm.broker.plugin.MbOutputTerminal._propagate(Native Method)

com.ibm.broker.plugin.MbOutputTerminal.propagate(MbOutputTerminal.java:133)

com.ibm.broker.plugin.MbOutputTerminal.propagate(MbOutputTerminal.java:88)

com.ibm.broker.jdbcnodes.RouteNode.evaluate(RouteNode.java:262)

com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1480)' (CHARACTER)
        )
      )
    )
  )
)



I suspect the following schema element is the cause. The AtomicRequestPayload has a choice of three types. The xml document flowing through can have any of those three, but if you look at the rules the Rule 1 is expecting the AtomicServiceOneRequest and Rule 2 the AtomicServiceTwoRequest and Rule 3 the AtomicServiceThreeRequest as the AtomicRequestPayload.

The Exception doesn't recognize the other two choices. See the offending xml message after the schema extracts.


Code:

<xsd:complexType name="AtomicRequestPayload">
      <xsd:choice>
         <xsd:element name="AtomicServiceOneRequest" type="svd:AtomicServiceOneRequest"/>
         <xsd:element name="AtomicServiceTwoRequest" type="svd:AtomicServiceTwoRequest"/>
         <xsd:element name="AtomicServiceThreeRequest" type="svd:AtomicServiceThreeRequest"/>
      </xsd:choice>
   </xsd:complexType>
   
   <xsd:complexType name="AtomicServiceOneRequest">
       <xsd:sequence>
          <xsd:element name="SubscriberNumber" type="xsd:string"></xsd:element>
          <xsd:element name="Amount" type="xsd:double"></xsd:element>
          <xsd:element name="TimeStamp" type="xsd:dateTime"></xsd:element>
          <xsd:element name="Comments" type="xsd:string"></xsd:element>
       </xsd:sequence>
    </xsd:complexType>
   
    <xsd:complexType name="AtomicServiceTwoRequest">
       <xsd:sequence>
          <xsd:element name="SubscriberNumber" type="xsd:string"></xsd:element>
          <xsd:element name="Amount" type="xsd:double"></xsd:element>
          <xsd:element name="TimeStamp" type="xsd:dateTime"></xsd:element>
          <xsd:element name="AS2Remarks" type="xsd:string"></xsd:element>
          
       </xsd:sequence>
    </xsd:complexType>
   
    <xsd:complexType name="AtomicServiceThreeRequest">
       <xsd:sequence>
          <xsd:element name="SubscriberNumber" type="xsd:string"></xsd:element>
          <xsd:element name="Amount" type="xsd:double"></xsd:element>
          <xsd:element name="TimeStamp" type="xsd:dateTime"></xsd:element>
          <xsd:element name="FinalTally" type="xsd:string"></xsd:element>
          
       </xsd:sequence>
    </xsd:complexType>
   
   


Here is the offending xml message, from the trace. Note that both the elements the exception is complaining about are in fact there, and that the rules are not even setting or evaluating the timestamp element at all.

Code:

 (0x01000000:Folder):XMLNSC     = ( ['xmlnsc' : 0x2dc76a08]
    (0x01000400:XmlDeclaration):XmlDeclaration               = (
      (0x03000100:Attribute):Version  = '1.0' (CHARACTER)
      (0x03000100:Attribute):Encoding = 'UTF-8' (CHARACTER)
    )
    (0x01000000:Folder        )http://smart.com.ph/svd/:UDTO = (
      (0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:ns0         = 'http://smart.com.ph/svd/' (CHARACTER)
      (0x01000000:Folder       )http://smart.com.ph/svd/:OriginalRequest  = (
        (0x01000000:Folder     )http://smart.com.ph/svd/:OriginalRequestPayload   = (
          (0x03000000:PCDataField)http://smart.com.ph/svd/:SubscriberNumber = '9479927462' (CHARACTER)
          (0x03000000:PCDataField)http://smart.com.ph/svd/:Amount           = '100.0' (CHARACTER)
          (0x03000000:PCDataField)http://smart.com.ph/svd/:TimeStamp        = '2014-07-28T12:00:00' (CHARACTER)
        )
        (0x03000000:PCDataField)http://smart.com.ph/svd/:OriginalRequestCorellId  = 'svd:OriginalRequestCorellId' (CHARACTER)
        (0x03000000:PCDataField)http://smart.com.ph/svd/:OriginalRequestMsgId     = 'svd:OriginalRequestMsgId' (CHARACTER)
        (0x03000000:PCDataField)http://smart.com.ph/svd/:OriginalRequestAuthToken = 'svd:OriginalRequestAuthToken' (CHARACTER)
        (0x03000000:PCDataField)http://smart.com.ph/svd/:TimeStamp                = '2014-07-28T12:00:00' (CHARACTER)
      )
      (0x01000000:Folder       )http://smart.com.ph/svd/:OriginalResponse = (
        (0x01000000:Folder     )http://smart.com.ph/svd/:OriginalResponsePayload      =
        (0x03000000:PCDataField)http://smart.com.ph/svd/:OriginalResponseReplyToQName = 'StaticVsDynamic.REPLY' (CHARACTER)
        (0x03000000:PCDataField)http://smart.com.ph/svd/:OriginalResponseReplyToQMgr  = 'IB9QMGR' (CHARACTER)
      )
      (0x01000000:Folder       )http://smart.com.ph/svd/:AtomicRequest    = (
        (0x01000000:Folder     )http://smart.com.ph/svd/:AtomicRequestPayload       = (
          (0x01000000:Folder)http://smart.com.ph/svd/:AtomicServiceTwoRequest = (
            (0x03000000:PCDataField)http://smart.com.ph/svd/:Amount           = 102 (INTEGER)
            (0x03000000:PCDataField)http://smart.com.ph/svd/:AS2Remarks       = '' (CHARACTER)
            (0x03000000:PCDataField)http://smart.com.ph/svd/:SubscriberNumber = '' (CHARACTER)
          )
        )
        (0x03000000:PCDataField)http://smart.com.ph/svd/:AtomicRequestQName         = 'AtomicServiceOne.IN' (CHARACTER)
        (0x03000000:PCDataField)http://smart.com.ph/svd/:AtomicRequestQMgr          = 'IB9QMgr' (CHARACTER)
        (0x03000000:PCDataField)http://smart.com.ph/svd/:AtomicRequestReplyToQName  = 'StaticVsDynamic.IN' (CHARACTER)
        (0x03000000:PCDataField)http://smart.com.ph/svd/:AtomicRequestReplyToQMgr   = 'IB9QMgr' (CHARACTER)
        (0x01000000:Folder     )http://smart.com.ph/svd/:AtomicRequestJavaClassPath =
        (0x03000000:PCDataField)http://smart.com.ph/svd/:TimeStamp                  = '2014-07-28T12:00:00' (CHARACTER)
      )
      (0x01000000:Folder       )http://smart.com.ph/svd/:AtomicResponse   = (
        (0x01000000:Folder)http://smart.com.ph/svd/:AtomicResponsePayload = (
          (0x01000000:Folder)http://smart.com.ph/svd/:CalledQName = (
            (0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:xsi             = 'http://www.w3.org/2001/XMLSchema-instance' (CHARACTER)
            (0x03000100:Attribute    )http://www.w3.org/2001/XMLSchema-instance:nil = 'true' (CHARACTER)
          )
        )
      )
      (0x01000000:Folder       )http://smart.com.ph/svd/:MessageVariables = (
        (0x03000000:PCDataField)http://smart.com.ph/svd/:OriginalReplyToQ     = 'StaticVsDynamic.REPLY' (CHARACTER)
        (0x03000000:PCDataField)http://smart.com.ph/svd/:OriginalReplyToQMgr  = 'IB9QMgr' (CHARACTER)
        (0x03000000:PCDataField)http://smart.com.ph/svd/:OriginalCorrelId     = 'svd:OriginalCorrelId' (CHARACTER)
        (0x03000000:PCDataField)http://smart.com.ph/svd/:OriginalMsgId        = 'svd:OriginalMsgId' (CHARACTER)
        (0x03000000:PCDataField)http://smart.com.ph/svd/:AtomicServiceQ       = 'svd:AtomicServiceQ' (CHARACTER)
        (0x03000000:PCDataField)http://smart.com.ph/svd/:AtomicServiceReplyTo = 'StaticVsDynamic.IN' (CHARACTER)
        (0x03000000:PCDataField)http://smart.com.ph/svd/:AtomicServiceQMgr    = 'IB9QMgr' (CHARACTER)
        (0x01000000:Folder     )http://smart.com.ph/svd/:JavaClassPath        =
        (0x01000000:Folder     )http://smart.com.ph/svd/:ScriptBody           =
        (0x01000000:Folder     )http://smart.com.ph/svd/:OtherVariables       = (
          (0x03000000:PCDataField)http://smart.com.ph/svd/:OVParam1 = 'dynamic' (CHARACTER)
          (0x03000000:PCDataField)http://smart.com.ph/svd/:OVParam2 = '11' (CHARACTER)
          (0x03000000:PCDataField)http://smart.com.ph/svd/:OVParam3 = 'tbd' (CHARACTER)
          (0x03000000:PCDataField)http://smart.com.ph/svd/:OVParam4 = 'tbd' (CHARACTER)
          (0x03000000:PCDataField)http://smart.com.ph/svd/:OVParam5 = 'tbd' (CHARACTER)
        )
        (0x03000000:PCDataField)http://smart.com.ph/svd/:RouteToLabel         = 'ATOMICSERVICE' (CHARACTER)
      )
      (0x03000000:PCDataField  )http://smart.com.ph/svd/:EventKey         = 'SVDMAIN:AtomicServiceOne.IN' (CHARACTER)
    )
  )
)


Does the decision service have trouble with the xsd:choice schema?
Back to top
View user's profile Send private message Send e-mail
MikeOliverAZ
PostPosted: Wed Aug 06, 2014 5:19 pm    Post subject: Eliminated the xsd:choice with no effect Reply with quote

Apprentice

Joined: 10 Jul 2013
Posts: 47

I changed the potentially offending complexType as follows with no effect at all, same exception as above.

Code:
<xsd:complexType name="AtomicRequestPayload">
      <xsd:sequence>
         <xsd:element minOccurs="0" maxOccurs="1" name="AtomicServiceOneRequest" type="svd:AtomicServiceOneRequest"/>
         <xsd:element minOccurs="0" maxOccurs="1" name="AtomicServiceTwoRequest" type="svd:AtomicServiceTwoRequest"/>
         <xsd:element minOccurs="0" maxOccurs="1" name="AtomicServiceThreeRequest" type="svd:AtomicServiceThreeRequest"/>
      </xsd:sequence>
   </xsd:complexType>


So it is not the xsd:choice

I tried cleaning. I tried deleting the .rules and rebuilding the schema but it throws the same exception on the second iteration, every time.
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Aug 07, 2014 5:00 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Did you validate the XML doc against the schema?

Did you notice that the XML doc has Elements and the error is complaining about missing attributes?

Did you notice that your XML doc includes an element named CalledQName which is not one of the choices available?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » IIB Embedded ODM Decision Service Problem
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.