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

Cryptic NullPointerException when ending Sub Process with output parameters, but no outgoing arrows

    Details

    • Type: Bug Report
    • Status: Ready
    • Priority: L3 - Default
    • Resolution: Unresolved
    • Affects Version/s: 7.11.0, 7.12.0
    • Fix Version/s: 7.12.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows 10 64bit
      Camunda Modeller: 3.1.2 Windows x64
      Camunda BPM Tomcat 7.11.0

      Description

      Given:
      Any BPMN process with a Sub Process with output parameters, but no outgoing arrows.

      When:
      The process is started.

      Then:
      The engine throws an exception:

      Runtime result:
      05-Jul-2019 12:30:55.904 SEVERE [http-nio-8080-exec-7] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: null
       java.lang.NullPointerException
              at org.camunda.bpm.engine.impl.core.variable.mapping.OutputParameter.execute(OutputParameter.java:52)
              at org.camunda.bpm.engine.impl.core.variable.mapping.IoParameter.execute(IoParameter.java:51)
              at org.camunda.bpm.engine.impl.core.variable.mapping.IoMapping.executeOutputParameters(IoMapping.java:45)
              at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.destroy(ExecutionEntity.java:531)
              at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd.eventNotificationsCompleted(PvmAtomicOperationProcessEnd.java:83)
              at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd.eventNotificationsCompleted(PvmAtomicOperationProcessEnd.java:33)
              at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:66)
      (...)
      

      Expected:

      The output parameters are executed without throwing an exception.

      Note:

      • Attached are full logs and an example process.
      • In the case of no output parameters, it works fine, without an exception.

        Activity

        Show
        bramvonk Bram Vonk added a comment - https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/core/variable/mapping/OutputParameter.java Line 52. It seems to me that outerScope is null in this case.
        Hide
        nikola.koevski Nikola Koevski added a comment -

        Hi Bram Vonk,

        I have successfully replicated and understood the bug that you are reporting. I will forward it for a decision.

        Best regards,
        Nikola

        Show
        nikola.koevski Nikola Koevski added a comment - Hi Bram Vonk , I have successfully replicated and understood the bug that you are reporting. I will forward it for a decision. Best regards, Nikola
        Hide
        thorben.lindhauer Thorben Lindhauer added a comment -

        Hello Bram,

        Thanks for reporting this. I have updated the expected behavior. The ouput parameters should be executed in this case. E.g. there could be an execution listener on process level that works with them and they should show up in the history tables.

        We will see if we can fix it this bug 7.12, but can't promise it. We would also be very happy to receive a contribution.

        Cheers,
        Thorben

        Show
        thorben.lindhauer Thorben Lindhauer added a comment - Hello Bram, Thanks for reporting this. I have updated the expected behavior. The ouput parameters should be executed in this case. E.g. there could be an execution listener on process level that works with them and they should show up in the history tables. We will see if we can fix it this bug 7.12, but can't promise it. We would also be very happy to receive a contribution. Cheers, Thorben

          People

          • Assignee:
            thorben.lindhauer Thorben Lindhauer
            Reporter:
            bramvonk Bram Vonk
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development