0 Replies Latest reply on May 15, 2017 2:01 PM by adrianjasiocha

    JBPM 6.4.0 Per Process Instance synchronization




      Using bitronix and oracle.

      in my processes i use catching intermediate signal events to acquire data from external system.


      Thing is, that signal (in upper line) may be invoked while engine is processing lower line handlers.


      I can't tell which runtime strategy I need to use to avoid exceptions like

      Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.persistence.processinstance.ProcessInstanceInfo#12848]

      but also ensuring that all processes in container won't be executed in single thread


      1. In Singleton strategy there are no exceptions thrown but it can't be introduced because of all processes in container running in single thread

      2. Per process instance strategy does not ensure synchronization in process instance (like singleton ensures in container) so there is risk of org.hibernate.StaleObjectStateException


      Is there a way to synchronize threads like in singleton strategy but in process instance scope rather than in whole container?