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

No OptimisticLockingException is thrown when execution tree was compacted but old reference to parent is still cached

    • Icon: Bug Report Bug Report
    • Resolution: Unresolved
    • Icon: L3 - Default L3 - Default
    • None
    • 7.10.3
    • engine
    • None

      Please see the attached process model.

      Steps to reproduce

      1. A process instance of the parent process is started
      2. The call activity is executed
      3. A process instance of the child process is started
        • Inside the child process the Throwing Intermediate Escalation Event is executed
      4. A concurrent execution in the parent process is spawned since the non-interrupting Boundary Catch Escalation Event is triggered
      5. Thread 1 starts to execute the End Event of the child process
        • The execution tree is read from the database and cached
      6. In Thread 2: The End Event of the parent process instance after the boundary event is executed asynchronously
        • This leads to the compaction of the execution tree since it is not concurrent anymore
      7. The execution of the End Event in Thread 1 advances which results in dispatching the delayed variable events
        • The execution tree is restored from the database but the cached parentId does not exist anymore since the parent was deleted from the database in the course of the compaction (See 6.)

      Observed behavior

      • A ProcessEngineException with the message Cannot resolve parent with id '{}' of execution '{}', perhaps it was deleted in the meantime is thrown
      • The job that failed with the exception is not retried

      Expected behavior

      • An OptimisticLockingException is thrown
      • The job is retried

        This is the controller panel for Smart Panels app

            [CAM-10365] No OptimisticLockingException is thrown when execution tree was compacted but old reference to parent is still cached

            Tassilo Weidner created issue -
            Tassilo Weidner made changes -
            Summary Original: No OptimisticLockingException is thrown when execution tree was compacted but old reference to paren is still cached New: No OptimisticLockingException is thrown when execution tree was compacted but old reference to parent is still cached
            Tassilo Weidner made changes -
            Attachment New: CAM-9934.bpmn [ 28797 ]
            Tassilo Weidner made changes -
            Description Original: Please see the attached process model.

            *Steps to reproduce*
            # A process instance of the parent process is started
            # The call activity "call bulk process" is executed
            # A process instance of the child process is started
            #* Inside the child process the Throwing Intermediate Escalation Event is executed
            # A concurrent execution in the parent process is spawned since the non-interrupting Boundary Catch Escalation Event is triggered
            # Thread 1 starts to execute the End Event of the child process
            #* The execution tree is read from the database and cached
            # In Thread 2: The End Event "escalation handled" is executed asynchronously
            #* This leads to the compaction of the execution tree since it is not concurrent anymore
            # The execution of the End Event in Thread 1 advances which results in dispatching the delayed variable events
            #* The execution tree is restored from the database but the cached {{parentId}} does not exist anymore since the parent was deleted from the database in the course of the compaction (See 6.)

            *Observed behavior*
            * A {{ProcessEngineException}} with the message {{Cannot resolve parent with id '{}' of execution '{}', perhaps it was deleted in the meantime}} is thrown
            * The job failed with the exception is not retried

            *Expected behavior*
            * An {{OptimisticLockingException}} is thrown
            * The job is retried
            New: Please see the attached process model.

            *Steps to reproduce*
            # A process instance of the parent process is started
            # The call activity is executed
            # A process instance of the child process is started
            #* Inside the child process the Throwing Intermediate Escalation Event is executed
            # A concurrent execution in the parent process is spawned since the non-interrupting Boundary Catch Escalation Event is triggered
            # Thread 1 starts to execute the End Event of the child process
            #* The execution tree is read from the database and cached
            # In Thread 2: The End Event "escalation handled" is executed asynchronously
            #* This leads to the compaction of the execution tree since it is not concurrent anymore
            # The execution of the End Event in Thread 1 advances which results in dispatching the delayed variable events
            #* The execution tree is restored from the database but the cached {{parentId}} does not exist anymore since the parent was deleted from the database in the course of the compaction (See 6.)

            *Observed behavior*
            * A {{ProcessEngineException}} with the message {{Cannot resolve parent with id '{}' of execution '{}', perhaps it was deleted in the meantime}} is thrown
            * The job failed with the exception is not retried

            *Expected behavior*
            * An {{OptimisticLockingException}} is thrown
            * The job is retried
            Tassilo Weidner made changes -
            Description Original: Please see the attached process model.

            *Steps to reproduce*
            # A process instance of the parent process is started
            # The call activity is executed
            # A process instance of the child process is started
            #* Inside the child process the Throwing Intermediate Escalation Event is executed
            # A concurrent execution in the parent process is spawned since the non-interrupting Boundary Catch Escalation Event is triggered
            # Thread 1 starts to execute the End Event of the child process
            #* The execution tree is read from the database and cached
            # In Thread 2: The End Event "escalation handled" is executed asynchronously
            #* This leads to the compaction of the execution tree since it is not concurrent anymore
            # The execution of the End Event in Thread 1 advances which results in dispatching the delayed variable events
            #* The execution tree is restored from the database but the cached {{parentId}} does not exist anymore since the parent was deleted from the database in the course of the compaction (See 6.)

            *Observed behavior*
            * A {{ProcessEngineException}} with the message {{Cannot resolve parent with id '{}' of execution '{}', perhaps it was deleted in the meantime}} is thrown
            * The job failed with the exception is not retried

            *Expected behavior*
            * An {{OptimisticLockingException}} is thrown
            * The job is retried
            New: Please see the attached process model.

            *Steps to reproduce*
            # A process instance of the parent process is started
            # The call activity is executed
            # A process instance of the child process is started
            #* Inside the child process the Throwing Intermediate Escalation Event is executed
            # A concurrent execution in the parent process is spawned since the non-interrupting Boundary Catch Escalation Event is triggered
            # Thread 1 starts to execute the End Event of the child process
            #* The execution tree is read from the database and cached
            # In Thread 2: The End Event of the child process instance is executed asynchronously
            #* This leads to the compaction of the execution tree since it is not concurrent anymore
            # The execution of the End Event in Thread 1 advances which results in dispatching the delayed variable events
            #* The execution tree is restored from the database but the cached {{parentId}} does not exist anymore since the parent was deleted from the database in the course of the compaction (See 6.)

            *Observed behavior*
            * A {{ProcessEngineException}} with the message {{Cannot resolve parent with id '{}' of execution '{}', perhaps it was deleted in the meantime}} is thrown
            * The job failed with the exception is not retried

            *Expected behavior*
            * An {{OptimisticLockingException}} is thrown
            * The job is retried
            Tassilo Weidner made changes -
            Description Original: Please see the attached process model.

            *Steps to reproduce*
            # A process instance of the parent process is started
            # The call activity is executed
            # A process instance of the child process is started
            #* Inside the child process the Throwing Intermediate Escalation Event is executed
            # A concurrent execution in the parent process is spawned since the non-interrupting Boundary Catch Escalation Event is triggered
            # Thread 1 starts to execute the End Event of the child process
            #* The execution tree is read from the database and cached
            # In Thread 2: The End Event of the child process instance is executed asynchronously
            #* This leads to the compaction of the execution tree since it is not concurrent anymore
            # The execution of the End Event in Thread 1 advances which results in dispatching the delayed variable events
            #* The execution tree is restored from the database but the cached {{parentId}} does not exist anymore since the parent was deleted from the database in the course of the compaction (See 6.)

            *Observed behavior*
            * A {{ProcessEngineException}} with the message {{Cannot resolve parent with id '{}' of execution '{}', perhaps it was deleted in the meantime}} is thrown
            * The job failed with the exception is not retried

            *Expected behavior*
            * An {{OptimisticLockingException}} is thrown
            * The job is retried
            New: Please see the attached process model.

            *Steps to reproduce*
            # A process instance of the parent process is started
            # The call activity is executed
            # A process instance of the child process is started
            #* Inside the child process the Throwing Intermediate Escalation Event is executed
            # A concurrent execution in the parent process is spawned since the non-interrupting Boundary Catch Escalation Event is triggered
            # Thread 1 starts to execute the End Event of the child process
            #* The execution tree is read from the database and cached
            # In Thread 2: The End Event of the child process instance is executed asynchronously
            #* This leads to the compaction of the execution tree since it is not concurrent anymore
            # The execution of the End Event in Thread 1 advances which results in dispatching the delayed variable events
            #* The execution tree is restored from the database but the cached {{parentId}} does not exist anymore since the parent was deleted from the database in the course of the compaction (See 6.)

            *Observed behavior*
            * A {{ProcessEngineException}} with the message {{Cannot resolve parent with id '{}' of execution '{}', perhaps it was deleted in the meantime}} is thrown
            * The job that failed with the exception is not retried

            *Expected behavior*
            * An {{OptimisticLockingException}} is thrown
            * The job is retried
            Tassilo Weidner made changes -
            Attachment Original: CAM-9934.bpmn [ 28797 ]
            Tassilo Weidner made changes -
            Attachment New: CAM-10365.bpmn [ 28799 ]
            Tassilo Weidner made changes -
            Attachment New: Screen Shot 2019-05-27 at 09.42.41.png [ 28800 ]
            Tassilo Weidner made changes -
            Link New: This issue is related to SUPPORT-5836 [ SUPPORT-5836 ]

              Unassigned Unassigned
              tassilo.weidner Tassilo Weidner
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: