Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-3967

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

    XMLWordPrintable

Details

    • Enhancement
    • Status: Verified (View Workflow)
    • Major
    • Resolution: Done
    • 7.11.1.GA
    • 7.12.1.GA
    • jBPM Core
    •  

       

       

    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

              rhn-support-egonzale Enrique Gonzalez Martinez
              rhn-support-mputz Martin Weiler
              Antonio Fernandez Alhambra Antonio Fernandez Alhambra
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: