[jboss-user] [jBPM] - Re: setActorID for Swimlane in JBPM5
Aditya Gaurav
do-not-reply at jboss.com
Thu Feb 28 12:45:07 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/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]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130228/1f2a7fe2/attachment-0001.html
More information about the jboss-user
mailing list