Process Migration with Active Parallel Executions in Subprocess

We are trying to use the process migration feature but are having problems with tasks (and other active executions) being ended during migration when they should not be. It looks like it happens when there are parallel executions active within a subprocess (regular and event subprocess tried so far). I’m not sure if this is supposed to work, but without a workaround for this we’ll have to write some custom DB migration scripts.

Here is a simple test process I have created:

We’ve reproduced this in 6.5.0 code base.

When we start this process and leave Task 1 and Task 2 open, then deploy the same exact process as a new version, then migrate to the active process to the new version with something like:

POST to /flowable-task/process-api/repository/process-definitions/simple-migration:4:cb359a1d-5e25-11ea-bc51-0242ac120003/batch-migrate
{
“toProcessDefinitionId”: “simple-migration:5:dc01124c-5e25-11ea-bc51-0242ac120003”,
“activityMappings”: []
}

Task 1 shows up as completed after the migration.

We tried to trace this down in the code and it seems like in AbstractDynamicStateManager.deleteDirectParentExecutions is called first with task-2 which deletes the parent execution and all child executions which ends up ending the task. task-1 does go through the creation of its new execution after this but seems like the task has already been deleted.

Any help or guidance would be greatly appreciated. Please also let me know if I can share any other details. Thanks very much in advance.

Also didn’t see a way to upload the source process files, so I’ve posted them here:

I dont have a solution for this, but created an issue for the exact same problem on Github - https://github.com/flowable/flowable-engine/issues/2559

We’ve met the same problem here.

After code reading of Flowable engine, I think this problem has to do with this function: https://github.com/flowable/flowable-engine/blob/0adc55feec92620041cae43595a88ad6d56d5045/modules/flowable-engine/src/main/java/org/flowable/engine/impl/dynamic/AbstractDynamicStateManager.java#L555

this function does not re-create the parallel gateway or whatever activities other than UserTask and CallActivity.

sorry for the misinformation above. We’ve created a patch for this issue: https://github.com/md11235/flowable-engine/commit/919e3a0ec0cbac944c0c1943bbff5a13aa68a756

Not thoroughly tested.