[jboss-user] [jBPM] - Re: Unclear on how to get a Process param into my WorkItem

Demian Calcaprina do-not-reply at jboss.com
Wed Aug 10 14:12:03 EDT 2011

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.
        <sourceRef>*myVariable*</sourceRef> -> this is the name of the process variable

And for output:

<dataOutput id="_17_myVariableOutput" name="*myVariable*" /> -> name that will be passed in the key of the .completeWorkItem result map.
        <targetRef>*myVariable*</targetRef> -> here we assign the internal variable to process variable

I usually make it writing bpmn file, and not eclipse, but I think that should work with Parameter Mapping.



Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110810/15b1b167/attachment.html 

More information about the jboss-user mailing list