[jboss-user] [jBPM] - Re: setActorID for Swimlane in JBPM5

Aditya Gaurav do-not-reply at jboss.com
Wed Feb 27 02:53:08 EST 2013


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/799798#799798

--------------------------------------------------------------
Hi Maciej,

I tried below, but it still is not able to persist the change:

<code>

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");

                                                  //slci.setActorId("SL1", "krisv");
                                                  //slci.setActorId("SL2", "mary");

                                                  return null;

                                        }
                              };

                              ksession.execute(genericCommand);

</code>
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799798#799798]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130227/ddea777f/attachment.html 


More information about the jboss-user mailing list