cancel
Showing results for 
Search instead for 
Did you mean: 

Handle the remained process after exception handling

jo_onas
Champ in-the-making
Champ in-the-making
Hi All,

I want to reuse the remained process, which is built by exceptions, like this:

    runtimeService.createProcessInstanceQuery().processInstanceId(deadProcess).singleResult().recover(time);

In my case, I create a request handler with Activiti engine and it may fall when running the request for connection problems. It is hard to recreate a new process since a lot of people will complain  :boredom:.

I find that the dead process stays in the database active but with an error state and I want to start it with another good time. Is there any way to do this?
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
You could catch the error using a boundary event and put it in an error state, where you can then move it to the correct state with a custom operation.

However, I'm not sure if I get your use case completely.

jo_onas
Champ in-the-making
Champ in-the-making
Thanks for your reply.

Actually, this part is an executor in our process with a running timer and all these things are in a subprocess. I try to add an boundary signal event, but this operation throws a SQL exception, which complaints that an foreign key comstraint exists in act_ru_execution.  Currently, I build another query process to pick up these dead job and run their executeJob method in another time.

I don't think my operation is good according to the API doc and I find your suggestion is better. I will retry it in our next release version with latest 5.14 engine.

frederikherema1
Star Contributor
Star Contributor
Let us know what your findings are on the suggested solution Smiley Wink