[jboss-dev-forums] [jBPM Development] - Re: kcontext.setVariable("variable", value) for begin used by following tasks?

knevik do-not-reply at jboss.com
Tue Jul 10 04:06:28 EDT 2012


knevik [https://community.jboss.org/people/knevik] created the discussion

"Re: kcontext.setVariable("variable",value) for begin used by following tasks?"

To view the discussion, visit: https://community.jboss.org/message/747116#747116

--------------------------------------------------------------
if you do want to set a variable in the workflow use the following code

kcontext.setVariable("userId", "user");    //where userId is the variable name and user is the name of the user

this can be put in either a script task of its own, or in the on-entry or on-exit event of another task

<userTask id="_5" name="Human Task" >
      <extensionElements>
       <tns:onEntry-script scriptFormat=" http://www.java.com/java http://www.java.com/java">
        <script>
         kcontext.setVariable("userId", "user");
        </script>
       </tns:onEntry-script>
      </extensionElements>
      <ioSpecification>
          ...
</userTask>
--------------------------------------------------------------

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120710/d4763115/attachment.html 


More information about the jboss-dev-forums mailing list