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?