2 Replies Latest reply on Jan 11, 2006 4:21 AM by Roy Forever

    Correlation Problem

    Roy Forever Newbie

      Excuse me,

      I have a process contains correlation see below codes.
      It looks correct but while execution, it always complete with exception.

      For debug reason, I define a partnerLink "logger"
      which working as System.out.println(...)
      When I execute again, I found that the exception is thrown at the end.

      Would you like to tell me the solution of it?

      <?xml version="1.0" encoding="UTF-8"?>
      <bpws:process
       xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
       xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
       xmlns:my="http://company/BankLoanRequest"
       xmlns:bankloan="http://external.company/BankLoan"
       xmlns:blacklist="http://internal.company/BlackList"
       xmlns:customer="http://internal.company/Customer"
       xmlns:logger="http://internal.company/Logger"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       name="BankLoanRequest" suppressJoinFailure="yes"
       targetNamespace="http://company/BankLoanRequest">
      
       <bpws:partnerLinks>
       <bpws:partnerLink name="client" myRole="BankLoanRequest_Role"
       partnerLinkType="my:BankLoanRequest_PLT"/>
       <bpws:partnerLink name="bankloan"
       partnerRole="BankLoan_PartnerRole"
       partnerLinkType="my:BankLoan_PLT"/>
       <bpws:partnerLink name="blacklist"
       partnerRole="BlackList_PartnerRole"
       partnerLinkType="my:BlackList_PLT"/>
       <bpws:partnerLink name="customer"
       partnerRole="Customer_PartnerRole"
       partnerLinkType="my:Customer_PLT"/>
       <bpws:partnerLink name="logger" partnerRole="Logger_PartnerRole"
       partnerLinkType="my:Logger_PLT"/>
       </bpws:partnerLinks>
      
       <bpws:variables>
       <bpws:variable messageType="my:RequestMessage" name="in"/>
       <bpws:variable messageType="my:ResponseMessage" name="out"/>
       <bpws:variable messageType="my:ConfirmMessage" name="confirm"/>
       <bpws:variable messageType="bankloan:LoanRequest"
       name="bankloanIn"/>
       <bpws:variable messageType="bankloan:LoanResult"
       name="bankloanOut"/>
       <bpws:variable messageType="customer:LoginRequest"
       name="customerIn"/>
       <bpws:variable messageType="customer:LoginResult"
       name="customerOut"/>
       <bpws:variable messageType="customer:FaultResult"
       name="customerFault"/>
       <bpws:variable messageType="blacklist:CustomerInfo"
       name="blacklistIn"/>
       <bpws:variable messageType="blacklist:BlackListResult"
       name="blacklistOut"/>
       <bpws:variable messageType="logger:LogInfo" name="loggerIn"/>
       </bpws:variables>
      
       <bpws:correlationSets>
       <bpws:correlationSet name="csSessionId"
       properties="my:sessionId"/>
       </bpws:correlationSets>
      
       <bpws:sequence>
       <bpws:receive createInstance="yes" name="receiveRequest"
       operation="requestLoan" partnerLink="client"
       portType="my:BankLoanRequestPortType" variable="in"/>
      
       <bpws:scope>
       <bpws:faultHandlers>
       <bpws:catchAll>
       <bpws:sequence>
       <bpws:assign>
       <bpws:copy>
       <bpws:from expression="'Fault'"/>
       <bpws:to variable="loggerIn" part="message"/>
       </bpws:copy>
       </bpws:assign>
      
       <bpws:invoke name="log" operation="log"
       partnerLink="logger" portType="logger:LoggerPortType"
       inputVariable="loggerIn"/>
      
       <bpws:throw faultName="my:fault"
       faultVariable="customerFault"/>
       </bpws:sequence>
       </bpws:catchAll>
       </bpws:faultHandlers>
      
       <bpws:sequence>
       <bpws:assign>
       <bpws:copy>
       <bpws:from variable="in" part="request"
       query="/request/customer"/>
       <bpws:to variable="customerIn" part="info"/>
       </bpws:copy>
       <bpws:copy>
       <bpws:from expression="'Invoke Customer'"/>
       <bpws:to variable="loggerIn" part="message"/>
       </bpws:copy>
       </bpws:assign>
      
       <bpws:invoke name="log" operation="log" partnerLink="logger"
       portType="logger:LoggerPortType" inputVariable="loggerIn"/>
      
       <bpws:invoke name="login" operation="login"
       partnerLink="customer" portType="customer:CustomerPortType"
       inputVariable="customerIn" outputVariable="customerOut"
       faultVariable="customerFault">
       <bpws:correlations>
       <bpws:correlation set="csSessionId" pattern="in"
       initiate="yes"/>
       </bpws:correlations>
       </bpws:invoke>
      
       <bpws:assign>
       <bpws:copy>
       <bpws:from variable="in" part="request"
       query="/request/customer/userid"/>
       <bpws:to variable="blacklistIn" part="userid"/>
       </bpws:copy>
       <bpws:copy>
       <bpws:from expression="'Invoke BlackList'"/>
       <bpws:to variable="loggerIn" part="message"/>
       </bpws:copy>
       </bpws:assign>
      
       <bpws:invoke name="log" operation="log" partnerLink="logger"
       portType="logger:LoggerPortType" inputVariable="loggerIn"/>
      
       <bpws:invoke name="isBlackListed" operation="isBlackListed"
       partnerLink="blacklist" portType="blacklist:BlackListPortType"
       inputVariable="blacklistIn" outputVariable="blacklistOut"/>
      
       <bpws:switch>
       <bpws:case condition="bpws:getVariableData('blacklistOut',
       'isBlackListed')">
       <bpws:sequence>
       <bpws:assign>
       <bpws:copy>
       <bpws:from expression="'Sorry!!! Your request is
       rejected'"/>
       <bpws:to variable="customerFault" part="ref"
       query="/ref/OperationFault/reason"/>
       </bpws:copy>
       <bpws:copy>
       <bpws:from expression="'BlackList Found'"/>
       <bpws:to variable="loggerIn" part="message"/>
       </bpws:copy>
       </bpws:assign>
      
       <bpws:invoke name="log" operation="log"
       partnerLink="logger" portType="logger:LoggerPortType"
       inputVariable="loggerIn"/>
      
       <bpws:throw faultName="my:fault"
       faultVariable="customerFault"/>
       </bpws:sequence>
       </bpws:case>
       <bpws:otherwise>
       <bpws:empty/>
       </bpws:otherwise>
       </bpws:switch>
      
       <bpws:assign>
       <bpws:copy>
       <bpws:from variable="customerOut" part="result"
       query="/result/sessionid"/>
       <bpws:to variable="bankloanIn" part="info"
       query="/info/sessionid"/>
       </bpws:copy>
       <bpws:copy>
       <bpws:from variable="in" part="request"
       query="/request/amount"/>
       <bpws:to variable="bankloanIn" part="info"
       query="/info/amount"/>
       </bpws:copy>
       <bpws:copy>
       <bpws:from expression="'Invoke BankLoan'"/>
       <bpws:to variable="loggerIn" part="message"/>
       </bpws:copy>
       </bpws:assign>
      
       <bpws:invoke name="log" operation="log" partnerLink="logger"
       portType="logger:LoggerPortType" inputVariable="loggerIn"/>
      
       <bpws:invoke name="loan" operation="loan"
       partnerLink="bankloan" portType="bankloan:BankLoanPortType"
       inputVariable="bankloanIn" outputVariable="bankloanOut"/>
      
       <bpws:assign>
       <bpws:copy>
       <bpws:from variable="bankloanOut" part="result"/>
       <bpws:to variable="out" part="response"
       query="/response/result"/>
       </bpws:copy>
       <bpws:copy>
       <bpws:from variable="customerOut" part="result"
       query="/result/sessionid"/>
       <bpws:to variable="out" part="response"
       query="/response/referenceid"/>
       </bpws:copy>
       <bpws:copy>
       <bpws:from expression="'Return Result'"/>
       <bpws:to variable="loggerIn" part="message"/>
       </bpws:copy>
       </bpws:assign>
      
       <bpws:invoke name="log" operation="log" partnerLink="logger"
       portType="logger:LoggerPortType" inputVariable="loggerIn"/>
      
       <bpws:reply name="sendReport" operation="requestLoan"
       partnerLink="client" portType="my:BankLoanRequestPortType"
       variable="out"/>
      
       <bpws:pick>
       <bpws:onMessage operation="confirm" partnerLink="client"
       portType="my:BankLoanRequestPortType" variable="confirm">
       <bpws:correlations>
       <bpws:correlation pattern="in" set="csSessionId"/>
       </bpws:correlations>
      
       <bpws:sequence>
       <bpws:assign>
       <bpws:copy>
       <bpws:from expression="concat('Confirm: ',
       bpws:getVariableData('confirm', 'referenceid'))"/>
       <bpws:to variable="loggerIn" part="message"/>
       </bpws:copy>
       </bpws:assign>
      
       <bpws:invoke name="log" operation="log"
       partnerLink="logger" portType="logger:LoggerPortType"
       inputVariable="loggerIn"/>
       <bpws:invoke name="log" operation="log"
       partnerLink="logger" portType="logger:LoggerPortType"
       inputVariable="loggerIn"/>
       </bpws:sequence>
       </bpws:onMessage>
       </bpws:pick>
       </bpws:sequence>
       </bpws:scope>
       </bpws:sequence>
      </bpws:process>
      


      <?xml version="1.0" encoding="UTF-8"?>
      <definitions
       xmlns="http://schemas.xmlsoap.org/wsdl/"
       xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
       xmlns:my="http://company/BankLoanRequest"
       xmlns:bankloan="http://external.company/BankLoan"
       xmlns:blacklist="http://internal.company/BlackList"
       xmlns:customer="http://internal.company/Customer"
       xmlns:logger="http://internal.company/Logger"
       xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       name="BankLoadRequest"
       targetNamespace="http://company/BankLoanRequest">
      
       <import namespace="http://external.company/BankLoan"
       location="BankLoan.wsdl"/>
       <import namespace="http://internal.company/BlackList"
       location="BlackList.wsdl"/>
       <import namespace="http://internal.company/Customer"
       location="Customer.wsdl"/>
       <import namespace="http://internal.company/Logger"
       location="Logger.wsdl"/>
      
       <bpws:property name="sessionId" type="xsd:int"/>
       <bpws:propertyAlias propertyName="my:sessionId"
       messageType="customer:LoginResult" part="result"
       query="/result/sessionid"/>
       <bpws:propertyAlias propertyName="my:sessionId"
       messageType="my:ConfirmMessage" part="referenceid"/>
      
       <plnk:partnerLinkType name="BankLoanRequest_PLT">
       <plnk:role name="BankLoanRequest_Role">
       <plnk:portType name="my:BankLoanRequestPortType"/>
       </plnk:role>
       </plnk:partnerLinkType>
      
       <plnk:partnerLinkType name="BankLoan_PLT">
       <plnk:role name="BankLoan_PartnerRole">
       <plnk:portType name="bankloan:BankLoanPortType"/>
       </plnk:role>
       </plnk:partnerLinkType>
      
       <plnk:partnerLinkType name="BlackList_PLT">
       <plnk:role name="BlackList_PartnerRole">
       <plnk:portType name="blacklist:BlackListPortType"/>
       </plnk:role>
       </plnk:partnerLinkType>
      
       <plnk:partnerLinkType name="Customer_PLT">
       <plnk:role name="Customer_PartnerRole">
       <plnk:portType name="customer:CustomerPortType"/>
       </plnk:role>
       </plnk:partnerLinkType>
      
       <plnk:partnerLinkType name="Logger_PLT">
       <plnk:role name="Logger_PartnerRole">
       <plnk:portType name="logger:LoggerPortType"/>
       </plnk:role>
       </plnk:partnerLinkType>
      
       <types>
       <schema targetNamespace="http://company/BankLoanRequest"
       xmlns="http://www.w3.org/2001/XMLSchema">
       <complexType name="RequestMessageType">
       <sequence>
       <element name="customer" type="customer:LoginRequestType"/>
       <element name="amount" type="double"/>
       </sequence>
       </complexType>
       <complexType name="ResponseMessageType">
       <sequence>
       <element name="result" type="bankloan:LoanResultType"/>
       <element name="referenceid" type="int"/>
       </sequence>
       </complexType>
       </schema>
       </types>
      
       <message name="RequestMessage">
       <part type="my:RequestMessageType" name="request"/>
       </message>
       <message name="ResponseMessage">
       <part type="my:ResponseMessageType" name="response"/>
       </message>
       <message name="ConfirmMessage">
       <part type="xsd:int" name="referenceid"/>
       </message>
      
       <portType name="BankLoanRequestPortType">
       <operation name="requestLoan">
       <input message="my:RequestMessage" name="form"/>
       <output message="my:ResponseMessage" name="report"/>
       <fault message="customer:FaultResult" name="fault"/>
       </operation>
       <operation name="confirm">
       <input message="my:ConfirmMessage" name="reference"/>
       </operation>
       </portType>
      </definitions>
      


      14:27:21,937 WARN [DeserializationContextImpl] Ignoring invalid namespace mapping: [prefix=,uri=]
      14:27:22,750 INFO [STDOUT] Invoke Customer
      14:27:23,046 INFO [STDOUT] company.internal.customer.CustomerPortType_Impl@1ab6db4: login("2", "peter")
      14:27:23,046 INFO [STDOUT] company.internal.customer.CustomerPortType_Impl@1ab6db4: Generate Session ID
      14:27:23,265 INFO [STDOUT] Invoke BlackList
      14:27:23,375 INFO [STDOUT] company.internal.blacklist.BlackListPortType_Impl@d2a14b: isBlackListed("2")
      14:27:23,921 INFO [STDOUT] Invoke BankLoan
      14:27:24,000 INFO [STDOUT] company.external.bankloan.BankLoanPortType_Impl@83c31c: loan(-1291890394, 7500.0)
      14:27:24,234 INFO [STDOUT] Return Result
      14:27:26,093 WARN [DeserializationContextImpl] Ignoring invalid namespace mapping: [prefix=,uri=]
      14:27:27,015 INFO [STDOUT] Confirm: -1291890394
      14:27:27,125 INFO [STDOUT] Confirm: -1291890394
      14:27:27,437 ERROR [RequestListener] could not deliver request
      org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.service.messager.RequestListener.onMessage(RequestListener.java:115)
       at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:707)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.Pick.pickPath(Pick.java:106)
       at org.jbpm.bpel.def.Pick.messageReceived(Pick.java:68)
       at org.jbpm.bpel.service.messager.RequestListener.onMessage(RequestListener.java:112)
       ... 2 more
      Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.StructuredActivity.execute(StructuredActivity.java:47)
       at org.jbpm.bpel.def.StructuredActivity$StructureStart.leave(StructuredActivity.java:246)
       at org.jbpm.graph.def.Node.execute(Node.java:305)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 7 more
      Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:149)
       at org.jbpm.bpel.def.Assign.execute(Assign.java:36)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 13 more
      Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:149)
       at org.jbpm.bpel.def.Invoke.execute(Invoke.java:28)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 18 more
      Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:149)
       at org.jbpm.bpel.def.Invoke.execute(Invoke.java:28)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 23 more
      Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:149)
       at org.jbpm.bpel.def.StructuredActivity.leave(StructuredActivity.java:51)
       at org.jbpm.bpel.def.StructuredActivity$StructureEnd.execute(StructuredActivity.java:277)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 28 more
      Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:149)
       at org.jbpm.bpel.def.StructuredActivity.leave(StructuredActivity.java:51)
       at org.jbpm.bpel.def.StructuredActivity$StructureEnd.execute(StructuredActivity.java:277)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 34 more
      Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
       at org.jbpm.graph.def.Transition.take(Transition.java:92)
       at org.jbpm.graph.def.Node.leave(Node.java:349)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:149)
       at org.jbpm.bpel.exe.ScopeInstance.notifyCompletion(ScopeInstance.java:222)
       at org.jbpm.bpel.exe.state.ActiveState.enterCompleted(ActiveState.java:57)
       at org.jbpm.bpel.exe.state.ActiveState$1.completed(ActiveState.java:19)
       at org.jbpm.bpel.exe.ScopeInstance.completed(ScopeInstance.java:76)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:158)
       at org.jbpm.bpel.def.StructuredActivity.leave(StructuredActivity.java:51)
       at org.jbpm.bpel.def.StructuredActivity$StructureEnd.execute(StructuredActivity.java:277)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 40 more
      Caused by: org.hibernate.HibernateException: null index column for collection: org.jbpm.graph.exe.Token.children
       at org.hibernate.persister.collection.AbstractCollectionPersister.readIndex(AbstractCollectionPersister.java:652
      )
       at org.hibernate.collection.PersistentMap.readFrom(PersistentMap.java:222)
       at org.hibernate.loader.Loader.readCollectionElement(Loader.java:994)
       at org.hibernate.loader.Loader.readCollectionElements(Loader.java:635)
       at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:579)
       at org.hibernate.loader.Loader.doQuery(Loader.java:689)
       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
       at org.hibernate.loader.Loader.loadCollection(Loader.java:1916)
       at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:71)
       at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:52
      0)
       at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeColl
      ectionEventListener.java:60)
       at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1593)
       at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
       at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
       at org.hibernate.collection.PersistentMap.values(PersistentMap.java:198)
       at org.jbpm.graph.exe.Token.end(Token.java:168)
       at org.jbpm.graph.exe.Token.end(Token.java:146)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:157)
       at org.jbpm.bpel.def.StructuredActivity.leave(StructuredActivity.java:51)
       at org.jbpm.bpel.def.StructuredActivity$StructureEnd.execute(StructuredActivity.java:277)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
       ... 51 more
      


      Thank you very much ^^
      Roy

        • 1. Re: Correlation Problem
          Alejandro Guizar Master

          Looks like this error happens when the token iterates over its chilldren to end them. I guess the Hibernate mappings have a bug. I'm not sure, tough. I'll set up a project and try to reproduce the problem. Could you share the WSDL definitions of your partner processes?

          By the way, your process is interesting. Would you mind my using it as a third example once the problem is solved?

          • 2. Re: Correlation Problem
            Roy Forever Newbie

            I am not mind this process to be the third example once the problem is solved.
            And the WSDL definitions of partner processes are as following.

            BankLoan.wsdl

            <?xml version="1.0" encoding="UTF-8"?>
            <definitions targetNamespace="http://external.company/BankLoan"
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:my="http://external.company/BankLoan"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
             <types>
             <schema targetNamespace="http://external.company/BankLoan"
             xmlns="http://www.w3.org/2001/XMLSchema">
             <complexType name="LoanRequestType">
             <sequence>
             <element name="sessionid" type="int"/>
             <element name="amount" type="double"/>
             </sequence>
             </complexType>
             <complexType name="LoanResultType">
             <sequence>
             <element name="instruction" type="string"/>
             <element name="charge" type="double"/>
             <element name="amount" type="double"/>
             </sequence>
             </complexType>
             </schema>
             </types>
             <message name="LoanRequest">
             <part name="info" type="my:LoanRequestType"/>
             </message>
             <message name="LoanResult">
             <part name="result" type="my:LoanResultType"/>
             </message>
             <portType name="BankLoanPortType">
             <operation name="loan">
             <input message="my:LoanRequest" name="form"/>
             <output message="my:LoanResult" name="result"/>
             </operation>
             </portType>
            </definitions>
            


            BankLoan_SVC.wsdl
            <?xml version="1.0" encoding="UTF-8"?>
            <definitions targetNamespace="http://external.company/BankLoan"
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:my="http://external.company/BankLoan"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
             http://schemas.xmlsoap.org/wsdl/">
            
             <import namespace="http://external.company/BankLoan" location="BankLoan.wsdl" />
            
             <binding name="BankLoanSoapBinding" type="my:BankLoanPortType">
             <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
             <operation name="loan">
             <soap:operation/>
             <input>
             <soap:body use="literal" namespace="http://external.company/BankLoan"/>
             </input>
             <output>
             <soap:body use="literal" namespace="http://external.company/BankLoan"/>
             </output>
             </operation>
             </binding>
            
             <service name="BankLoanService">
             <port name="BankLoanPortType" binding="my:BankLoanSoapBinding">
             <soap:address location="REPLACE_WITH_ACTUAL_URI" />
             </port>
             </service>
            </definitions>
            


            BlackList.wsdl
            <?xml version="1.0" encoding="UTF-8"?>
            <definitions targetNamespace="http://internal.company/BlackList"
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:my="http://internal.company/BlackList"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            
             <message name="CustomerInfo">
             <part name="userid" type="xsd:int"/>
             </message>
             <message name="BlackListResult">
             <part name="isBlackListed" type="xsd:boolean"/>
             </message>
            
             <portType name="BlackListPortType">
             <operation name="isBlackListed">
             <input message="my:CustomerInfo" name="info"/>
             <output message="my:BlackListResult" name="result"/>
             </operation>
             </portType>
            </definitions>
            


            BlackList_SVC.wsdl
            <?xml version="1.0" encoding="UTF-8"?>
            <definitions targetNamespace="http://internal.company/BlackList"
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:my="http://internal.company/BlackList"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
             http://schemas.xmlsoap.org/wsdl/">
            
             <import namespace="http://internal.company/BlackList" location="BlackList.wsdl" />
            
             <binding name="BlackListSoapBinding" type="my:BlackListPortType">
             <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
             <operation name="isBlackListed">
             <soap:operation/>
             <input>
             <soap:body use="literal" namespace="http://internal.company/BlackList"/>
             </input>
             <output>
             <soap:body use="literal" namespace="http://internal.company/BlackList"/>
             </output>
             </operation>
             </binding>
            
             <service name="BlackListService">
             <port name="BlackListPortType" binding="my:BlackListSoapBinding">
             <soap:address location="REPLACE_WITH_ACTUAL_URI" />
             </port>
             </service>
            </definitions>
            


            Customer.wsdl
            <?xml version="1.0" encoding="UTF-8"?>
            <definitions targetNamespace="http://internal.company/Customer"
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:my="http://internal.company/Customer"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
             <types>
             <schema targetNamespace="http://internal.company/Customer"
             xmlns="http://www.w3.org/2001/XMLSchema">
             <complexType name="LoginRequestType">
             <sequence>
             <element name="userid" type="int"/>
             <element name="password" type="string"/>
             </sequence>
             </complexType>
             <complexType name="LoginResultType">
             <sequence>
             <element name="sessionid" type="int"/>
             </sequence>
             </complexType>
             <element name="OperationFault" type="my:OperationFaultType"/>
             <complexType name="OperationFaultType">
             <sequence>
             <element name="reason" type="string"/>
             </sequence>
             </complexType>
             </schema>
             </types>
             <message name="LoginRequest">
             <part name="info" type="my:LoginRequestType"/>
             </message>
             <message name="LoginResult">
             <part name="result" type="my:LoginResultType"/>
             </message>
             <message name="FaultResult">
             <part name="ref" element="my:OperationFault"/>
             </message>
            
             <portType name="CustomerPortType">
             <operation name="login">
             <input message="my:LoginRequest" name="info"/>
             <output message="my:LoginResult" name="result"/>
             <fault message="my:FaultResult" name="fault"/>
             </operation>
             </portType>
            </definitions>
            


            Customer_SVC.wsdl
            <?xml version="1.0" encoding="UTF-8"?>
            <definitions targetNamespace="http://internal.company/Customer"
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:my="http://internal.company/Customer"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
             http://schemas.xmlsoap.org/wsdl/">
            
             <import namespace="http://internal.company/Customer" location="Customer.wsdl" />
            
             <binding name="CustomerSoapBinding" type="my:CustomerPortType">
             <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
             <operation name="login">
             <soap:operation/>
             <input>
             <soap:body use="literal" namespace="http://internal.company/Customer"/>
             </input>
             <output>
             <soap:body use="literal" namespace="http://internal.company/Customer"/>
             </output>
             <fault name="fault">
             <soap:fault use="literal" namespace="http://internal.company/Customer"/>
             </fault>
             </operation>
             </binding>
            
             <service name="CustomerService">
             <port name="CustomerPortType" binding="my:CustomerSoapBinding">
             <soap:address location="REPLACE_WITH_ACTUAL_URI" />
             </port>
             </service>
            </definitions>
            


            Logger.wsdl
            <?xml version="1.0" encoding="UTF-8"?>
            <definitions targetNamespace="http://internal.company/Logger"
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:my="http://internal.company/Logger"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            
             <message name="LogInfo">
             <part name="message" type="xsd:string"/>
             </message>
            
             <portType name="LoggerPortType">
             <operation name="log">
             <input message="my:LogInfo" name="info"/>
             </operation>
             </portType>
            </definitions>
            


            Logger_SVC.wsdl
            <?xml version="1.0" encoding="UTF-8"?>
            <definitions targetNamespace="http://internal.company/Logger"
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:my="http://internal.company/Logger"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
             http://schemas.xmlsoap.org/wsdl/">
            
             <import namespace="http://internal.company/Logger" location="Logger.wsdl" />
            
             <binding name="LoggerSoapBinding" type="my:LoggerPortType">
             <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
             <operation name="log">
             <soap:operation/>
             <input>
             <soap:body use="literal" namespace="http://internal.company/Logger"/>
             </input>
             </operation>
             </binding>
            
             <service name="LoggerService">
             <port name="LoggerPortType" binding="my:LoggerSoapBinding">
             <soap:address location="REPLACE_WITH_ACTUAL_URI" />
             </port>
             </service>
            </definitions>