cancel
Showing results for 
Search instead for 
Did you mean: 

Script Task rerun after 5 mins if not completed?

esseti
Champ in-the-making
Champ in-the-making
Hi all,
i've a script task (which runs one of my java class) that does a polling of data.
the task is `async` and with  `<property name="jobExecutorActivate" value="true" />`
now, this task should keep going for a while, up to weeks/months. so it never finishes.
i noticed that after awhile (somehow around 5 minutes) the task is restarted. is this normal?
is there anyway to do not allow the task to be rerun?

thanks.
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Please use the blockcode tags when you include code snippets.
No Activiti will not restart the task by default, so there must be something wrong here. Having said that a task that runs for weeks/months is not something that Activiti should manage, because that will also keep the transaction started by the job executor open. It would be better to implement that logic in Camel, Spring Integration or Mule and use a receive task in the process definition that can be signalled when the long running task is completed.

Best regards,

esseti
Champ in-the-making
Champ in-the-making
ok, thanks.
I actually add the code-syntax, but i used the wrong one (too stackoverflow recently Smiley Very Happy).
Does anyone have tutorials or guide about how i can implement this?