Correlation issue
joshua_hj Nov 28, 2005 8:46 PMDear community,
I hava a process that receives a processID as an input. I want to use that processID for correlation, because each process has a unique processID. The problem is that i cannot correlate my process instances. My process has an receive activity, followed by two invokes and then another receive operation.The second receive operation's input is the processID.
My second receive operation is suppose to correlate the processID and continue the execution, in this case, finish the execution, but is not. It hangs in there and never ends.
The problem is with the correlation. The process instances are not being correlated. So the process hangs in the second receive, because it never detects a call with the same processID.
Should it work like that?
Can i correlate the process instance like that?
I do not have to use the sessionFactory from ATM do I?
That was a solution for that specific problem, right?
Process:
<process name="helloWorld" targetNamespace="http://jbpm.org/examples/hello" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:tns="http://jbpm.org/examples/hello" xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/ws/2003/03/business-process/ http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:impl="http://myapp.com"> <partnerLinks> <!-- realizes the abstract relationship with the caller --> <partnerLink name="caller" partnerLinkType="tns:ROinPLT" myRole="service"/> <partnerLink name="sendData" partnerLinkType="tns:ROInterfaceOM_PINOSLink" partnerRole="ROInterfaceOM_PINOSService"/> <partnerLink name="getData" partnerLinkType="tns:ROInterfaceOM_BDLink" partnerRole="ROInterfaceOM_BDService"/> </partnerLinks> <variables> <!-- holds the incoming message --> <variable name="processID" messageType="tns:processIDMessage"/> <variable name="return" messageType="tns:returnMessage"/> <variable name="getDataInput" messageType="impl:getDataRequest"/> <variable name="getDataOutput" messageType="impl:getDataResponse"/> <variable name="updateInput" messageType="impl:updateEstadoFaseRequest"/> <variable name="updateOutput" messageType="impl:updateEstadoFaseResponse"/> <variable name="sendInput" messageType="impl:sendDataRequest"/> <variable name="sendOutput" messageType="impl:sendDataResponse"/> <variable name="receiveNotification" messageType="tns:notificationMessage"/> <!-- --> </variables> <correlationSets> <correlationSet name="Processinteraction" properties="tns:ProcessOrderId"/> </correlationSets> <sequence name="mainSequence"> <!-- receive a message carrying the name of a person --> <receive operation="initiate" partnerLink="caller" portType="tns:ROinPT" variable="processID" createInstance="yes"> <correlations> <correlation set="Processinteraction" initiate="yes"/> </correlations> </receive> <assign name="copyID"> <copy> <from expression="bpel:getVariableData('processID', 'processID')"/> <to variable="getDataInput" part="in0"/> </copy> </assign> <invoke name="getData" inputVariable="getDataInput" partnerLink="getData" operation="getData" portType="impl:ROInterfaceOM_BD" outputVariable="getDataOutput"> </invoke> <assign name="copy2sendData"> <copy> <from expression="bpel:getVariableData('getDataOutput', 'getDataReturn')"/> <to variable="sendInput" part="in0"/> </copy> </assign> <invoke name="sendData" inputVariable="sendInput" partnerLink="sendData" operation="sendData" portType="impl:ROInterfaceOM_PINOS" outputVariable="sendOutput"> </invoke> <assign name="copy2update"> <copy> <from expression="'C'"/> <to variable="updateInput" part="in0"/> </copy> </assign> <invoke name="getData" inputVariable="updateInput" partnerLink="getData" operation="updateEstadoFase" portType="impl:ROInterfaceOM_BD" outputVariable="updateOutput"> </invoke> <!-- Second receive --> <scope name="waiting4CadRede"> <sequence name="response"> <variable name="return" messageType="tns:returnMessage"/> <receive name="receiveFromCadRede" partnerLink="caller" portType="tns:ROinPT" operation="receiveNotification" variable="receiveNotification" createInstance="no"> <correlations> <correlation set="Processinteraction" initiate="no"/> </correlations> </receive> <assign name="copy2return"> <copy> <from expression="bpel:getVariableData('getDataOutput', 'getDataReturn')"/> <to variable="return" part="return"/> </copy> </assign> </sequence> </scope> <!-- reply with a message carrying the greeting --> <reply operation="initiate" partnerLink="caller" portType="tns:ROinPT" variable="return"/> </sequence> </process>
wsdl:
<definitions targetNamespace="http://jbpm.org/examples/hello" xmlns:tns="http://jbpm.org/examples/hello" xmlns:impl="http://myapp.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/"> <!-- getData WS --> <import namespace="http://myapp.com" location="http://runner:8080/ROInterfaceOM_BD/exactpath/jse?wsdl"/> <!-- sendData WS --> <import namespace="http://myapp.com" location="http://runner:8080/ROInterfaceOM_PINOS/exactpath/jse?wsdl"/> <bpel:property name="ProcessOrderId" type="xsd:string"/> <bpel:propertyAlias propertyName="tns:ProcessOrderId" messageType="tns:processIDMessage" part="processID"/> <bpel:propertyAlias propertyName="tns:ProcessOrderId" messageType="tns:notificationMessage" part="processID"/> <plt:partnerLinkType name="ROInterfaceOM_PINOSLink"> <plt:role name="ROInterfaceOM_PINOSService"> <plt:portType name="impl:ROInterfaceOM_PINOS"/> </plt:role> </plt:partnerLinkType> <plt:partnerLinkType name="ROInterfaceOM_BDLink"> <plt:role name="ROInterfaceOM_BDService"> <plt:portType name="impl:ROInterfaceOM_BD"/> </plt:role> </plt:partnerLinkType> <!-- characterizes the relationship between the process and its caller --> <plt:partnerLinkType name="ROinPLT"> <plt:role name="service"> <plt:portType name="tns:ROinPT"/> </plt:role> </plt:partnerLinkType> <message name="processIDMessage"> <part name="processID" type="xsd:string"/> </message> <message name="notificationMessage"> <part name="processID" type="xsd:string"/> </message> <message name="returnMessage"> <part name="return" type="xsd:string"/> </message> <portType name="ROinPT"> <operation name="initiate"> <input message="tns:processIDMessage"/> <output message="tns:returnMessage"/> </operation> <operation name="receiveNotification"> <input message="tns:notificationMessage"/> <output message="tns:returnMessage"/> </operation> </portType> <!-- carries the name of a person --> <!-- carries the greeting --> <!-- describes the interface presented to callers --> </definitions>