Skip to content

Extend BPMN error/exception migration to support ExecutionListener #1047

@venetrius

Description

@venetrius

Acceptance Criteria (Required on creation)

  • MigrateDelegateBPMNErrorAndExceptionInJobWorker handles ExecutionListener classes in addition to JavaDelegate
  • isInsideDelegateMethod() skips both execute() and notify() methods to avoid transforming throw statements in original delegate methods
  • Test coverage for ExecutionListener classes that throw BpmnError / ProcessEngineException inside notify()

Hints

MigrateDelegateBPMNErrorAndExceptionInJobWorker (in MigrateExecutionRecipe.java) currently only matches classes using JavaDelegate (line 574). ExecutionListener.notify() can also throw BpmnError (see C7 test ThrowingHistoryExecutionListenerTest#shouldCatchBpmnErrorFromHistoryListenerAfterBpmnErrorInEndListenerWithErrorBoundary).

Two changes needed:

  1. Add ExecutionListener to the preconditions (line 571-574), mirroring what was done for MigrateDelegateExecutionMethodsInJobWorker
  2. Update isInsideDelegateMethod() (line 699-702) to also check for "notify". Without this, throw statements inside the original notify() method would be incorrectly transformed

Links

Breakdown

Pull Requests

Dev2QA handover

  • Does this ticket need a QA test, and are the testing goals not clear from the description? Add a Dev2QA handover comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions