3 Replies Latest reply on Feb 24, 2010 6:12 PM by kukeltje

    JBPM subprocesses stuck on inactive-join

      Hi all,

      We have come across a strange problem with our jbpm process. It contains a fork and a join at the end. Both branches execute some subprocesses and when they finish, they meet in a join. Usually after the join, the main execution finishes, but sometimes (very very rarely - total of 3 cases) the processes wait in the join and the main execution never finishes.

      What we can see in the database in the "jbpm4_execution" table, is that the main process is in an "inactive-concurrent-root" state and the two subprocesses are in the "inactive-join" state.

      Has anybody seen something like that? We are just curious if we are doing something wrong or is it a rare bug?

      There is a workaround for that, just do this:

       

      executionService.endProcessInstance(pid, state)

       

      but we would rather not see it in the database at all.

      Any help would be appreciated.

       

      We are using JBPM v4.1,

      Here is our jbpm process in xml:

       

      <?xml version="1.0" encoding="UTF-8"?>

       

      <process name="proc1" xmlns="http://jbpm.org/4.0/jpdl">

       

          <start g="246,25,48,48" name="start">
              <transition g="-68,-18" name="to validation" to="validation"/>
          </start>
         
          <decision g="245,115,48,48" name="validation">
              <handler class="x.validation.ValidationParameters" />
              <transition g="-48,-18" name="error" to="error"/>
              <transition g="-50,-6" name="to fork" to="fork"/>
          </decision>

       

          <end-error g="60,115,48,48" name="error"/>
         
          <fork g="244,194,48,48" name="fork">
              <on event="end" continue="exclusive">
              </on>
              <transition g="3,-18" name="to create cases" to="create cases"/>
              <transition g="-72,-18" name="to search bets" to="search bets"/>
          </fork>

       

          <sub-process g="127,278,92,52" name="search bets" outcome="${result.outcome}" sub-process-key="SearchBets">
              <parameter-in expr="${owner}" subvar="owner"/>
              <parameter-in expr="${eventId}" subvar="eventId"/>
              <parameter-in expr="${timestamp}" subvar="timestamp"/>
              <parameter-out subvar="result" var="searchBetsResult"/>
              <transition g="-35,-18" name="to join" to="join"/>
          </sub-process>

       

          <sub-process g="302,280,92,52" name="create cases" sub-process-key="CreateCases">
              <parameter-in expr="${owner}" subvar="owner"/>
              <parameter-in expr="${eventId}" subvar="eventId"/>
              <parameter-in expr="${timestamp}" subvar="timestamp"/>
              <parameter-in expr="${ticket}" subvar="ticket"/>
              <parameter-in expr="${roleList}" subvar="roleList"/>       
              <transition g="11,-14" name="to join" to="join"/>
          </sub-process>
         
          <join g="235,386,48,48" multiplicity="2" name="join">
            <transition name="to decision" to="decision" g="-56,-18"/>
          </join>
         
          <end g="239,567,48,48" name="end"/>
         <end-error name="errorproc1" g="107,486,48,48"/>
         <decision name="decision" g="237,483,48,48">
         <handler class="x.validation.ValidationEndProcess" />
            <transition name="to errorproc1" to="errorproc1" g="-32,-14"/>
            <transition name="to end" to="end" g="-36,-18"/>
         </decision>
         
      </process>

        • 1. Re: JBPM subprocesses stuck on inactive-join
          kukeltje

          Please try with jBPM 4.3 (or even trunk) since there have been fixes regarding subprocesses.

          If it still fails, try to write a minimalistic unittest that (occademonstrates the problem (that we can put in the jBPM source preferably, or otherwise a full mavenized project) and post that here.

           

          Cheers Ronald

          • 2. Re: JBPM subprocesses stuck on inactive-join
            Thanks for the reply. We will try to switch to v4.3 and we will see what happens. The problem with this issue is, that it happens very rarely and we have not seen it for a while now. We have some unit tests that run our process repeatedly, but we could not reproduce it with those tests.
            • 3. Re: JBPM subprocesses stuck on inactive-join
              kukeltje

              Maybe you can increase the loglevel a little and look back when it happens.... Not sure if you see it in time though...

               

              If it is for testing, maybe using trunk (pre-4.4) is even better...

               

              Ronald