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&...]