[jboss-user] [jBPM] - Re: JBPM 5 variable (Result Mapping Problem)

Kris Verlaenen do-not-reply at jboss.com
Tue Jan 25 16:52:17 EST 2011


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]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110125/5e1a85c7/attachment.html 


More information about the jboss-user mailing list