JBoss Community

Re: Any WorkflowProcessInstanceUpgrader working example

created by tmag in jBPM - View the full discussion

GenericCommand worked :

 

 

....................

final ProcessInstance processInstance = ksession.startProcess("com.sample.bpmn.v1", null);

................

GenericCommand<Void> genericCommand = new GenericCommand<Void>() {

                   

                    public Void execute(Context context) {

                        StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession();

                        ProcessInstance processInstance = ksession.getProcessInstance(processInstance.getId());

                        WorkflowProcessInstanceUpgrader.upgradeProcessInstance(ksession, processInstance.getId(), "com.sample.bpmn.v2", mapping);

                        return null;

                    }

                };

Reply to this message by going to Community

Start a new discussion in jBPM at Community