cancel
Showing results for 
Search instead for 
Did you mean: 

Resume task ability in Activiti

ymichael
Champ in-the-making
Champ in-the-making
Hi,

I am new to Activiti.
I am working on a project which try to find a new, industrial standard workflow engine to replace its old, self-developed workflow engine.

I have some questions on the resume ability of Activiti.
For example, there is a workflow like below:
START -> Info Processing -> Generate Reports -> Deliver Reports to Client by MQ -> End

If there is exception on "Deliver Reports to Client by MQ" task (e.g. MQ timeout) and I don't want to execute all the steps again, could I resume the workflow from "Deliver Reports to Client by MQ" manually in Activiti?
If Activiti can resume the workflow manually, would you mind to share me technical reference on that ?

Thank you for your help.
4 REPLIES 4

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

I assume there is no wait state in your process (for more info http://www.activiti.org/userguide/#bpmnConcurrencyAndTransactions). It means that when one step fails transaction is rolled back to the start -> Start process fails.
You can make steps asynchronous and in that case you can limit transaction boundaries.

Regards
Martin

smirzai
Champ on-the-rise
Champ on-the-rise
Actually what you can do, is to catch the error and forward the process to some wait state like recieve task. Later on you can query the waiting task and send a signal to resume or cancel the task.

Another way is to use asynchronous tasks. These tasks are executed as job. You can write a custom job executor to retry it on demand. The first appraoch is much simpler, I have to admit.

smirzai
Champ on-the-rise
Champ on-the-rise
I created a sample, but it seems that I cannot post picture.

smirzai
Champ on-the-rise
Champ on-the-rise
Ok I attached the source: