Kris Verlaenen [http://community.jboss.org/people/KrisVerlaenen] created the 
discussion

"Re: JBPM 5 variable (Result Mapping Problem)"

To view the discussion, visit: http://community.jboss.org/message/583167#583167

--------------------------------------------------------------
You are using a task with task name "Handler" and registering your 
WorkingHandler, so that will be invoked when the task needs to be executed.  If 
you want to pass data back in as the result of the execution, you should 
however do so when completing your work item, for example:

            Map results = new HashMap();
            results.put("MyResultParam", "MyValue");
            manager.completeWorkItem(workItem.getId(), results);

Your result mapping also seems to be incorrect.  In this case, you should map 
the value of the parameter "MyResultParam" to the process variable "Result" in 
the result mapping: {MyResultParam=Result}
This looks like this in bpmn2 xml:
    <task id="_4" name="Notification" tns:taskName="Notification" >
      <ioSpecification>
          .....
        <dataOutput id="_4_MyResultParamOutput" name="MyResultParam" />
         .....
        <outputSet>
          <dataOutputRefs>_4_MyResultParamOutput</dataOutputRefs>
        </outputSet>
      </ioSpecification>
       .....
      <dataOutputAssociation>
        <sourceRef>_4_MyResultParamOutput</sourceRef>
        <targetRef>Result</targetRef>
      </dataOutputAssociation>
    </task>

After that, your value should be written out in the final script task.

Kris
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/583167#583167]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to