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

I can sort variable update events by their occurrence

    Details

    • Type: Feature Request
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.3.0, 7.3.0-alpha3
    • Component/s: engine
    • Labels:

      Description

      Current behavior:
      1. model a process which updates the same variable in different service tasks:
      e.g:

      • ServiceTask1 creates variable "X" and set the value to 1
      • ServiceTask2 updates variable "X" and set the value to 2
      • ServiceTask3 updates variable "X" and set the value to 3
        2. deploy this process to the engine
        3. start a new instance of the deployed process
        4. when the process instance finishes then have a look into db tables "ACT_HI_DETAIL" and "ACT_HI_VARINST"

      --> the revision of variable "X" is 0 in "ACT_HI_VARINST", furthermore there exists for each update of the variable "X" an entry in "ACT_HI_DETAIL" and they all have also the revision 0

      AT:
      The variable update events can be ordered by its occurrence. Therefore a variable instance maintains a local sequence counter.

        Issue Links

          Activity

          Hide
          roman.smirnov Smirnov Roman added a comment -

          It is an expected behavior.

          When the service tasks are not executed async, then the process instance will be executed within a single command (ie. transaction). At the end of the command the changes will be flushed and committed and the revision will be set to 0.

          But when the service tasks are executed async, then after each service task the command will flush and commit the changes. In that case each variabe update happens in an own command and the revision will be incremented.

          See provided test case:
          https://github.com/camunda/camunda-bpm-platform/commit/b4ebc986c3eb7f729b0d9a7734fddf49e3ee2450

          Show
          roman.smirnov Smirnov Roman added a comment - It is an expected behavior. When the service tasks are not executed async, then the process instance will be executed within a single command (ie. transaction). At the end of the command the changes will be flushed and committed and the revision will be set to 0. But when the service tasks are executed async, then after each service task the command will flush and commit the changes. In that case each variabe update happens in an own command and the revision will be incremented. See provided test case: https://github.com/camunda/camunda-bpm-platform/commit/b4ebc986c3eb7f729b0d9a7734fddf49e3ee2450
          Hide
          gimbel Robert Gimbel added a comment -

          We cannot change the current behavior here. Therefor we have to add a new column

          Show
          gimbel Robert Gimbel added a comment - We cannot change the current behavior here. Therefor we have to add a new column
          Hide
          gimbel Robert Gimbel added a comment -

          we should check, if this issue is done with the linked issue

          Show
          gimbel Robert Gimbel added a comment - we should check, if this issue is done with the linked issue

            People

            • Assignee:
              meyer Daniel Meyer
              Reporter:
              michael.schoettes Michael Schoettes
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development