olddave [http://community.jboss.org/people/olddave] created the discussion
"Unclear on how to get a Process param into my WorkItem" To view the discussion, visit: http://community.jboss.org/message/620414#620414 -------------------------------------------------------------- Hi, I am defining my workflows using the BPMN2 Eclipse tool. When I run my WorkItem I need to get access to a parameter defined in the Process. I use this, which is not good because many Process may be running witht this same parameter in thei Stateful session. [code] | | | AClass myContext = null; | | | | | Iterator<ProcessInstance> it = ksession.getProcessInstances().iterator(); | | | | | while(it.hasNext()) { | | | | | | ProcessInstance procInst =it.next(); | | | | | | Map<String,Object> contxt = procInst.getProcess().getMetaData(); | | | | | | if(contxt.containsValue("myContext")) { | | | | | | | myContext = (AClass) contxt.get("myContext"); | | | | | } | | | | | } | | | | | if(myContext != null) | | | | | | service.run(aGrp, myContext); | | | | | manager.completeWorkItem(workItem.getId(), null); | | [/code] salaboy pointed to his general examples for a similar question and I looked in all of them and could not see where theh recommended way of accessing a Process parameter is shown. Thx. David -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/620414#620414] Start a new discussion in jBPM at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user