cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti versioning to handle inflight instances?

chockyc91
Champ in-the-making
Champ in-the-making

How to maintain activiti versioning to handle inflight instances for the old process versions? 

We have inflight instances in production, if super process runs in an old version. When we roll out our new process changes, the super process instance has sub processes, say task is pending at review step in old version, then submits the review to manager . Sub process attached to the manager review is taking the new process version instead of the old version. I want all the super process, sub processes to be running with previous version rather than the newer version.

Can we configure something in activiti so that inflight instances use the old process version, sub process versions instead of newer version ? 

Please help.

Thanks.

1 ACCEPTED ANSWER

cjose
Elite Collaborator
Elite Collaborator

Thanks. Some options listed below

  1. Upgrading a running instance to a new version is a possibility- see some of the options discussed in this threadProcess instances migration helps.
  2. Another option is to have a unique name (process definition key) for your child process. Every time you make a breaking change, change the number. eg: child-process-v1, child-process-v2 etc.
  3. Update Activiti source code and add some additional attributes and associated logic to handle versions and feel free to make a PR. This would be a great contribution!

View answer in original post

7 REPLIES 7

cjose
Elite Collaborator
Elite Collaborator

How are you calling the child process?  Sub-Process or Call Activity? 

If Sub-Process, old instances should be running on the old version.

If Call Activity, it will take new version of the process. I see this is a very valid use case, suggest raising an issue or a PR if you would like to contribute towards this feature! An easy fix might be additional input attribute for process definition id or version using which you can dynamically query a particular version of process.

Ciju

chockyc91
Champ in-the-making
Champ in-the-making

Thanks Ciju.

I am using callActivity and if the inflight instance calls the new process version, we are passing some output variable to the main process.

Can we somehow update the main process version also to accept the new output parameters in the callactivity.

Like you said above, If we add a new input attribute in the main process, how would inflight instance accept it?

Thanks,

cjose
Elite Collaborator
Elite Collaborator

Before going into the detail, may I ask a couple of questions so that I can provide responses accordingly

Are you using Community version or the Enterprise version?

If Community, are you using V5 engine or the new V6 engine?

chockyc91
Champ in-the-making
Champ in-the-making

We are using Activiti community version V 5.20

Thanks,

cjose
Elite Collaborator
Elite Collaborator

Thanks. Some options listed below

  1. Upgrading a running instance to a new version is a possibility- see some of the options discussed in this threadProcess instances migration helps.
  2. Another option is to have a unique name (process definition key) for your child process. Every time you make a breaking change, change the number. eg: child-process-v1, child-process-v2 etc.
  3. Update Activiti source code and add some additional attributes and associated logic to handle versions and feel free to make a PR. This would be a great contribution!

chockyc91
Champ in-the-making
Champ in-the-making

Great. I liked the idea of keeping different model versions. I will give it a try.

Thank you very much for your help.

Vinay1
Champ in-the-making
Champ in-the-making

i'm new to Activiti, could you please explain more bout point 2 here ?