3 Replies Latest reply on Feb 8, 2006 7:58 PM by adrian.andrei

    Unexpected process end in the mid of a bpel

      Hi,

      I wrote a simple process with the following bpel:

      <?xml version="1.0" encoding="UTF-8"?>
      <process name="jbpmTestProcess" targetNamespace="urn:my:namespace"
       xmlns:tns="urn:my:namespace"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       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="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
      
       <partnerLinks>
       <partnerLink name="defaultPLNK" partnerLinkType="tns:defaultPlnkT" myRole="service"/>
       </partnerLinks>
      
       <variables>
       <variable name="request1" messageType="tns:theMessage"/>
       <variable name="request2" messageType="tns:theMessage"/>
       <variable name="response1" messageType="tns:theMessage"/>
       <variable name="response2" messageType="tns:theMessage"/>
       </variables>
      
       <correlationSets>
       <correlationSet name="id" properties="tns:id"/>
       </correlationSets>
       <sequence>
       <receive name="rec1" variable="request1" partnerLink="defaultPLNK" portType="tns:jbpmTestProcessPT" createInstance="yes" operation="init">
       <correlations>
       <correlation set="id" initiate="yes"/>
       </correlations>
       </receive>
       <assign name="assign1">
       <copy>
       <from expression="concat('response to request with text ',bpel:getVariableData('request1','text'))"/>
       <to variable="response1" part="text"/>
       </copy>
       <copy>
       <from variable="request1" part="id"/>
       <to variable="response1" part="id"/>
       </copy>
       </assign>
       <reply name="rep1" variable="response1" partnerLink="defaultPLNK" portType="tns:jbpmTestProcessPT" operation="init">
       <correlations>
       <correlation set="id"/>
       </correlations>
       </reply>
       <receive name="rec2" operation="op2" variable="request2" partnerLink="defaultPLNK" portType="tns:jbpmTestProcessPT">
       <correlations>
       <correlation set="id"/>
       </correlations>
       </receive>
       <assign name="idass">
       <copy>
       <from variable="request2" part="id"/>
       <to variable="response2" part="id"/>
       </copy>
       </assign>
       <assign name="assign2">
       <copy>
       <from expression="concat('response to request with init text ',bpel:getVariableData('request1','text'))"/>
       <to variable="response2" part="text"/>
       </copy>
       </assign>
       <reply name="rep2" variable="response2" partnerLink="defaultPLNK" portType="tns:jbpmTestProcessPT" operation="op2">
       <correlations>
       <correlation set="id"/>
       </correlations>
       </reply>
       </sequence>
      </process>

      When I tried to execute the process, my client didn't get the second response and the last entries in the server's log were the following:
      2006-01-16 13:42:24,890 DEBUG [org.jbpm.graph.def.GraphElement] event 'node-leave' on 'Assign(idass)' for 'Token(/normalFlow)'
      2006-01-16 13:42:24,890 DEBUG [org.jbpm.graph.def.GraphElement] event 'transition' on 'Transition(4eba57)' for 'Token(/normalFlow)'
      2006-01-16 13:42:24,890 DEBUG [org.jbpm.graph.def.GraphElement] event 'node-enter' on 'Assign(assign2)' for 'Token(/normalFlow)'
      2006-01-16 13:42:24,953 DEBUG [org.jbpm.graph.def.GraphElement] event 'process-end' on 'BpelDefinition(jbpmTestProcess)' for 'Token(/)'

      This looks to me like a process termination right in the middle of the assign activity. The only reason for this I can imagine is that I read the variable 'request1' twice (once in assign "assign1" and once in assign "assign2"), but that makes no sense to me.
      What's the error I made?

      For better understanding, my wsdl:
      <?xml version="1.0" encoding="UTF-8"?>
      <definitions targetNamespace="urn:my:namespace"
       xmlns:tns="urn:my:namespace"
       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:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
       xmlns="http://schemas.xmlsoap.org/wsdl/">
      
       <bpel:property name="id" type="xsd:int"/>
       <bpel:propertyAlias propertyName="tns:id" messageType="tns:theMessage" part="id"/>
      
       <plt:partnerLinkType name="defaultPlnkT">
       <plt:role name="service">
       <plt:portType name="tns:jbpmTestProcessPT"/>
       </plt:role>
       </plt:partnerLinkType>
      
       <message name="theMessage">
       <part name="id" type="xsd:int"/>
       <part name="text" type="xsd:string"/>
       </message>
      
       <portType name="jbpmTestProcessPT">
       <operation name="init">
       <input message="tns:theMessage"/>
       <output message="tns:theMessage"/>
       </operation>
       <operation name="op2">
       <input message="tns:theMessage"/>
       <output message="tns:theMessage"/>
       </operation>
       </portType>
      </definitions>

      Greetings,
      Martin