cancel
Showing results for 
Search instead for 
Did you mean: 

Processing different versions of activiti flows

stroobat
Champ in-the-making
Champ in-the-making
I've been working with Activiti for some weeks now and for the moment it looks great !
However I'm pretty new to BPMN and have the following question.

Suppose the following situation.

I have a flow in a production environment that looks likes this:

START –> serviceTask(start) –> UserTask –> ServiceTask(A)

In the serviceTasks I use Springbeans.

At some point we detect that the flow is wrong and we want to change it to:

START –> serviceTask(start) –> UserTask –> ServiceTask(A) –> ServiceTASK(B) –> serviceTask©

So I deploy the second process to production.
Normall activiti behavior is that all the usertasks already started in the first flow will keep on using that specific version. So only  ServiceTask(A) will be run.
All the new flows will follow the new version and will also execute ServiceTask(A),ServiceTASK(B),serviceTask©.

But what if my first flow was wrong ?? And I want all the tasks already created in the first flow to be handled like defined in the second flow ?

Best regards,

Tom.
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
Tom,

Process instance migration (from version x to y for running instances) is not yet supported, but is a feature that is requested a lot. As a workaround you could (at own risk) update the executions PROC_DEF_ID_ and task's PROC_DEF_ID_ to the new one using plain old SQL. Please bear in mind that the active activity (eg. userTask X) in the running processes should exist in the new process, or the instances will become useless.

So noting out of the box right now, only workaround is SQL. most of the time, if you want to do this, you should know what you're doing Smiley Wink