Chris Melas [http://community.jboss.org/people/melc] created the discussion

"Re: Exception when running with more than 1 variable"

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

--------------------------------------------------------------
Generally when a process starts the first form that is displayed is the ftl 
file having name the same as the process id i.e.
the evaluation process which is a sample process bundled with the jbpm 
installation has id = com.sample.evaluation
therefore the com.sample.evaluation.ftl file is the first form displayed with 
title "Start Performance Evaluation",
asking for username "Please fill in your username: " etc....

The com.sample.evaluation.ftl is located in jbpm-gwt-form.jar in libraries 
jbpm-gwt-console-server.war (also mentioned in this thread, 
http://community.jboss.org/message/603284 
(http://community.jboss.org/message/603284#603284))
 

Inside this ftl u'll notice that there is an input with the name employee and 
that is one way of populating a process variable.
(To see other ways of playing around with variables etc, take a look at the 
following threads,
 http://community.jboss.org/thread/166412 
http://community.jboss.org/thread/166412
 http://community.jboss.org/message/603579#603579 
http://community.jboss.org/message/603579
)
This is the reason why #{employee} works when placed in the ActorId of the 
first task "Self Evaluation".

So one way of setting values to your variables would be to enter two more 
fields inside the form of the com.sample.evaluation.ftl file, having names 
equal to the names of your variables. 
i.e.
<form action="complete" method="POST" enctype="multipart/form-data">
Please fill in your username: <input type="text" name="employee" /></BR>
Please fill in hr username: <input type="text" name="hr" /></BR>
Please fill in pm username or something: <input type="text" name="pm" /></BR>
Reason:<BR/>
<textarea cols="50" rows="5" name="reason"></textarea></BR>
<input type="submit" value="Complete">
</form>

Another would be similarly to set fields inside the ftl file corresponding to 
the "Self Evaluation" task (Performance Evaluation.ftl). Other approach could 
be to place logic on the On Entry Action or/and On Exit Action and Parameter 
Mapping (as used in the "Self Evaluation" task of the Evaluation.bpmn).
--------------------------------------------------------------

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

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