Demian Calcaprina [
http://community.jboss.org/people/calca] created the discussion
"Re: Unclear on how to get a Process param into my WorkItem"
To view the discussion, visit:
http://community.jboss.org/message/620447#620447
--------------------------------------------------------------
Yes, you define the item type:
<itemDefinition id="_myVariableItem"
structureRef="com.MyVariableClass" />
Then, define the process variables:
<property id="myVariable" itemSubjectRef="_myVariableItem"/>
And then you declare it as inputs or outputs of the nodes that will needs it for input,
needs to modify it (will be output), or both:
<task ...
<dataInput id="_17_myVariableInput" name="*myVariable*" /> ->
this is the name that will be used inside the work item handler.
..
<inputSet>
...
<dataInputRefs>_17_myVariableInput</dataInputRefs>
...
</inputSet>
<dataInputAssociation>
<sourceRef>*myVariable*</sourceRef> -> this is the name of the
process variable
<targetRef>_17_myVariableInput</targetRef>
</dataInputAssociation>
And for output:
<dataOutput id="_17_myVariableOutput" name="*myVariable*" />
-> name that will be passed in the key of the .completeWorkItem result map.
...
<outputSet>
<dataOutputRefs>_17_myVariableOutput</dataOutputRefs>
</outputSet>
...
<dataOutputAssociation>
<sourceRef>_17_myVariableOutput</sourceRef>
<targetRef>*myVariable*</targetRef> -> here we assign the internal
variable to process variable
</dataOutputAssociation>
I usually make it writing bpmn file, and not eclipse, but I think that should work with
Parameter Mapping.
Regards,
Demian
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/620447#620447]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]