Legacy subprocesses

Hi everyone
@joram @martin.grofcik @filiphr @tijs

We have legacy processes which are in-flight which was created using activiti 5.15 - and once we upgrade to flowable 6.5 - they continue to run until its completed.

Some of this in-flight processes invoke external sub processes which invokes org.activiti.engine.impl.bpmn.behavior.CallActivityBehavior#execute - and fetches old sub process definition. But in case we have deployed a new version of same subprocess, the same code resolves from cache and pulls the latest subprocess which breaks the code while casting below.

Could you please let us know whether its still possible to continue working with old subprocesses when a new version is deployed or can it point to new sub processes and continue to work - maybe will need to override CallActivityBehavior - any other ideas?

ActivityExecution activityExecution = (ActivityExecution) execution;
PvmProcessInstance subProcessInstance = activityExecution.createSubProcessInstance((ProcessDefinitionEntity) processDefinition);

Thanks!

I assume you are using the key of the subprocess for the calledElement of the call activity?

If I’m not mistaken, the old implementation always resolved by key, which will be the latest deployed version. The current version of Flowable has a ‘same deployment’ flag that can be checked to make sure the deployment unit is the same as the parent process. However, the old implementation doesn’t have this, so indeed the new version will be used in that case.

Yes it uses the key to find the subprocesses - but good to know flowable has a same deployment flag for newer version.