Setting a timeout on a service task in Activiti

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2017 04:43 AM
Hi,
What is the correct way to increase the timeout associated with Service Tasks only being able to stay 'active' for a set time? Long running tasks executed within a Service Task will cause a timeout due to a transaction to a database being open for too long. While I understand there is the notion to delegate the responsiblity for running the long running process externally from activiti by using Message Events, I would specifically like to have it stay within a Service Task and have the timeout increased.
- Labels:
-
Alfresco Process Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2017 10:57 AM
Hi,
I may be missing something, but as far as I know, there is no explicit or implicit timeout associated with service tasks.
Perhaps you are referring to the job executor timeout.
If a service task is marked to run asynchronously or is on a thread that was launched by the job executor, then the job must finish within the designated timeout, otherwise it will be assumed to have failed and a retry will be triggered.
By default, the timer and async service job timeout is 5 minutes.
If you need to extend this, you may do so globally in the engine configuration.
A word of warning, long running service calls hold threads active and can lead to thread starvation in the job executor.
Cheers,
Greg

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2017 08:34 AM
That does not really solve my problem since it seems that job executor timeout will be applied to tasks that are started by timer or perhaps by message and such. I need timeouts for any service task. A service task that immediately follows start event will be executed in the application server(tomcat) threads and I want to make sure malicious service tasks do not exhaust tomcat thread pool or other resources(CPU time, memory, ...).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2020 09:10 AM
Hello
I'm suffering the same thing as you did you already resolved? can you share, if it's possible, what the solution was?
Thanks in advance.
Regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2021 09:51 AM
Hello,
Next step in the workflow needs to be manually restart when previous step executes for than an hour. Is there any configuration to setup in Activiti version 5.17.0 version.
