Call Activity CMMN - Case does not terminate on interrupting boundary event

Hi all,

I have a quite simple process in which I am using a Call Activity. The Call Activity calls a CMMN case and additionally I have a interrupting boundary event on this Call Activity:

The Call Activity calls following Case:

My problem is that the case stays in state “active” when the interrupting boundary event occurs. Afterwards I end up having the tasks of the Case and the tasks of the process in my task list.
When I try to complete the User Task 1 of the case I get following NullPointer:

Caused by: java.lang.NullPointerException
at org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity.setSuperExecution(CaseExecutionEntity.java:465)
at org.camunda.bpm.engine.impl.cmmn.operation.AbstractAtomicOperationCaseExecutionComplete.postTransitionNotification(AbstractAtomicOperationCaseExecutionComplete.java:91)
at org.camunda.bpm.engine.impl.cmmn.operation.AbstractCmmnEventAtomicOperation.eventNotificationsCompleted(AbstractCmmnEventAtomicOperation.java:40)
at org.camunda.bpm.engine.impl.cmmn.operation.AbstractCmmnEventAtomicOperation.eventNotificationsCompleted(AbstractCmmnEventAtomicOperation.java:26)
at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:65)
at org.camunda.bpm.engine.impl.cmmn.operation.AbstractCmmnEventAtomicOperation.execute(AbstractCmmnEventAtomicOperation.java:26)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:145)
at org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity.performOperationSync(CaseExecutionEntity.java:863)
at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
at org.camunda.bpm.engine.impl.cmmn.operation.AbstractCmmnEventAtomicOperation.execute(AbstractCmmnEventAtomicOperation.java:26)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:145)
at org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity.performOperation(CaseExecutionEntity.java:858)
at org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution.complete(CmmnExecution.java:982)
at org.camunda.bpm.engine.impl.cmmn.behavior.StageActivityBehavior.checkAndCompleteCaseExecution(StageActivityBehavior.java:466)
at org.camunda.bpm.engine.impl.cmmn.behavior.StageActivityBehavior.handleChildCompletion(StageActivityBehavior.java:408)
at org.camunda.bpm.engine.impl.cmmn.operation.AbstractAtomicOperationCaseExecutionComplete.postTransitionNotification(AbstractAtomicOperationCaseExecutionComplete.java:99)
at org.camunda.bpm.engine.impl.cmmn.operation.AbstractCmmnEventAtomicOperation.eventNotificationsCompleted(AbstractCmmnEventAtomicOperation.java:40)
at org.camunda.bpm.engine.impl.cmmn.operation.AbstractCmmnEventAtomicOperation.eventNotificationsCompleted(AbstractCmmnEventAtomicOperation.java:26)
at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:65)
at org.camunda.bpm.engine.impl.cmmn.operation.AbstractCmmnEventAtomicOperation.execute(AbstractCmmnEventAtomicOperation.java:26)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:145)
at org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity.performOperationSync(CaseExecutionEntity.java:863)
at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
at org.camunda.bpm.engine.impl.cmmn.operation.AbstractCmmnEventAtomicOperation.execute(AbstractCmmnEventAtomicOperation.java:26)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:145)
at org.camunda.bpm.engine.impl.interceptor.CommandContext$1.call(CommandContext.java:134)
at org.camunda.bpm.engine.impl.interceptor.CommandContext$1.call(CommandContext.java:132)
at org.camunda.bpm.engine.impl.context.ProcessApplicationClassloaderInterceptor.call(ProcessApplicationClassloaderInterceptor.java:44)
at org.camunda.bpm.application.impl.EjbProcessApplication.execute(EjbProcessApplication.java:136)
at org.camunda.bpm.application.AbstractProcessApplication.execute(AbstractProcessApplication.java:125)
at sun.reflect.GeneratedMethodAccessor538.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)
at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:53)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:254)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:329)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)
at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java

I am not sure if I have overseen something or if this behaviour is intended? Of course I could add a ExecutionListener to the Boundary event that kills the Case, but I thought that the boundary event should interrupt the Case?

Thank you in advance.

Best
Felix

Hi Felix,

  1. Case stays active when the interrupting boundary event occurs:
    This is currently the intended behavior. As you already mentioned you could an execution listener to terminate the case instance.

  2. NullPointerException:
    This is already a know bug 1.

Cheers,
Roman

1 Like

Hi Roman,

thanks for the quick reply!

To 1) Can you explain a little bit more why this is the intended behaviour? Isn’t it more confusing that the case stays in state active even though the call activity was interrupted?

Best
Felix

Hi Felix,

Since such a scenario is not specified in the BPMN specification, we decided to do nothing in the first step and wait for feedback :wink:

Cheers,
Roman

1 Like

Hi Roman and Felix,
Would it be possible to give an example of an execution listener terminate a case instance? I can’t seem to get hold of the id of the called case instance in the parent process.
Thanks in advance,
Maarten