Ryan Peterson [http://community.jboss.org/people/rrpeterson] created the discussion
"Re: passing data to nodes" To view the discussion, visit: http://community.jboss.org/message/625145#625145 -------------------------------------------------------------- I'm going through this myself, so far I've found: Put the variable into the map like you wrote: Map<String, Object> params = new HashMap<String, Object>(); boolean examOK = false; params.put("examOK", examOK); ksession.startProcess("com.sample.bpmn.hello", params); Then in the bpmn definition, you need to have the process variables (if you want a global process variable I think?): <itemDefinition id="_examOK" structureRef="java.lang.Boolean" /> and within the process def itself (still in the .bpmn file): <property id="examOK" itemSubjectRef="_examOK"/> You also need the dataInput mapped to your task (within your task, that lies inside the process): <dataInput id="_999_examOK" name="examOK" /> <inputSet> <dataInputRefs>_999_examOK</dataInputRefs> </inputSet> <dataInputAssociation> <sourceRef>examOK</sourceRef> <targetRef>_999_examOK</targetRef> </dataInputAssociation> That will map it into your workItemHandler, so you can obtain it via: Boolean examOk = (Boolean) workItem.getParameter("examOK"); I'm not 100% sure if this is the "correct" way to implement this. I'm unsure if this variable is global for all processes, for instance: what if the process is started multiple times for multiple users? Does each process implementation get its own global examOk boolean using this method? -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/625145#625145] 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 [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
