Activiti versioning to handle inflight instances?

cancel
Showing results for 
Search instead for 
Did you mean: 
chockyc91
Member II

Activiti versioning to handle inflight instances?

Jump to solution

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 Solution

Accepted Solutions
cjose
Senior Member II

Re: Activiti versioning to handle inflight instances?

Jump to solution

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 solution in original post

7 Replies
cjose
Senior Member II

Re: Activiti versioning to handle inflight instances?

Jump to solution

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
Member II

Re: Activiti versioning to handle inflight instances?

Jump to solution

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
Senior Member II

Re: Activiti versioning to handle inflight instances?

Jump to solution

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
Member II

Re: Activiti versioning to handle inflight instances?

Jump to solution

We are using Activiti community version V 5.20

Thanks,

cjose
Senior Member II

Re: Activiti versioning to handle inflight instances?

Jump to solution

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
Member II

Re: Activiti versioning to handle inflight instances?

Jump to solution

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

Thank you very much for your help.

Vinay1
Member II

Re: Activiti versioning to handle inflight instances?

Jump to solution

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