JBoss Community

Re: setActorID for Swimlane in JBPM5

created by Maciej Swiderski in jBPM - View the full discussion

here is how you could define command and execute it on ksession so it gets executed within transaction

ksession.execute(new GenericCommand<Void>() {
 
    public Vold execute(Context context) {
 
        StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession();
 
        org.jbpm.process.instance.ProcessInstance processInstance = (org.jbpm.process.instance.ProcessInstance) ksession.getProcessInstance(piId);
 
        
          // put your logic here
    }
 
});

HTH

Reply to this message by going to Community

Start a new discussion in jBPM at Community