You made a synchronous task. I am talking about an asynchronous task. I used your example, made it asynchronous, created a thread.sleep on the service task.
I cannot find in the activiti documentation how to increase the async jobs, at the moment it is set at 2.
So the timer starts 2 processes waits until the sleep on the servicetask is done, and then starts another 2.
What is the common way to increase async jobs in alfresco activiti enterprise?
I tried
<code>
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
processEngine.getProcessEngineConfiguration().setAsyncExecutorActivate(true);
processEngine.getProcessEngineConfiguration().setAsyncExecutorEnabled(true);
AsyncExecutor asyncExecutor = processEngine.getProcessEngineConfiguration().getAsyncExecutor();
asyncExecutor.setMaxAsyncJobsDuePerAcquisition(100);
asyncExecutor.setMaxTimerJobsPerAcquisition(1000);
asyncExecutor.setDefaultAsyncJobAcquireWaitTimeInMillis(2000);
asyncExecutor.setDefaultTimerJobAcquireWaitTimeInMillis(2000);
asyncExecutor.setRetryWaitTimeInMillis(2000);
processEngine.getProcessEngineConfiguration().setAsyncExecutor(asyncExecutor);
</code>
Not working…