Community

Process instance migration problem

reply from HuiSheng Xu in jBPM - View the full discussion

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.

Reply to this message by going to Community

Start a new discussion in jBPM at Community