cancel
Showing results for 
Search instead for 
Did you mean: 

Restart status for long tasks

marcantoine
Champ in-the-making
Champ in-the-making
Hi,

I have a long task to process, using an overload of the AbstractBpmnActivityBehavior class.
I have implemented the execute() and signal() methods.
And I'm based on Request/Acknowledge/Callback service design parttern [http://servicedesignpatterns.com/clientserviceinteractions/requestacknowledge]

But if Activiti will be down, do you have a case/method to ask the state of the job during the restart of activiti ?

Or do you have any methods to get updates of job status, which can be called regularly ?

Thanks,
4 REPLIES 4

jbarrez
Star Contributor
Star Contributor
Hmm, not fully clear what you are trying to achieve. You mention 'job', is that the Activiti meaning of job (ie an async execution of some step of the process?).

If Activiti is down … the transaction will have rolled back to the previous stable state.

marcantoine
Champ in-the-making
Champ in-the-making
Sorry, for me the job is a long task executed in the web service.
I try to refomulate it:
When the Activiti server is down during the callback of the async web service, the task will not be completed. When we restart activiti, is it possible to ask at the web service to have the information about the status of the managed async job ?
Because the web service can't be informed about the restart of the Activiti service to re-send the callback.

Is it more clear ?

jbarrez
Star Contributor
Star Contributor
So there are two things that can happen:

1. The engine goes down during the webservice call: if the engine shutdown down is graceful (engine.shutdown()), the async threadpool will finish nicely. If the engine crashes, the transaction will be rolled back to before the webservice call.

2. The call is async, but there is a callback (ie service task send + receive task wait state). At that point, when the engine crashed, the status could be fetched from the ExecutionQuery, quering executions of a given process instance that are in a certain activity (pass the activity id)

marcantoine
Champ in-the-making
Champ in-the-making
Thanks for precisions.