AnsweredAssumed Answered

Job Executor latency after migration to Activiti 6

Question asked by dariuszskrudlik on Jun 11, 2018

I have process 'ReceiveA' where first task is userTask with target candidate user group . Other timer proces activated with duration PT30S get list of that processes and claim and complete user task for first them (FIFO).

When process ends, it send signal for release next process.

On Activiti 5 time between next process  was about 5s (most of them process spend on call JavaDelegate tasks).

After switch on Activiti 6 ( DefaultAsyncJobExecutor ) a have huge latency after complete task - about 5 minutes and 30 seconds. Job executor waiting for something, but I have any information what happen.

 

I checked al lot of configuration but have no resolution.

 

Only when I add process susppend and activation I see some effect - latency go down to 20 seconds.

 

Task t

String procesInstanceId = t.getProcessInstanceId()

String taskId = t.getId()

 

ActivityBeanHelper.getTaskService().claim(taskId, "timerReleaseReceiveBean");
ActivityBeanHelper.getTaskService().complete(taskId, map);

 

ActivityBeanHelper.getRuntimeService().suspendProcessInstanceById(procesInstanceId);

ActivityBeanHelper.getRuntimeService().activateProcessInstanceById(procesInstanceId);

 

What can I check or do ?

 

<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="transactionManager" ref="transactionManager"/>
<property name="databaseSchemaUpdate" value="true"/>
<property name="asyncExecutorActivate" value="true"/>
<property name="jpaHandleTransaction" value="true"/>
<property name="dataSourceJndiName" value="java:/jdbc/myDataSource"/>
<property name="asyncExecutor" ref="asyncExecutor"/>

</bean>

 

<bean id="asyncExecutor" class="org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor">
<property name="corePoolSize" value="30"/>
<property name="maxPoolSize" value="60"/>
<property name="queueSize" value="1000"/>
<property name="timerLockTimeInMillis" value="${my.jobExceutor.lockTimeInMillis}"/>
</bean>

Outcomes