Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-2973

Database constraint violation occurs after fork / join when one branch is a subprocess

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • jBPM 4.x
    • jBPM 4.4
    • Runtime Engine
    • Hide

      (1) Create the two processes specified below
      (2) Execute the main process (join-test)
      (3) Attempt to complete "task1" in the main process

      The result is an error indicating a database constraint violation.

      Main process:

      <process name="join-test" key="join-test" xmlns="http://jbpm.org/4.4/jpdl">
      <start name="start">
      <transition name="fork" to="fork"/>
      </start>
      <fork name="fork">
      <transition name="task1" to="task1"/>
      <transition name="subprocess" to="subprocess" />
      </fork>
      <sub-process name="subprocess" sub-process-key="join-test-sub">
      <transition name="join" to="join"/>
      </sub-process>
      <task name="task1">
      <transition name="join" to="join" />
      </task>
      <join name="join" multiplicity="1">
      <transition name="end" to="end" />
      </join>
      <end name="end"/>
      </process>

      Subprocess:

      <process name="join-test-sub" key="join-test-sub" xmlns="http://jbpm.org/4.4/jpdl">
      <start name="start">
      <transition name="task1" to="task1"/>
      </start>
      <task name="task1">
      <transition name="end" to="end"/>
      </task>
      <end name="end"/>
      </process>

      Show
      (1) Create the two processes specified below (2) Execute the main process (join-test) (3) Attempt to complete "task1" in the main process The result is an error indicating a database constraint violation. Main process: <process name="join-test" key="join-test" xmlns="http://jbpm.org/4.4/jpdl"> <start name="start"> <transition name="fork" to="fork"/> </start> <fork name="fork"> <transition name="task1" to="task1"/> <transition name="subprocess" to="subprocess" /> </fork> <sub-process name="subprocess" sub-process-key="join-test-sub"> <transition name="join" to="join"/> </sub-process> <task name="task1"> <transition name="join" to="join" /> </task> <join name="join" multiplicity="1"> <transition name="end" to="end" /> </join> <end name="end"/> </process> Subprocess: <process name="join-test-sub" key="join-test-sub" xmlns="http://jbpm.org/4.4/jpdl"> <start name="start"> <transition name="task1" to="task1"/> </start> <task name="task1"> <transition name="end" to="end"/> </task> <end name="end"/> </process>

      Given a process and subprocess with the following characteristics:

      • A fork node that splits execution into two parallel paths
      • A corresponding join node with multiplicity=1, indicating that execution should continue when the node is reached from either of the parallel branches
      • At least one of the branches invokes a sub-process

      The expected behavior is that if either branch completes, execution should continue from the join node and all pending activities on the other branch should be deleted.

      However, in the case where the sub-process branch is waiting for task completion, and the task on the other branch is completed, the task completion call fails with a database constraint violation: ERROR: update or delete on table "jbpm4_execution" violates foreign key constraint "fk_exec_superexec" on table "jbpm4_execution"

      This works as expected when no sub-processes are involved, i.e. if both branches are just composed of tasks in the main process. It also works as expected if the sub-process branch is the one that completes first.

            Unassigned Unassigned
            jkranes@mitre.org Jon Kranes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: