Is it possible to migrate an ld instance to new process?

Hello,
I have a question and maybe someone here can help mw anwser it.

  1. What happens with an active instance of a process when a new version of the process is uploaded? If I understood the course corectly, the old instance finishes runing on the old version, but what if we wanted to merge the old instances into the new version of the process?
    Example:
    We start off with this process on the server:
    (Sorry, can only put one image in the post so imagine the second image without the Task 2 (Pre-Task), so it only has Task 1 and Service)
    And there is an instance running where the Task 1 is already in the tasklist.
    And then we create a new process that looks like this:

    Now normaly all the instances that were in Task 1 in the first version will finish without ever going through Task 2 (Pre-Task)
    I wonder if there is a way to migrate all those instances to automaticaly move to Task 2(Pre-Task) in case they are in Task 1. And with that also completely update the process to the scond version. Is that possible?

Thank you for the info.

Hi,

do you know the migration API ?
With this API it is possible to migrate an existing process instance to a newer version of process definition.

The migration plan can for example look like this:

MigrationPlan migrationPlan = processEngine.getRuntimeService()
.createMigrationPlan("exampleProcess:1", "exampleProcess:2")
.mapActivities("task1", "task")
  .updateEventTrigger()
.build();

See the documentation for more informations.

Best regards,
Chris

Can I add to the question?

I’m not sure that the actual instance IDs are migrated - as these are generated. And, if moving between engines… wouldn’t this cause an issue with the unique ID generator?

Hi @garysamuelson,

IDs remain the stable during migration as much as possible. It is not possible to use the migration API to migration a process instance from one process engine to another. This would be problematic for the reason you mention and a many other.

Cheers,
Thorben