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

NPE in CdiEventListener when leaving MultiInstanceActivity

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: 7.1.4
    • Fix Version/s: 7.3.0, 7.3.0-alpha4
    • Component/s: engine
    • Labels:
    • Title Keywords:
      NPE in CdiEventListener

      Description

      I modelled a ServiceTask with multiinstance behaviour (asynchronous and sequential). The task implementation extends AbstractBpmnActivityBehavior.
      Furthermore I configured the engine to use the "CdiEventSupportBpmnParseListener" to use the cdi event mechanism.

      If there is more than one execution for the multiinstance activity the leave()-method fails with a NullPointerException in the CdiEventListener because there is no execution context.
      org.camunda.bpm.engine.cdi.impl.event.CdiEventListener:
      protected BusinessProcessEvent createEvent(DelegateExecution execution) {
      ProcessDefinitionEntity processDefinition = Context.getExecutionContext().getProcessDefinition();

      The createEvent(DelegateTask task)-method in the same class checks first if there is a ExecutionContext. After changing the createEvent()-method for an DelegateExecution to do the same it works or at least there is no exception.

      I attached a test project to reproduce the exception. To run the junit test include the jar in \lib directory in classpath to get the cdi container running.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              thorben.lindhauer Thorben Lindhauer
              Reporter:
              PatSt Patrick Steinig
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: