[jboss-user] [jBPM] - Re: Jbpm 5 user form variables

Matthew Wojtowicz do-not-reply at jboss.com
Mon Jan 3 23:55:31 EST 2011


Matthew Wojtowicz [http://community.jboss.org/people/mattu16] created the discussion

"Re: Jbpm 5 user form variables"

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

--------------------------------------------------------------
Thanks got this to work.

Code for Script before Human Task(Don't forget to add import java.util.HashMap):
map = new HashMap();
map.put("id",id);
map.put("priority",priority);
map.put("quantity",quantity);
kcontext.setVariable("map", map);
 map = new HashMap();
 map.put("id",id);
 map.put("priority",priority);
 map.put("quantity",quantity);
 kcontext.setVariable("map", map);

Then Human task Node

<userTask id="_2" name="Order Evaluation" >
      <ioSpecification>
        <dataInput id="_2_ContentInput" name="Content" />
        <dataInput id="_2_CommentInput" name="Comment" />
        <dataInput id="_2_SkippableInput" name="Skippable" />
        <dataInput id="_2_TaskNameInput" name="TaskName" />
        <inputSet>
          <dataInputRefs>_2_ContentInput</dataInputRefs>
          <dataInputRefs>_2_CommentInput</dataInputRefs>
          <dataInputRefs>_2_SkippableInput</dataInputRefs>
          <dataInputRefs>_2_TaskNameInput</dataInputRefs>
        </inputSet>
        <outputSet>
        </outputSet>
      </ioSpecification>
      <dataInputAssociation>
        <sourceRef>map</sourceRef>
        <targetRef>_2_ContentInput</targetRef>
      </dataInputAssociation>
      <dataInputAssociation>
        <targetRef>_2_CommentInput</targetRef>
        <assignment>
          <from xs:type="tFormalExpression">Please create an order.</from>
          <to xs:type="tFormalExpression">_2_CommentInput</to>
        </assignment>
      </dataInputAssociation>
      <dataInputAssociation>
        <targetRef>_2_SkippableInput</targetRef>
        <assignment>
          <from xs:type="tFormalExpression">false</from>
          <to xs:type="tFormalExpression">_2_SkippableInput</to>
        </assignment>
      </dataInputAssociation>
      <dataInputAssociation>
        <targetRef>_2_TaskNameInput</targetRef>
        <assignment>
          <from xs:type="tFormalExpression">Order Evaluation</from>
          <to xs:type="tFormalExpression">_2_TaskNameInput</to>
        </assignment>
      </dataInputAssociation>
      <potentialOwner>
        <resourceAssignmentExpression>
          <formalExpression>krisv</formalExpression>
        </resourceAssignmentExpression>
      </potentialOwner>
    </userTask>

I accessed the variables in my ftl as ${id} ${priority}. DO NOT use ${content.id} or ${map.id}
--------------------------------------------------------------

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

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/20110103/a278b833/attachment.html 


More information about the jboss-user mailing list