You need to use both mappings <div>IN Mappings (Parameter Mapping in the IDE): this will copy your process variables to the work item scope </div><div>and OUT Mappings (Result Mappings): this will copy the information created or modified by the work item (in this case a human task) to the process scope.</div>
<div><br></div><div>Greetings!<br><br><div class="gmail_quote">2010/11/15 matus <span dir="ltr">&lt;<a href="mailto:matus.majchrak@gmail.com">matus.majchrak@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<div><br></div><div>I recently run into some problems when trying to create a simple holiday request process. </div><div>I defined process variables but I struggle to understand how to access them in Human Task. </div>
<div>

In my User Task ,,holiday approval&quot; I have this as a description: #{employee} requested holiday for #{length} days </div><div>I set both variables when I start the process and the result looks as expected, for example ,,John requested holiday fo 14 days.</div>


<div>But lets say I want a manager approving the holiday request to add his response as a variable. How do I do that?</div><div>I tried to use the Result mapping with someting like this: response=response but I get an error saying ,,There is no ID/IDREF binding for IDREF &#39;_2_response&#39;.</div>


<div>Also if I manage to get this running, how do I set this variable in a client app?[using WS_HT] </div><div>I am sorry if I am asking realy basic things, but I realy need some advice.</div><div>Bellow is the process definition.</div>


<div>Thanks a lot, matus</div><div><br></div><div><br></div><div><div>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; </div><div>&lt;definitions id=&quot;Definition&quot;</div><div>             targetNamespace=&quot;<a href="http://www.jboss.org/drools" target="_blank">http://www.jboss.org/drools</a>&quot;</div>


<div>             typeLanguage=&quot;<a href="http://www.java.com/javaTypes" target="_blank">http://www.java.com/javaTypes</a>&quot;</div><div>             expressionLanguage=&quot;<a href="http://www.mvel.org/2.0" target="_blank">http://www.mvel.org/2.0</a>&quot;</div>


<div>             xmlns=&quot;<a href="http://www.omg.org/spec/BPMN/20100524/MODEL" target="_blank">http://www.omg.org/spec/BPMN/20100524/MODEL</a>&quot;</div><div>             xmlns:xs=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>&quot;</div>


<div>             xs:schemaLocation=&quot;<a href="http://www.omg.org/spec/BPMN/20100524/MODEL" target="_blank">http://www.omg.org/spec/BPMN/20100524/MODEL</a> BPMN20.xsd&quot;</div><div>             xmlns:bpmndi=&quot;<a href="http://www.omg.org/spec/BPMN/20100524/DI" target="_blank">http://www.omg.org/spec/BPMN/20100524/DI</a>&quot;</div>


<div>             xmlns:dc=&quot;<a href="http://www.omg.org/spec/DD/20100524/DC" target="_blank">http://www.omg.org/spec/DD/20100524/DC</a>&quot;</div><div>             xmlns:di=&quot;<a href="http://www.omg.org/spec/DD/20100524/DI" target="_blank">http://www.omg.org/spec/DD/20100524/DI</a>&quot;</div>


<div>             xmlns:tns=&quot;<a href="http://www.jboss.org/drools" target="_blank">http://www.jboss.org/drools</a>&quot;&gt;</div><div><br></div><div>  &lt;itemDefinition id=&quot;_employeeItem&quot; structureRef=&quot;String&quot; /&gt;</div>


<div>  &lt;itemDefinition id=&quot;_lengthItem&quot; structureRef=&quot;String&quot; /&gt;</div><div>  &lt;itemDefinition id=&quot;_managersItem&quot; structureRef=&quot;String&quot; /&gt;</div><div>  &lt;itemDefinition id=&quot;_responseItem&quot; structureRef=&quot;String&quot; /&gt;</div>


<div><br></div><div>  &lt;process processType=&quot;Private&quot; isExecutable=&quot;true&quot; id=&quot;com.sample.test&quot; name=&quot;test process&quot; tns:packageName=&quot;defaultPackage&quot; &gt;</div><div><br></div>


<div>    &lt;!-- process variables --&gt;</div><div>    &lt;property id=&quot;employee&quot; itemSubjectRef=&quot;_employeeItem&quot;/&gt;</div><div>    &lt;property id=&quot;length&quot; itemSubjectRef=&quot;_lengthItem&quot;/&gt;</div>


<div>    &lt;property id=&quot;managers&quot; itemSubjectRef=&quot;_managersItem&quot;/&gt;</div><div>    &lt;property id=&quot;response&quot; itemSubjectRef=&quot;_responseItem&quot;/&gt;</div><div><br></div><div>    &lt;!-- nodes --&gt;</div>


<div>    &lt;startEvent id=&quot;_1&quot; name=&quot;StartProcess&quot; /&gt;</div><div>    &lt;userTask id=&quot;_2&quot; name=&quot;Holiday approval&quot; &gt;</div><div>      &lt;ioSpecification&gt;</div><div>        &lt;dataInput id=&quot;_2_CommentInput&quot; name=&quot;Comment&quot; /&gt;</div>


<div>        &lt;dataInput id=&quot;_2_SkippableInput&quot; name=&quot;Skippable&quot; /&gt;</div><div>        &lt;dataInput id=&quot;_2_ContentInput&quot; name=&quot;Content&quot; /&gt;</div><div>        &lt;dataInput id=&quot;_2_TaskNameInput&quot; name=&quot;TaskName&quot; /&gt;</div>


<div>        &lt;dataInput id=&quot;_2_PriorityInput&quot; name=&quot;Priority&quot; /&gt;</div><div>        &lt;dataOutput id=&quot;_2_responseOutput&quot; name=&quot;response&quot; /&gt;</div><div>        &lt;inputSet&gt;</div>


<div>          &lt;dataInputRefs&gt;_2_CommentInput&lt;/dataInputRefs&gt;</div><div>          &lt;dataInputRefs&gt;_2_SkippableInput&lt;/dataInputRefs&gt;</div><div>          &lt;dataInputRefs&gt;_2_ContentInput&lt;/dataInputRefs&gt;</div>


<div>          &lt;dataInputRefs&gt;_2_TaskNameInput&lt;/dataInputRefs&gt;</div><div>          &lt;dataInputRefs&gt;_2_PriorityInput&lt;/dataInputRefs&gt;</div><div>        &lt;/inputSet&gt;</div><div>        &lt;outputSet&gt;</div>


<div>          &lt;dataOutputRefs&gt;_2_responseOutput&lt;/dataOutputRefs&gt;</div><div>        &lt;/outputSet&gt;</div><div>      &lt;/ioSpecification&gt;</div><div>      &lt;dataInputAssociation&gt;</div><div>        &lt;targetRef&gt;_2_CommentInput&lt;/targetRef&gt;</div>


<div>        &lt;assignment&gt;</div><div>          &lt;from xs:type=&quot;tFormalExpression&quot;&gt;#{employee} requested holiday for #{length} days &lt;/from&gt;</div><div>          &lt;to xs:type=&quot;tFormalExpression&quot;&gt;_2_CommentInput&lt;/to&gt;</div>


<div>        &lt;/assignment&gt;</div><div>      &lt;/dataInputAssociation&gt;</div><div>      &lt;dataInputAssociation&gt;</div><div>        &lt;targetRef&gt;_2_SkippableInput&lt;/targetRef&gt;</div><div>        &lt;assignment&gt;</div>


<div>          &lt;from xs:type=&quot;tFormalExpression&quot;&gt;false&lt;/from&gt;</div><div>          &lt;to xs:type=&quot;tFormalExpression&quot;&gt;_2_SkippableInput&lt;/to&gt;</div><div>        &lt;/assignment&gt;</div>


<div>      &lt;/dataInputAssociation&gt;</div><div>      &lt;dataInputAssociation&gt;</div><div>        &lt;targetRef&gt;_2_ContentInput&lt;/targetRef&gt;</div><div>        &lt;assignment&gt;</div><div>          &lt;from xs:type=&quot;tFormalExpression&quot;&gt;&lt;/from&gt;</div>


<div>          &lt;to xs:type=&quot;tFormalExpression&quot;&gt;_2_ContentInput&lt;/to&gt;</div><div>        &lt;/assignment&gt;</div><div>      &lt;/dataInputAssociation&gt;</div><div>      &lt;dataInputAssociation&gt;</div>


<div>        &lt;targetRef&gt;_2_TaskNameInput&lt;/targetRef&gt;</div><div>        &lt;assignment&gt;</div><div>          &lt;from xs:type=&quot;tFormalExpression&quot;&gt;Holiday Approval&lt;/from&gt;</div><div>          &lt;to xs:type=&quot;tFormalExpression&quot;&gt;_2_TaskNameInput&lt;/to&gt;</div>


<div>        &lt;/assignment&gt;</div><div>      &lt;/dataInputAssociation&gt;</div><div>      &lt;dataInputAssociation&gt;</div><div>        &lt;targetRef&gt;_2_PriorityInput&lt;/targetRef&gt;</div><div>        &lt;assignment&gt;</div>


<div>          &lt;from xs:type=&quot;tFormalExpression&quot;&gt;&lt;/from&gt;</div><div>          &lt;to xs:type=&quot;tFormalExpression&quot;&gt;_2_PriorityInput&lt;/to&gt;</div><div>        &lt;/assignment&gt;</div><div>


      &lt;/dataInputAssociation&gt;</div><div>      &lt;dataOutputAssociation&gt;</div><div>        &lt;sourceRef&gt;_2_response&lt;/sourceRef&gt;</div><div>        &lt;targetRef&gt;_2_response&lt;/targetRef&gt;</div><div>


      &lt;/dataOutputAssociation&gt;</div><div>      &lt;potentialOwner&gt;</div><div>        &lt;resourceAssignmentExpression&gt;</div><div>          &lt;formalExpression&gt;#{managers}&lt;/formalExpression&gt;</div><div>


        &lt;/resourceAssignmentExpression&gt;</div><div>      &lt;/potentialOwner&gt;</div><div>    &lt;/userTask&gt;</div><div>    &lt;endEvent id=&quot;_3&quot; name=&quot;End&quot; &gt;</div><div>        &lt;terminateEventDefinition/&gt;</div>


<div>    &lt;/endEvent&gt;</div><div><br></div><div>    &lt;!-- connections --&gt;</div><div>    &lt;sequenceFlow id=&quot;_1-_2&quot; sourceRef=&quot;_1&quot; targetRef=&quot;_2&quot; /&gt;</div><div>    &lt;sequenceFlow id=&quot;_2-_3&quot; sourceRef=&quot;_2&quot; targetRef=&quot;_3&quot; /&gt;</div>


<div><br></div><div>  &lt;/process&gt;</div><div><br></div><div>  &lt;bpmndi:BPMNDiagram&gt;</div><div>    &lt;bpmndi:BPMNPlane bpmnElement=&quot;com.sample.test&quot; &gt;</div><div>      &lt;bpmndi:BPMNShape bpmnElement=&quot;_1&quot; &gt;</div>


<div>        &lt;dc:Bounds x=&quot;16&quot; y=&quot;16&quot; width=&quot;48&quot; height=&quot;48&quot; /&gt;</div><div>      &lt;/bpmndi:BPMNShape&gt;</div><div>      &lt;bpmndi:BPMNShape bpmnElement=&quot;_2&quot; &gt;</div>


<div>        &lt;dc:Bounds x=&quot;96&quot; y=&quot;16&quot; width=&quot;100&quot; height=&quot;48&quot; /&gt;</div><div>      &lt;/bpmndi:BPMNShape&gt;</div><div>      &lt;bpmndi:BPMNShape bpmnElement=&quot;_3&quot; &gt;</div>


<div>        &lt;dc:Bounds x=&quot;340&quot; y=&quot;16&quot; width=&quot;48&quot; height=&quot;48&quot; /&gt;</div><div>      &lt;/bpmndi:BPMNShape&gt;</div><div>      &lt;bpmndi:BPMNEdge bpmnElement=&quot;_1-_2&quot; &gt;</div>


<div>        &lt;di:waypoint x=&quot;40&quot; y=&quot;40&quot; /&gt;</div><div>        &lt;di:waypoint x=&quot;146&quot; y=&quot;40&quot; /&gt;</div><div>      &lt;/bpmndi:BPMNEdge&gt;</div><div>      &lt;bpmndi:BPMNEdge bpmnElement=&quot;_2-_3&quot; &gt;</div>


<div>        &lt;di:waypoint x=&quot;146&quot; y=&quot;40&quot; /&gt;</div><div>        &lt;di:waypoint x=&quot;364&quot; y=&quot;40&quot; /&gt;</div><div>      &lt;/bpmndi:BPMNEdge&gt;</div><div>    &lt;/bpmndi:BPMNPlane&gt;</div>


<div>  &lt;/bpmndi:BPMNDiagram&gt;</div><div><br></div><div>&lt;/definitions&gt;</div></div><div><br></div>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> - CTO @ <a href="http://www.plugtree.com">http://www.plugtree.com</a>  <br> - MyJourney @ <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br>
 - Co-Founder @ <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> <br> - Salatino &quot;Salaboy&quot; Mauricio -<br>
</div>