AnsweredAssumed Answered

Suspended process definition is executed

Question asked by kayj on Jul 1, 2016
Latest reply on Jul 7, 2016 by kayj

we have a BPMN Model ErrorHandling which calls a CallActivity with the BPMN Model id "projectSpecificErrorHandling".
We further do have 2 BPMN models with the id "projectSpecificErrorHandling".
* One for a default error handling and
* one for a customer specific error handling.
Dependent on our project configuration we want to use one of these error handling models.

In the DB both BPMN models are deployed (also different versions might exist). As an example we want to use the default error handling. In order to assure that the project-specific error handling is called in the CallActivity, we suspend the process definitions of the project-specific error handling by ´processEngine.getRepositoryService().suspendProcessDefinitionById( currentProcDef.getId() );´

This is an extract of the table ´ACT_RE_PROCDEF´:

ID, Name, Key, SuspensionState
projectSpecificErrorHandling:2:24, Standard Error Handling, projectSpecificErrorHandling, 1    
projectSpecificErrorHandling:3:2512, Standard Error Handling, projectSpecificErrorHandling, 1
projectSpecificErrorHandling:4:2520, Demo Specific Error Handling, projectSpecificErrorHandling, 2

In the next step a process is started, which runs in an error and starts the error handling process, which triggers the CallActivity "projectSpecificErrorHandling" to be started. Since the latest version is suspended, I'd assume that the process definition with id "projectSpecificErrorHandling:3:2512" is executed when the CallActivity is called. But instead "projectSpecificErrorHandling:4:2520" is executed.

Is there something else I have to do to make it work? I also tried to set:

<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="processDefinitionCacheLimit" value="0" />

in activiti.cfg.xml after I came across this thread.