AnsweredAssumed Answered

Need clarification on CreateProcessEngines in Clustered Env

Question asked by abhitorem on Feb 15, 2018
Latest reply on Feb 20, 2018 by abhitorem

Hi,

We are using Activiti 5.22.x with Spring Integration, below is the code we are using to create the Process Engine:

 

SpringProcessEngineConfiguration processEngineConfig = new SpringProcessEngineConfiguration();
          processEngineConfig.setDataSource(activitiDataSource());
          processEngineConfig.setDatabaseSchemaUpdate("true");
          processEngineConfig.setTransactionManager(activitiTransactionManager());
          processEngineConfig.setJobExecutorActivate(true);

This code will be deployed into Clustered Environment, Will it create the multiple Process Engine with the JobExecutor set to 'True', if 'Yes' will it cause any problems. While executing Timers and Async Jobs?

 

The Reason why am i raising this question is, we are running in Dev Environment with one node and also pointing to the same DB from our Local Environment by setting the JobExecutor to True. Due to this we are facing issues with the Async Service Task Jobs. Below is the Exception Scenario:

When the Job gets created for the Async Service Task in Act_ru_job table, we observed that the Service Task is not getting executed and that entry is getting locked for long time. Also the expiration time is revised (increments every 3 mins)every time the Job gets fired, that gives the ActivitiOptimisticLocking Exception every time.

 

ID_REV_TYPE_LOCK_EXP_TIME_LOCK_OWNER_EXCLUSIVE_EXECUTION_ID_PROCESS_INSTANCE_ID_PROC_DEF_ID_RETRIES_EXCEPTION_STACK_ID_EXCEPTION_MSG_DUEDATE_REPEAT_HANDLER_TYPE_HANDLER_CFG_TENANT_ID_
34634845message11-FEB-18 11.20.19.577000000 PM57ac5579-c43c-431f-8e12-fb699d314488034634793463476***Process:29:34600403async-continuationtenant_1
34634865message11-FEB-18 11.20.22.351000000 PM57ac5579-c43c-431f-8e12-fb699d314488034634813463476***Process:29:34600403async-

Outcomes