Hi Sergey,
After migrate processinstance to a new processDefinition, you should update the modifed processInstance to database. Otherwise database couldn't know the processInstance has changed. So it seems the migration operation has no effect.
You could use Command to do this:
processEngine.execute(new Command() {
public Object execute(Environment env) {
new DefaultMigrationHandler().migrateInstance(pd,
pi, new MigrationDescriptor());
env.get(Session.class).update(pi);
return null;
}
});
I attached the testcase. Please have a try. Thank you.