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

ProcessServiceImpl.getAvailableSignals should obtain ProcessInstance in read-only mode to avoid race condition

    XMLWordPrintable

Details

    Description

      Consider a process with an async service task, followed by a signal. There is no control on how long the external service takes, but once it has finished, it should signal the process instance so that the process execution continues. If this signal call happens too fast (before the transaction for the async execution has been committed), this can lead to OptimisticLockingExceptions in a multi-node environment. While the jBPM engine will automatically retry, and both operations will be successful, this comes at the cost of duplicated node executions.

      In order to avoid this, the client could call the REST api to query for available signals before the actual signal is sent. For this to work and to avoid locking exceptions, the processInstance should be retrieved in read-only mode in ProcessServiceImpl.getAvailableSignals.

       

      Attachments

        Issue Links

          Activity

            People

              elguardian@gmail.com Enrique González Martínez (Inactive)
              elguardian@gmail.com Enrique González Martínez (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: