cancel
Showing results for 
Search instead for 
Did you mean: 

Redirect a process to any activity?

patg
Champ in-the-making
Champ in-the-making
Hi,
Under exceptional circumstances I'd like to be able to redirect a process instance to any activity, without having a transition between the currently running activity and the targeted one.
For instance an (automatic, no user task) order management process involving a lot of third parties is stuck with one business partner and I need to force the process to move to potentially ANY activity of my process diagram (even if the current use case only involves moving the process to only one decicated activity).

I don't want to add transitions between each activity and every other ones, this would make the process diaragram un-readable.

Is there a way to force a running process instance to switch to a given activity?

I tried to update the record in the table ACT_RU_EXECUTION for the current execution and it does not seem to work.
I was trying to signal process instance and have it resume operation at a specified location of the process diagram.
I always end-up with an 'execution not found' error when I call signal(), even though I'm running the SQL update query and signal() in the same transaction.
(I double-checked the specified execution ID)

I don't really like the idea of tinkering with the activiti tables either.

Any clue is very welcome.

Patrice
1 REPLY 1

trademak
Star Contributor
Star Contributor
Hi,

Changing the Activiti table contents yourself is definitely not the best way.
What you could do is add a sub process scope to the whole process and add this default activity to a boundary error event that's defined on the embedded sub process.
Then you can go to an error end event when it's necessary.

Best regards,