<font size=2 face="sans-serif">created jira 3270 for this.</font>
<br>
<br><font size=2 face="sans-serif">Also created 3271 along the same lines.</font>
<br>
<br>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Michael Anstis &lt;michael.anstis@gmail.com&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">To: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Rules Users List &lt;rules-users@lists.jboss.org&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">10/28/2011 12:07 AM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">Re: [rules-users]
Guvnor data enumeration issue</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">rules-users-bounces@lists.jboss.org</font>
<br>
<hr noshade>
<br>
<br>
<br><font size=3>You'll need to raise a JIRA for an enhancement.<br>
<br>
Dependent enumerations are currently only designed to operate between enumerations.<br>
<br>
With kind regards,<br>
<br>
Mike<br>
</font>
<br><font size=3>2011/10/28 &lt;</font><a href=mailto:GPatel@tsys.com><font size=3 color=blue><u>GPatel@tsys.com</u></font></a><font size=3>&gt;</font>
<br><font size=2 face="sans-serif">I am trying to use data enumerations
and running into a problem. Following the Vehicle engineType/fuelType data
enumeration example in the Guvnor manual, I created the following enumeration
list and it works:</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
'Vehicle.engineType' : (new test.VehicleHelper()).getEngineTypes()</font><font size=3>
</font><font size=2 face="sans-serif"><br>
'Vehicle.fuelType[engineType]' : '(new test.VehicleHelper()).getFuelTypes(&quot;@{engineType}&quot;)'</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
VehicleHelper:</font><font size=3> </font><font size=2 face="sans-serif"><br>
------------</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
public class VehicleHelper {</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; <br>
&nbsp; &nbsp; &nbsp; &nbsp; public List&lt;String&gt; getEngineTypes(){</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List&lt;String&gt;
engineTypes = new ArrayList&lt;String&gt;();</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; engineTypes.add(&quot;Petrol&quot;);</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; engineTypes.add(&quot;Diesel&quot;);</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return engineTypes;</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; }</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; <br>
&nbsp; &nbsp; &nbsp; &nbsp; public List&lt;String&gt; getFuelTypes(String
engineType){</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List&lt;String&gt;
fuelTypes = new ArrayList&lt;String&gt;();</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(&quot;Petrol&quot;.equalsIgnoreCase(engineType)){</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; fuelTypes.add(&quot;ULP&quot;);</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; fuelTypes.add(&quot;PULP&quot;);</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if(&quot;Diesel&quot;.equalsIgnoreCase(engineType)){</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; fuelTypes.add(&quot;BIO&quot;);</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; fuelTypes.add(&quot;NORMAL&quot;);</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else{</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; fuelTypes.add(&quot;Default Fuel 1&quot;);</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; fuelTypes.add(&quot;Default Fuel 2&quot;);</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return fuelTypes;</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; }</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
}</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Above works as expected.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Problem:</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I want to only have an enumeration on Vehicle.fuelType that depends on
the value of engineType, without specifying an enumeration on engineType.
So, I took out the first line in my enumeration list so that it is now:
</font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
'Vehicle.fuelType[engineType]' : '(new test.VehicleHelper()).getFuelTypes(&quot;@{engineType}&quot;)'</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
But that does not work. When I create a rule, VehicleHelper.getFuelTypes
does not get called and the dropdown for fuelType is not a list.</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
How do I get this working?</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Thanks</font><font size=3> </font><font size=2 face="sans-serif"><br>
G. Patel</font><font size=3> -----------------------------------------
The information contained in this communication (including any attachments
hereto) is confidential and is intended solely for the personal and confidential
use of the individual or entity to whom it is addressed. If the reader
of this message is not the intended recipient or an agent responsible for
delivering it to the intended recipient, you are hereby notified that you
have received this communication in error and that any review, dissemination,
copying, or unauthorized use of this information, or the taking of any
action in reliance on the contents of this information is strictly prohibited.
If you have received this communication in error, please notify us immediately
by e-mail, and delete the original message. Thank you <br>
_______________________________________________<br>
rules-users mailing list</font><font size=3 color=blue><u><br>
</u></font><a href="mailto:rules-users@lists.jboss.org"><font size=3 color=blue><u>rules-users@lists.jboss.org</u></font></a><font size=3 color=blue><u><br>
</u></font><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target=_blank><font size=3 color=blue><u>https://lists.jboss.org/mailman/listinfo/rules-users</u></font></a><font size=3><br>
</font>
<br><tt><font size=2>_______________________________________________<br>
rules-users mailing list<br>
rules-users@lists.jboss.org<br>
</font></tt><a href="https://lists.jboss.org/mailman/listinfo/rules-users"><tt><font size=2>https://lists.jboss.org/mailman/listinfo/rules-users</font></tt></a><tt><font size=2><br>
</font></tt>
<br>