HuiSheng Xu [http://community.jboss.org/people/rebody] replied to the discussion

"Process instance migration problem"

To view the discussion, visit: http://community.jboss.org/message/542156#542156

--------------------------------------------------------------
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
[http://community.jboss.org/message/542156#542156]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to