04-19-2013 07:12 AM
04-19-2013 07:56 AM
07-04-2017 01:11 AM
Frederik Heremans wrote:
When you have long-running tasks executed by the job-executor, you should consider that:
- Executing a service-task (or any other task) keeps a transaction open until a wait-state/process-end/async-task is reached. If you have long-running operations, make sure your DB doesn't time out.
- When a jobs is running for 5 minutes, the job aquisistion-thread assumes the job-executor that was running the job, has either died or has failed. The lock of the job is removed and the job will be executed by another thread in the executor-pool. This timeout-setting can be raised, if that is required.
- Long-running tasks modeled IN the activiti-process always keep a transaction open and a job-executor thread occupied. Better practice is to use a queue-signal approach where the long-runnin operation is executed outside of activiti (queued to eg. camel using a service-task, providing the neccesairy variables needed alongside). When the long-running task is completed, it should signal the execution, which has a recieve-task modeled in.
Hi,
I'm also running a long service-task, and would like to raise the job execution timeout as Frederik Heremans suggested.
Does anyone (Fredeik?) know how to do it? I can't find any documentation for this.
Thanks,
Aviran
07-04-2017 03:19 AM
asyncExecutorSecondsToWaitOnShutdown
https://www.activiti.org/userguide/6.latest/#_async_executor_configuration
ProcessEngineConfigurationImpl.setAsyncExecutorSecondsToWaitOnShutdown
Activiti/ProcessEngineConfigurationImpl.java at master · Activiti/Activiti · GitHub
public ProcessEngineConfigurationImpl setAsyncExecutorSecondsToWaitOnShutdown(long asyncExecutorSecondsToWaitOnShutdown) {
this.asyncExecutorSecondsToWaitOnShutdown = asyncExecutorSecondsToWaitOnShutdown;
return this;
}
02-21-2014 10:22 AM
04-10-2018 05:58 AM
We are solving this by using only one service task for send and receive that is a spring @Component extending ReceiveTaskActivityBehavior. In the execute() you start your async processing storing your executionId, when finished just triggering that executionId.
(This works, but I'm not sure this is really the proper way, because Activiti doc says: don't extend ActivitiBehavior just if you know what you are doing.)
02-25-2014 04:22 AM
02-25-2014 09:29 AM
03-10-2014 05:11 AM
10-16-2017 06:49 AM
I have a similar Question.
I would like to model a Process for a Questionnaire, so someone assigns the questionnaire, and the assignee has to fill that out. If the Questionnaire is not filled in 5 days I'll send him a reminder and so on.
Is this too longterm to model in Activiti or is that viable?
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.