<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
<table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tbody>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tbody>
<tr>
<td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
<h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
<!-- To have a header image/logo replace the name below with your img tag -->
<!-- Email clients will render the images when the message is read so any image -->
<!-- must be made available on a public server, so that all recipients can load the image. -->
<a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Re: Exception when running with more than 1 variable
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/melc">Chris Melas</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/604163#604163">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>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.</p><p>the evaluation process which is a sample process bundled with the jbpm installation has id = com.sample.evaluation</p><p>therefore the com.sample.evaluation.ftl file is the first form displayed with title "Start Performance Evaluation",</p><p>asking for username "Please fill in your username: " etc....</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The com.sample.evaluation.ftl is located in <span class="hps" style="font-size: 12px;" title="Haz clic para obtener otras posibles traducciones">jbpm</span><span class="atn" style="font-size: 12px;" title="Haz clic para obtener otras posibles traducciones">-</span><span style="font-size: 12px;" title="Haz clic para obtener otras posibles traducciones">gwt</span><span class="atn" style="font-size: 12px;" title="Haz clic para obtener otras posibles traducciones">-</span><span style="font-size: 12px;" title="Haz clic para obtener otras posibles traducciones">form.jar</span> <span class="hps" style="font-size: 12px;" title="Haz clic para obtener otras posibles traducciones">in</span> <span class="hps" style="font-size: 12px;" title="Haz clic para obtener otras posibles traducciones">libraries</span> <span class="hps" style="font-size: 12px;" title="Haz clic para obtener otras posibles traducciones">jbpm</span><span class="atn" style="font-size: 12px;" title="Haz clic para obtener otras posibles traducciones">-</span><span style="font-size: 12px;" title="Haz clic para obtener otras posibles traducciones">gwt</span><span style="font-size: 12px;" title="Haz clic para obtener otras posibles traducciones">-console</span><span class="atn" style="font-size: 12px;" title="Haz clic para obtener otras posibles traducciones">-</span><span style="font-size: 12px;" title="Haz clic para obtener otras posibles traducciones">server.war (also mentioned in this thread, <a class="" href="http://community.jboss.org/message/603284#603284">http://community.jboss.org/message/603284</a></span>)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"><span style="font-size: 12px;" title="Haz clic para obtener otras posibles traducciones"> </span> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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.</p><p>(To see other ways of playing around with variables etc, take a look at the following threads,</p><p><a class="jive-link-thread-small" href="http://community.jboss.org/thread/166412">http://community.jboss.org/thread/166412</a></p><p><a class="" href="http://community.jboss.org/message/603579#603579">http://community.jboss.org/message/603579</a></p><p>)</p><p>This is the reason why #{employee} works when placed in the ActorId of the first task "Self Evaluation".</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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. </p><p>i.e.</p><p><form action="complete" method="POST" enctype="multipart/form-data"></p><p>Please fill in your username: <input type="text" name="employee" /></BR></p><p>Please fill in hr username: <input type="text" name="hr" /></BR></p><p>Please fill in pm username or something: <input type="text" name="pm" /></BR></p><p>Reason:<BR/></p><p><textarea cols="50" rows="5" name="reason"></textarea></BR></p><p><input type="submit" value="Complete"></p><p></form></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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).</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/604163#604163">going to Community</a></p>
<p style="margin: 0;">Start a new discussion in jBPM at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>