[jboss-user] [jBPM] - Re: Can a POJO be Parameter Mapped?
Demian Calcaprina
do-not-reply at jboss.com
Mon Aug 1 08:14:59 EDT 2011
Demian Calcaprina [http://community.jboss.org/people/calca] created the discussion
"Re: Can a POJO be Parameter Mapped?"
To view the discussion, visit: http://community.jboss.org/message/618583#618583
--------------------------------------------------------------
Hi Gary,
Yes, it is possible. I think this example can help you:
https://github.com/Salaboy/Drools_jBPM5-Training-Examples/blob/master/jbpm5/04-jBPM5-PersistentEmergencyServiceProcess/ https://github.com/Salaboy/Drools_jBPM5-Training-Examples/blob/master/jbpm5/04-jBPM5-PersistentEmergencyServiceProcess/
You can check that the process
https://github.com/Salaboy/Drools_jBPM5-Training-Examples/blob/master/jbpm5/04-jBPM5-PersistentEmergencyServiceProcess/src/test/resources/EmergencyServiceTracking.bpmn https://github.com/Salaboy/Drools_jBPM5-Training-Examples/blob/master/jbpm5/04-jBPM5-PersistentEmergencyServiceProcess/src/test/resources/EmergencyServiceTracking.bpmn
contains complex variables.
Basically, you have to:
1) Declare de variable type:
<itemDefinition id="_emergencyItem" structureRef="com.wordpress.salaboy.example.model.Emergency"/>
2) Declare the variable:
<property id="emergency" itemSubjectRef="_emergencyItem"/>
3)
Declare the variable as input (or output) in the task:
<userTask id="_2" name="Ask for Emergency Information">
<ioSpecification>
*<dataInput id="_2_emergencyInput" name="emergency"/>*
....
....
<inputSet>
* <dataInputRefs>_2_emergencyInput</dataInputRefs>*
....
</inputSet>
<outputSet>
...
</outputSet>
</ioSpecification>
*<dataInputAssociation>*
* <sourceRef>emergency</sourceRef>*
* <targetRef>_2_emergencyInput</targetRef>*
* </dataInputAssociation>*
</userTask>
4) Send it as parameter in the process, or as an output of another task.
Hope it helps.
Demian
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/618583#618583]
Start a new discussion in jBPM at Community
[http://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/20110801/7bc4ffb0/attachment-0001.html
More information about the jboss-user
mailing list