3 Replies Latest reply on Oct 17, 2006 4:49 AM by kukeltje

    Problem getting out of a join

    grimshieldsson

      The start task splits into three task nodes. Two (the right side) of the task nodes transition to a join. That join then immediately splits into 3 task nodes. The single task node splits into 5 task nodes.
      There's some more splitting and joining, but my problem is when the two join, and then split.
      In the process definition below, the left side follows the PM-? task nodes while the right side follows the BPM-? task nodes.
      My problem is that the process gets stuck in Join 2, it gets there but never leaves. The left side continues on, and Join-5 keeps on going, even though it should be waiting on the BPM-? execution path fo finish. However, even though PM-15 is exited, and the end-task is entered, the process isn't finished.
      When I run it with the PM-? paths commented out, it runs just fine. It runs just fine when I have the BPM-? commented out. I've even tried to put a task-node in between Join-2 and Fork-2, but that didn't help.. it never left Join-2.


      <?xml version="1.0" encoding="UTF-8"?>
      <process-definition name="Mini-IM" xmlns="urn:jbpm.org:jpdl-3.1"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="urn:jbpm.org:jpdl-3.1 urn:jbpm.org:jpdl-3.1 ">

      <exception-handler>


      </exception-handler>

      <start-state name="Project Starts">


      <variable name="projectName" access="read,write"
      mapped-name="projectName" />
      <variable name="projectNumber" access="read,write"
      mapped-name="projectNumber" />
      <variable name="projectDescription" access="read,write"
      mapped-name="projectDescription" />

      <assignment
      class="com.wellsfargo.im.jbpm.handlers.AssignmentHandler"
      config-type="field">

      ProjectManager









      </start-state>

















      <task-node name="PM-1">

      <assignment actor-id="Jim" />



      </task-node>

      <task-node name="BPM-1">




      </task-node>
      <task-node name="BPM-2">




      </task-node>









































      <task-node name="PM-2">

      <assignment actor-id="Jim" />


      </task-node>
      <task-node name="PM-3">

      <assignment actor-id="Jim" />


      </task-node>
      <task-node name="PM-4">

      <assignment actor-id="Jim" />


      </task-node>
      <task-node name="PM-5">

      <assignment actor-id="Jim" />


      </task-node>
      <task-node name="PM-6">

      <assignment actor-id="Jim" />


      </task-node>


























      <task-node name="PM-7">

      <assignment actor-id="Jim" />


      </task-node>
      <task-node name="PM-8">

      <assignment actor-id="Jim" />


      </task-node>
      <task-node name="PM-9">

      <assignment actor-id="Jim" />


      </task-node>

      <!-- BPM Task Nodes -->

      <task-node name="BPM-3">




      </task-node>
      <task-node name="BPM-4">




      </task-node>
      <task-node name="BPM-5">




      </task-node>



      <task-node name="BPM-6">




      </task-node>













      <task-node name="PM-15">




      </task-node>

      <end-state name="Project Ends">




      </end-state>
      </process-definition>

        • 1. Re: Problem getting out of a join
          grimshieldsson

          I figured out why I'm not getting out of Join 2, but I'm not sure what to do about it. I think it's a bug in the way JBPM is designed, but it's entirely possible I don't understand something. It's even likely :)

          From 4.3.2 Concurrent Executions I get:

          The execution paths can be ordered hierarchically. Meaning that one root execution path is created when a new process execution is instantiated. When the root execution path is forked into multiple concurrent execution paths, the root is the parent and the newly created execution paths are all children of the root. This way, implementation of a join can become straightforward: the implementation of the join just has to verify if all sibling-execution-paths are already positioned in the join node. If that is the case, the parent execution path can resume execution leaving the join node.

          The problem is that Join 2 is waiting for the sibling execution path from PM-1 to join it, and that is not what I want to happen. The two execution paths join later in the process (my example is a small part of the whole flow). Clearly in this case Joind 2 does not want to wait for the PM-1 branch to finish.
          Is this a design bug? Or am I being dense?

          • 2. Re: Problem getting out of a join
            grimshieldsson

            So, I figured out a workaround.....
            The start fork transitions to PM-1 as in the originally, and transitions to a fork, that forks to BPM-1 and BPM-2.
            I also had to add a seperate Join at the end of the PM's, before joining the BPM and PM flows.
            I don't like having to add the additional forks and joins though... it just isn't as clean as the activity diagram I have...

            • 3. Re: Problem getting out of a join
              kukeltje

              this has been discussed before. It is not a bug in the way jBPM is designed it is as jBPM is designed. If you want different behaviour, you can extend the fork/join nodes and get the behaviour you want.