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

Reusable Subprocess (CallActivity) and WorkItems not correctly completed in multi-thread environment and PerProcess Strategy

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jBPM 6.2.0.Final
    • jBPM 6.1.0.Final
    • Runtime Engine
    • None
    • Hide

      Main process A with multi-instance subprocess .
      Inside any process Start-Human Task-End.

      When Human tasks are completed cuncurrently can happen what i described.

      You can increase chance to get the bug putting syncronous tasks after Human Task so the length of transactions increase chance of overlapping.

      Show
      Main process A with multi-instance subprocess . Inside any process Start-Human Task-End. When Human tasks are completed cuncurrently can happen what i described. You can increase chance to get the bug putting syncronous tasks after Human Task so the length of transactions increase chance of overlapping.

      As documented event signaling is decoupled from event capturing.
      This means that is impossible to put in transaction things happening before and after signaling.

      The problem is that internal way to complete EmbeddedSubProcess (same happens with WorkItems) is based on event signaling.

      org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl line 301 : processRuntime.getSignalManager().signalEvent("processInstanceCompleted:" + getId(), this);

      If this point is reached during cuncurrent access to ksession in PerProcess strategy (the ksession is the same when accessed from different threads) and one thread throw exception (and rollback) the signal is lost and the parent process never register the completion of the activity but the activity itself is committed and closed.

      The final result is in stucked main process instance and it's impossible to continue.

      Similar issue happens for workitem completion.

      As far as i know it should be possible to use PerProcess runtime engine in multi-threading applications (ex. web-app completing human tasks) so this seems to be a bug.

            swiderski.maciej Maciej Swiderski (Inactive)
            cappuccini Paolo Cappuccini (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: