Re-run incomplete workflows on server startups

cancel
Showing results for 
Search instead for 
Did you mean: 
jogin
Member II

Re-run incomplete workflows on server startups

Hi All,

I would like to know, whether activiti has some built-in functionality for below scenario:

1. I have workflow with N number of sync job nodes.

2. Let's say after performing some jobs server goes down.

3. Whenever server is restarted, activiti should start the workflows automatically.

Thanks,

Jogin

2 Replies
thuynh
Established Member II

Re: Re-run incomplete workflows on server startups

Hi Jogin Mehta ,

1. I have workflow with N number of sync job nodes.

2. Let's say after performing some jobs server goes down.

3. Whenever server is restarted, activiti should start the workflows automatically.

The answer is yes. Process execution should be restarted when the server is back.

By default, Activiti configures a job to be retried up to 3 times upon failure. If your jobs had reached 3 times of retry because of the server down situation, you can manually restart the jobs by activiti-explorer or using the Activiti API such as Activiti REST calls.

Have you experimented this? Have you tried this in your environment?

Thanks,

Thong Huynh

jogin
Member II

Re: Re-run incomplete workflows on server startups

Hi

Thanks for your reply.

I have seen retry mechanism for asynchronous jobs, where in workflow we specify activiti:async=true. For synchronous jobs it doesn't persist anything in database until whole workflow gets completed.

So, for synchronous jobs there seems to be no direct way to re-run workflow on startup.

Thanks,

Jogin