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/jbp...
https://github.com/Salaboy/Drools_jBPM5-Training-Examples/blob/master/jbp...
You can check that the process
https://github.com/Salaboy/Drools_jBPM5-Training-Examples/blob/master/jbp...
https://github.com/Salaboy/Drools_jBPM5-Training-Examples/blob/master/jbp...
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&...]