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

Uncaught BPMN Error leads to NullPointerException in OutputMapping on External Task

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Unresolved
    • L3 - Default
    • None
    • 7.15.0-alpha5
    • engine
    • None

    Description

      Environment (Required on creation):

      • Any Camunda distro on 7.15.0-alpha5
      • Flag skipOutputMappingOnCanceledActivities is set to true
      • Identified in the context of the RPA Bridge but applicable to External Tasks in general (possibly even to all activities)

      Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

      • Throwing a BPMN Error on an activity with an OutputMapping that is not caught (e.g. by a boundary event) leads to a NullPointerException in the OutputParameter because of no outer scope being present
      java.lang.NullPointerException: null
      	at org.camunda.bpm.engine.impl.core.variable.mapping.OutputParameter.execute(OutputParameter.java:52) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.core.variable.mapping.IoParameter.execute(IoParameter.java:51) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.core.variable.mapping.IoMapping.executeOutputParameters(IoMapping.java:45) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.destroy(ExecutionEntity.java:525) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd.eventNotificationsCompleted(PvmAtomicOperationProcessEnd.java:83) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd.eventNotificationsCompleted(PvmAtomicOperationProcessEnd.java:33) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:66) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.AtomicOperationInvocation.execute(AtomicOperationInvocation.java:99) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.invokeNext(CommandInvocationContext.java:131) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performNext(CommandInvocationContext.java:111) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performOperation(CommandInvocationContext.java:86) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performOperation(CommandInvocationContext.java:76) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:643) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:618) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:62) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.AtomicOperationInvocation.execute(AtomicOperationInvocation.java:99) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.invokeNext(CommandInvocationContext.java:131) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performNext(CommandInvocationContext.java:111) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performOperation(CommandInvocationContext.java:86) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performOperation(CommandInvocationContext.java:76) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:643) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:618) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:62) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.AtomicOperationInvocation.execute(AtomicOperationInvocation.java:99) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.invokeNext(CommandInvocationContext.java:131) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performNext(CommandInvocationContext.java:111) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performOperation(CommandInvocationContext.java:86) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:634) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:608) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityEnd.execute(PvmAtomicOperationActivityEnd.java:87) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityEnd.execute(PvmAtomicOperationActivityEnd.java:35) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.AtomicOperationInvocation.execute(AtomicOperationInvocation.java:99) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.invokeNext(CommandInvocationContext.java:131) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performNext(CommandInvocationContext.java:111) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performOperation(CommandInvocationContext.java:86) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performOperation(CommandInvocationContext.java:76) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.jobexecutor.AsyncContinuationJobHandler.execute(AsyncContinuationJobHandler.java:81) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.jobexecutor.AsyncContinuationJobHandler.execute(AsyncContinuationJobHandler.java:40) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:134) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:110) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:43) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:72) ~[camunda-engine-spring-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.3.4.jar!/:5.3.4]
      	at org.camunda.bpm.engine.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:70) ~[camunda-engine-spring-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobHelper.executeJob(ExecuteJobHelper.java:57) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.executeJob(ExecuteJobsRunnable.java:110) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:71) ~[camunda-engine-7.15.0-alpha5-ee.jar!/:7.15.0-alpha5-ee]
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
      	at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
      

      Steps to reproduce (Required on creation):

      • Create an activity with an OutputMapping (can be one that always succeeds and does not rely on variables or anything else)
      • Throw a BPMN error while on that activity (e.g. via API for an external task or Java Delegate or Script)

      Observed Behavior (Required on creation):

      • A NPE is thrown

      Expected behavior (Required on creation):

      • No NPE is thrown (either because the mapping is skipped or the behavior of the uncaught BPMN Error handling is changed)

      Root Cause (Required on prioritization):

      Solution Ideas (Optional):

      Hints (Optional):

      • Asynchronous continuation probably also needs to be considered here in case flag evaluation is expanded to cover this, as the None End Event behavior will be executed in the async continuation job context rather than in the execution context of throwing the BPMN Error itself and triggering that None End Event

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Issue Links

            Activity

              People

                thorben.lindhauer Thorben Lindhauer
                tobias.metzke Tobias Metzke-Bernstein
                Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:

                  Salesforce