Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-10715

Avoid conditional event race condition with selected batch APIs

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.16.0, 7.16.0-alpha5
    • None
    • engine

      User Story (Required on creation):

      To avoid synchronization via optimistic locking between batches and jobs running in a process instance, it should be possible to make batch jobs exclusive so that the job executor doesn't run them in parallel.

      Functional Requirements (Required before implementation):

      • The batch API RuntimeService#setVariablesAsync creates exclusive batch jobs
        • if a batch job is configured to modify a single process instance (see invocationsPerBatchJob, this is the default value)
        • so that the job setting the variables in the process instance is not executed in parallel with other exclusive jobs (e.g. async continuations)
      • The batch API that will be developed for CAM-13113 behaves in the same way

      Technical Requirements (Required before implementation):

      • To be decided:
        • Should it be possible to toggle this behavior (e.g. users might want to have parallel execution of the batches)?
        • If yes, what is the default setting?
      • This may require to store the type of entity that is modified by a batch job (process instance, external task, ...)

      Limitations of Scope (Optional):

      • This will only be built for the following batch APIs
        • RuntimeService#setVariablesAsync
        • The new batch API for message correlation: CAM-13113

      Hints (Optional):

      • Same scenario as in CAM-13762
      • Besides enforcing synchronization between conflicting transactions via optimistic locking, it is possible to avoid conflicting transactions to run in parallel
      • In the process engine, this is doable in the scope of one process instance with exclusive jobs (i.e. if a variable is modified in one job and a conditional event is entered in another job, the job executor ensures that they run one after the other, so the problem in CAM-13762 doesn't occur)

        This is the controller panel for Smart Panels app

              Unassigned Unassigned
              thorben.lindhauer Thorben Lindhauer
              Tobias Metzke-Bernstein Tobias Metzke-Bernstein
              Tassilo Weidner Tassilo Weidner
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: