Event sub-process is waiting for a long time for no reason

I have an Event Sub-process, which contains a service task with http-connector. This sub-process will be invoked from the main process flow for every user task creation. When I checked the cockpit , I could see that there are so many sub-processes waiting for the service task to be completed. I don’t see any incidents in the cockpit as well.

The “send notification” service task is configured with Asynchronous before and Exclusive

  1. Why is these sub-processes waiting relentlessly for no reason.
  2. How could I complete those tasks with REST api at one go.

http://localhost:8080/engine-rest/process-definition//statistics?incidents=true gives the number of “send notification” instances waiting.

http://localhost:8080/engine-rest/history/activity-instance?processDefinitionId=&unfinished=true only gives the subprocesses waiting not the “send notification” service task.

Please help me out.

@prasadps can you upload your BPMN model? Event sub process should be part of the process.

@aravind , I am sorry I cant publish it here. But this is invoked from a few user tasks startEventListener. From the listener I add a process variable that will trigger this sub-process

Could anyone please help me out… I want to resolve these waiting tasks.

It’s very hard to help if you’re not able to post more information about the model you’re using and the code thats running.

Try creating a new project to replicate the error and share that project

diagram_1.bpmn (8.2 KB)

Attached is the replica of the workflow that causes the issue. Remember this happens when there are thousands of processes running in parallel

1 Like

Hi @prasadps,

from the process diagram I saw that you use connectors here. Maybe the default setup of the underlying httpClient library (https://docs.camunda.org/manual/7.13/reference/connect/http-connector/#configure-apache-http-client) this not able to handle this load.

I’ve seen in other threads that a restart of the engine may help.

I suggest to replace the connector with an implementation either in a Java Delegate or external task handler and improve the error handling.

Hope this helps, Ingo


A restart of the engine didn’t work out. A few thousands executions are waiting at this service task. What should be the ideal way to complete these processes. Anyway I will replace the rest-connector with a Javascript Delegate. Also is there any standard implementation of the Javascript Delegate available with proper error handling