1 Reply Latest reply on Jul 14, 2006 5:30 PM by Alejandro Guizar

    Not being able to resume a process instance after server res

    Jiehuan Li Newbie

      I have two invokes with a receive in between, and they are all correlated. When my testing client calls 'connect' and then 'connect2' in turn with the same correlation id, everything works fine, however if I restart the jboss server between calling 'connect' and 'connect2', 'connect2' would fail. As everything is persisted in bpel, I should expect 'connect2' to succeed, shouldn't I?

      Below is my bpel definition:

      <?xml version="1.0" encoding="UTF-8"?>
      <process name="jbpmbpelFrontEnd" targetNamespace="com:vizuri:bpel:jbpmbpel"
       xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
       xmlns:tns="com:vizuri:bpel:jbpmbpel" xmlns:jbpmbpel="com:vizuri:bpel:jbpmbpel" xmlns:typ="com:vizuri:bpel:types"
       xmlns:svc="http://webservice.vizuri.com/jaws" xmlns:svc2="http://webservice.vizuri.com/jaws"
       xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       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/">
      
       <partnerLinks>
       <partnerLink name="jbpmbpelRelation" partnerLinkType="tns:jbpmbpel-front" myRole="frontEnd" />
       <partnerLink name="svcRelation" partnerLinkType="tns:front-svc" partnerRole="svcRole" />
       <partnerLink name="svc2Relation" partnerLinkType="tns:front-svc2" partnerRole="svc2Role" />
       </partnerLinks>
      
      
       <variables>
       <variable name="connectReq" messageType="jbpmbpel:jbpmbpelInputMessage" />
       <variable name="connectResp" messageType="jbpmbpel:jbpmbpelOutputMessage" />
       <variable name="svcReq" messageType="svc:EndpointInterface_echo" />
       <variable name="svc2Req" messageType="svc2:EndpointInterface2_echo2" />
       <variable name="svcOutputMsg" messageType="svc:EndpointInterface_echoResponse" />
       <variable name="svc2OutputMsg" messageType="svc2:EndpointInterface2_echo2Response" />
       <variable name="operationFlt" messageType="jbpmbpel:operationFault" />
       <variable name="temp" messageType="svc2:EndpointInterface2_echo2Response" />
       </variables>
      
       <correlationSets>
       <correlationSet name="callbackInteraction" properties="tns:firstName" />
       </correlationSets>
      
       <faultHandlers>
       <catch faultName="svc:JSR181WebServiceException">
       <sequence>
       <assign name="copyStep2Fault">
       <!--
       <copy>
       <from variable="svcFlt" part="JSR181WebServiceException" query="/JSR181WebServiceException/svc:code"/>
       <to variable="operationFlt" part="detail"/>
       </copy>
       -->
       <copy>
       <from expression="'0002'"/>
       <to variable="operationFlt" part="detail"/>
       </copy>
       </assign>
       <reply operation="connect2" partnerLink="jbpmbpelRelation" portType="jbpmbpel:jbpmbpelFrontEnd"
       variable="operationFlt" faultName="jbpmbpel:step2Fault" />
       </sequence>
       </catch>
       </faultHandlers>
      
       <sequence name="mainSequence">
      
       <receive operation="connect" partnerLink="jbpmbpelRelation" portType="jbpmbpel:jbpmbpelFrontEnd"
       variable="connectReq" createInstance="yes">
      
       <correlations>
       <correlation set="callbackInteraction" initiate="yes" />
       </correlations>
      
       </receive>
      
       <assign name="connectionStart">
       <copy>
       <from variable="connectReq" part="requestAddressLine1" />
       <to variable="svc2Req" part="EnrollmentMessageType_1" query="/EnrollmentMessageType_1/svc2:addressLine1" />
       </copy>
       <copy>
       <from variable="connectReq" part="requestCity" />
       <to variable="svc2Req" part="EnrollmentMessageType_1" query="/EnrollmentMessageType_1/svc2:city" />
       </copy>
       <copy>
       <from variable="connectReq" part="requestDateOfBirth" />
       <to variable="svc2Req" part="EnrollmentMessageType_1" query="/EnrollmentMessageType_1/svc2:dateOfBirth" />
       </copy>
       <copy>
       <from variable="connectReq" part="requestFirstName" />
       <to variable="svc2Req" part="EnrollmentMessageType_1" query="/EnrollmentMessageType_1/svc2:firstName" />
       </copy>
       <copy>
       <from variable="connectReq" part="requestLastName" />
       <to variable="svc2Req" part="EnrollmentMessageType_1" query="/EnrollmentMessageType_1/svc2:lastName" />
       </copy>
       <copy>
       <from variable="connectReq" part="requestState" />
       <to variable="svc2Req" part="EnrollmentMessageType_1" query="/EnrollmentMessageType_1/svc2:state" />
       </copy>
       <copy>
       <from variable="connectReq" part="requestZip" />
       <to variable="svc2Req" part="EnrollmentMessageType_1" query="/EnrollmentMessageType_1/svc2:zip" />
       </copy>
       </assign>
      
       <invoke operation="echo2" partnerLink="svc2Relation" portType="svc2:EndpointInterface2"
       inputVariable="svc2Req" outputVariable="svc2OutputMsg">
      
       <correlations>
       <correlation set="callbackInteraction" pattern="out" />
       </correlations>
      
       </invoke>
      
       <assign name="connectionMiddleReply">
       <copy>
       <from variable="svc2OutputMsg" part="result" query="/result/svc2:firstName" />
       <to variable="connectResp" part="result" />
       </copy>
       </assign>
      
       <reply operation="connect" partnerLink="jbpmbpelRelation" portType="jbpmbpel:jbpmbpelFrontEnd" variable="connectResp">
      
       <correlations>
       <correlation set="callbackInteraction" />
       </correlations>
      
       </reply>
      
       <receive operation="connect2" partnerLink="jbpmbpelRelation" portType="jbpmbpel:jbpmbpelFrontEnd"
       variable="connectReq" createInstance="no">
      
       <correlations>
       <correlation set="callbackInteraction" />
       </correlations>
      
       </receive>
      
       <assign name="connectionBetween">
       <copy>
       <from variable="svc2OutputMsg" part="result"/>
       <to variable="svcReq" part="EnrollmentMessageType_1"/>
       </copy>
       <copy>
       <from variable="connectReq" part="requestZip" />
       <to variable="svcReq" part="EnrollmentMessageType_1" query="/EnrollmentMessageType_1/svc:zip"/>
       </copy>
       </assign>
      
       <invoke operation="echo" partnerLink="svcRelation" portType="svc:EndpointInterface"
       inputVariable="svcReq" outputVariable="svcOutputMsg">
      
       <correlations>
       <correlation set="callbackInteraction" pattern="out" />
       </correlations>
      
       </invoke>
      
       <assign name="connectionEnd">
       <copy>
       <from variable="svcOutputMsg" part="result" query="/result/svc:firstName" />
       <to variable="connectResp" part="result" />
       </copy>
       </assign>
      
       <reply operation="connect2" partnerLink="jbpmbpelRelation" portType="jbpmbpel:jbpmbpelFrontEnd" variable="connectResp">
      
       <correlations>
       <correlation set="callbackInteraction" />
       </correlations>
      
       </reply>
       </sequence>
      
      </process>
      


      And I am running jbpm-bpel-1.1-beta1 on JBoss 404 GA patch 1(installer with ejb3 path because I need annotations) using the default hypersonic datasources. Please help, we wouldn't be able to go production without this working. Thanks!

      Jiehuan