Some tasks are executed when suspending many job definitions

Hi,
I’m experiencing a problem with camunda platform 7.15 (wildfly).

I suspend several job definitions on parallel branches and the engine reports no error. I can query the engine programmatically or by checking on the camunda app and see in both cases that jobs are suspended. However, when the execution reaches these jobs I notice that the engine executes some of them, while for some the execution is suspended before starting the task. I checked and made sure that execution didn’t reach these jobs before they were all suspended.

Here’s a screenshot of the bpmn status where tasks t1 & t2 are suspended (along with similar others that are in parallel) but where t1 is executed (and we can see the token on the next send task).

I also experience this issue in other parts of the bpmn always in case where multiple job definitions are suspended (even if these are not in parallel).

To suspend jobs I use the following engine call:

/**
   * Suspend the definition of a job for a given activity
   *
   * @param activityId activity Id
   * @throws ProcessEngineException : ProcessEngineException
   */
  protected void suspendJobDefinition(String activityId) throws ProcessEngineException {
    ProcessInstance processInstance = getCurrentProcessInstance();
    if (processInstance == null) {
      throw new ProcessEngineException("Can't suspend Job definition : no running instance found");
    }
    try {
      JobDefinition
        associatedJobDefinition =
        processEngine.getManagementService().createJobDefinitionQuery().activityIdIn(activityId)
          .processDefinitionId(processInstance.getProcessDefinitionId())
          .jobConfiguration("async-before").singleResult();
      processEngine.getManagementService().suspendJobDefinitionById(associatedJobDefinition.getId());
    } catch (Exception e) {
      throw new ProcessEngineException(
        String.format("An error occurred while suspending a Job definition : activityId={%s}", activityId), e);
    }
  }

Have you ever experienced this kind of issue? Am I doing something wrong? Should I file a bug on Jira?

Can you upload your process model or a model that i can use to verify what is happening?

Hi Niall,
Thanks for your reply.
I’ll try to isolate the issue in a simplified example and provide it here in the next days.

Hi @Niall , here’s a project where you can test the issue.

Check here: https://github.com/codedoge/camunda-suspension-issue

You only have to do some minor setup with postgresql and launch the docker image, which will start the camunda container (7.15) with our test app.
We also made some customization to the container following the solution we run in our internal project.

The application should start a process and immediately suspend several jobs. Check on the camunda webapp (cockpit) that the tokens stop on the suspended jobs. In our case we get some tokens ignoring them.

Is there any update on this issue? @Niall did you have the time to test the sample project?

Any update on this issue?