Execution doesnt exist error when triggering intermediate signal event

Hi,

I have a process which contains an intermediate event and this process is is being invoked from a multi instance activity on the parent process. when I’m trying to trigger the signal on child process instances, some times its throwing execution doesn’t exist error as below.

I have marked async after for the intermediate signal and async before for the call activity on parent process. we are using camunda 7.13.0 in spring boot embedded environment. can anyone help in understanding what could be the cause for this behavior. attaching my bpmns for reference.TerminateAccount.bpmn (5.8 KB) TerminateAccount-NetworkActivities.bpmn (12.1 KB)


org.camunda.bpm.engine.exception.NullValueException: execution 0ada90cd-086f-11eb-9c38-4281420ebc43 doesn't exist: execution is null
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.camunda.bpm.engine.impl.util.EnsureUtil.generateException(EnsureUtil.java:394)
	at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:55)
	at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:50)
	at org.camunda.bpm.engine.impl.cmd.GetExecutionVariableCmd.execute(GetExecutionVariableCmd.java:53)
	at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28)
	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110)
	at org.camunda.bpm.engine.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:46)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
	at org.camunda.bpm.engine.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:44)
	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
	at org.camunda.bpm.engine.impl.RuntimeServiceImpl.getVariable(RuntimeServiceImpl.java:338)
	at com.sixdee.om.services.GenericServiceBO.continueProcess(GenericServiceBO.java:100)
	at com.sixdee.om.services.GenericServiceBO.processRequest(GenericServiceBO.java:52)
	at com.sixdee.om.controllers.bo.SyncProcessBO.serviceRequestProcessing(SyncProcessBO.java:40)
	at com.sixdee.om.controllers.OrderServiceController.updateOrderStatus(OrderServiceController.java:150)
	at sun.reflect.GeneratedMethodAccessor929.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:879)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

2020-10-07 13:06:40.758 ERROR 9429 [0.0-9009-exec-3] c.s.o.s.GenericServiceBO                  69  : 3651810696 | caught Exception

org.camunda.bpm.engine.exception.NullValueException: execution 0ada90cd-086f-11eb-9c38-4281420ebc43 doesn't exist: execution is null
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.camunda.bpm.engine.impl.util.EnsureUtil.generateException(EnsureUtil.java:394)
	at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:55)
	at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:50)
	at org.camunda.bpm.engine.impl.cmd.GetExecutionVariableCmd.execute(GetExecutionVariableCmd.java:53)
	at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28)
	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110)
	at org.camunda.bpm.engine.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:46)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
	at org.camunda.bpm.engine.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:44)
	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
	at org.camunda.bpm.engine.impl.RuntimeServiceImpl.getVariable(RuntimeServiceImpl.java:338)
	at com.sixdee.om.services.GenericServiceBO.continueProcess(GenericServiceBO.java:100)
	at com.sixdee.om.services.GenericServiceBO.processRequest(GenericServiceBO.java:52)
	at com.sixdee.om.controllers.bo.SyncProcessBO.serviceRequestProcessing(SyncProcessBO.java:40)
	at com.sixdee.om.controllers.OrderServiceController.updateOrderStatus(OrderServiceController.java:150)
	at sun.reflect.GeneratedMethodAccessor929.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:879)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745) ```

Hi @_akhil

welcome to the camunda forum :tada:
How and where do you trigger the signal event?

I also see that you have a complete condition in the model “${Status==‘1’}” is it possible that this condition is valid at a time X after some child processes have finished and therefore everything is aborted?

2 Likes

Hi @dominikh

Thanks for your prompt response. the signal event is present in the TerminateAccount-NetworkActivities bpmn and multiple instances of this process is getting created in parallel. we have a listener class attached to the signal event and using this class we are capturing the execution id for each signal in the process instances. and all are stored in to our internal tables and we are using these execution ids at the time of triggering the signal event.

now coming to your question,${Status==‘1’}” is it possible that this condition is valid at a time X after some child processes have finished - yes, this is possible. we are setting the value of status to 1 when any business failure occurs in the process instance.
I will briefly explain our requirement so that you can understand the scenario. our requirement is to activate all process instances and all should wait for the call back. if any business failure occurs in any of of the started instances, execution should exit from the multi instances activity. for this, first we configured loop characteristics as serial on multi instance activity. but it resulted in one instance to wait for the completion of already started instance since we have signals waiting on each process instance. so we made it as a parallel call activity now and specified the completion condition.

any wrong in our process design? if yes, could you please suggest how to achieve our requirement.

Hi @_akhil,

you could also model your process as below:


But that won’t change your problem for now. Does the instance you want to send the signal to still exist in the engine? Can you see it in the cockpit?

1 Like

Hi,

Perhaps you should use a receive message event rather than a signal. A signal will ‘broadcast’ to all waiting instances. In your multi-instance scenario, you could find that the first callback gets applied to additional waiting instances, when their signal arrives, they will no longer be waiting…

So I would suggest changing to a receive message event and also use a correlation key to ensure your message correlates to just one waiting process instance…

regards

Rob

1 Like

Hi @Webcyberrob

I think he uses the executionId to limit the signal to an exeuction. Via the Java API he can do that. But yes a message would be nicer, that’s true!

1 Like

Hi @dominikh @Webcyberrob

Thanks a lot for your valuable suggestions. I will change to receive message event rather than using a signals. @dominikh yes your assumption is true. I’m using execution id to limit the signal execution to the respective process instances.

Could you please share me an example on how to trigger the message event using java API, if available?

also from the Camunda docs, I found receive tasks also can be used for implementing the waits. so I’m bit confused here. can you guys give a direction on which one will be perfect to achieve my requirement.

Hi @_akhil

You can trigger the message by creating a message correlation. If you have a variable with which the instances differ, you can use the variant 1. If this is not the case you can also use the process instanceId. There are a lot of more options, give it a try :slight_smile:

        //variant 1
        runtimeServes.createMessageCorrelation("messageName")
                .processInstanceVariableEquals("variableThatIsDifferent", "value")
                .correlate();

        //variant 2
        runtimeServes.createMessageCorrelation("messageName")
                .processInstanceId("processInstanceId")
                .correlate();

The difference between Recieve Tasks and Intermediate Message Events is that you can attach Boundary Events to Tasks. You can create a similar behavior with an EventBasedGateway and events. However, non-interruption is not possible.

ReceiveTaskvsIntemediateEvent

1 Like

Hi,

Glad you confirmed you are correlating the signal based on an id. Another suggestion is perhaps you have a race condition where the service callback is so fast that the engine has not finished creating the receive signal event…if you add a delay and retry to the callback, you may overcome a race condition…

Regards

Rob

1 Like

Hi @dominikh @Webcyberrob

I will replace the signals with message events and try it out. I really appreciate your help. Thank you :slight_smile:

1 Like