Aditya Gaurav [https://community.jboss.org/people/e3aa3b] created the discussion
"Re: setActorID for Swimlane in JBPM5" To view the discussion, visit: https://community.jboss.org/message/800125#800125 -------------------------------------------------------------- Hi Maciej, I am currently trying to work out a POC where I can change the actor on a Swimlane after the process has been started. i.e. === | | | | final ProcessInstance pi = ksession.startProcess("com.sample.evaluation1"); | === And then: GenericCommand<Void> genericCommand = new GenericCommand<Void>(){ public Void execute(Context context){ System.out.println("inside execute"); StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession(); ProcessInstance processInstance = ksession.getProcessInstance(pi.getId()); WorkflowProcessInstance wfpi = (WorkflowProcessInstance)processInstance; SwimlaneContextInstance slci = (SwimlaneContextInstance)wfpi.getContextInstance(SwimlaneContext.SWIMLANE_SCOPE); SwimlaneContext sc = slci.getSwimlaneContext(); Swimlane s1 = sc.getSwimlane("SL1"); Swimlane s2 = sc.getSwimlane("SL2"); s1.setActorId("krisv"); s2.setActorId("mary"); // WorkflowProcessInstanceUpgrader.upgradeProcessInstance(ksession, processInstance.getId(), "com.sample.evaluation1", null); //slci.setActorId("SL1", "krisv"); //slci.setActorId("SL2", "mary"); return null; } }; ksession.execute(genericCommand); ================================ The intention is that we should be able to dynamically modify/set the actor ID (using setActorID method of Swimlane class). Thanks -------------------------------------------------------------- Reply to this message by going to Community [https://community.jboss.org/message/800125#800125] Start a new discussion in jBPM at Community [https://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
