3 Replies Latest reply on Aug 11, 2007 3:46 PM by estaub

    hasEnded not set correctly when sub processes are used

    shridevik_nair

      Hi All,

      I'm using JBPM 3.2GA version.
      I've created a processDefinition which contains sub processes which in turn contains subprocesses.

      if the subprocess has ended and it comes out to the super process which has not yet ended, hasEnded() method when invoked on the token or processInstance returns true.

      why so?

      Thanks and Regards,
      Shridevi

        • 1. Re: hasEnded not set correctly when sub processes are used
          shridevik_nair

          Hi,

          In a process definition which has a sub process, how is the control passed on from the super process instance to the sub processes. Also when the sub processes execution is complete how is the control passed on back to the super process?

          I'm using 3.2GA version and have added the logic for changing the token to the respective process instance's token as and when the control moves from 1 process to another.

          Is this how it should be normally done?

          Thanks in Advance,
          Shridevi

          • 2. Re: hasEnded not set correctly when sub processes are used
            kukeltje

            two different questions... use two topics please....


            regading post 1: can you make a unit test with INTEGRATED processdefinition that demonstrates the problem?

            the 'control' is in de hand of a token. Where the token is defines where the control is. Nothing to it... if you want details, examine the code a little..

            • 3. Re: hasEnded not set correctly when sub processes are used

              How did the subprocess end?
              You probably want to read ProcessState.java (for the parent's perspective) and ProcessInstance.end() (for the child's perspective).

              I'm pretty sure you've made a mistake somewhere... maybe grabbed the wrong token at some point.