12-21-2012 07:27 AM
12-24-2012 07:09 AM
Okay, does the job succeed or does it run into an error (OptimisticLockingException for example)?
How long does the job need to execute? Is it only starting a process instance and executing a few automatic service tasks that run very quickly? Or does starting the process instance take very long (> 30 seconds) ?
Best regards,
12-24-2012 07:31 AM
12-24-2012 07:40 AM
Okay then I understand. While the process is sending the e-mails, the transaction is not committed yet.So what you are saying is I should modify either this on the code protected int lockTimeInMillis = 5 * 60 * 1000; in JobExecutor.java
Because we have a default job lock interval of 5 minutes, if a job takes longer than 5 minutes, the job executor will try the same job again because it expects that something went wrong.
If you can't refactor the process to keep the execution under 5 minutes, the best way to go forward is to increase the lockTimeInMillis to some value in which the job is definitely executed.
Although my advice would be to reduce the synchronous job execution time if possible using for example async handling.
Best regards,
12-26-2012 04:01 AM
o what you are saying is I should modify either this on the code protected int lockTimeInMillis = 5 * 60 * 1000; in JobExecutor.java
or change my process to support asynchronous execution. I believe that, for me, it's best to change both actually, right?
12-26-2012 06:18 AM
Sounds good, I'll do that then! What do you think about changing asynchronous (to true) and exclusive ( to false) to the subprocess ?o what you are saying is I should modify either this on the code protected int lockTimeInMillis = 5 * 60 * 1000; in JobExecutor.java
or change my process to support asynchronous execution. I believe that, for me, it's best to change both actually, right?
There is a setter for the lockTimeMillis on the JobExecutor. Retrieve the job executor by casting the process engine to ProcessEngineImpl and set the timing accordingly.
Alternatively (and maybe cleaner) you can inject your own JobExecutor impl (extending the default one) on the ProcessEngineCOnfiguration (ie in your activiti.cfg.xml).
01-03-2013 04:21 AM
What do you think about changing asynchronous (to true) and exclusive ( to false) to the subprocess ?
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.