<br><font size=2 face="sans-serif">Hi Zeta,</font>
<br>
<br><font size=2 face="sans-serif">Just to confirm: You'll find that writing
an Excel VBA macro will not work, as they are neither MVEL nor Java.</font>
<br>
<br><font size=2 face="sans-serif">How I've handled it is created a Helper
class with public static methods. Then in the Import section at the top
of the file, I link to the functions I use, prefixed with the "function"
keyword, eg:</font>
<br>
<br>
<table border>
<tr valign=top>
<td><font size=2 face="sans-serif">RuleSet</font>
<td><font size=2 face="sans-serif">myRuleSet</font>
<tr valign=top>
<td><font size=2 face="sans-serif">Import</font>
<td><font size=2 face="sans-serif">nz.co.bnz.projectname.common.factmodel.*,</font>
<br><font size=2 face="sans-serif"><b>function nz.co.bnz.projectname.helpers.HelperClass.methodName</b></font>
<tr valign=top>
<td><font size=2 face="sans-serif">Functions</font>
<td><font size=2 face="sans-serif">dialect "mvel"</font>
<tr valign=top>
<td><font size=2 face="sans-serif">...</font>
<td></table>
<br><font size=2 face="sans-serif"><br>
Of course the main advantage of using helper classes like this is you can
reuse them - no need to rewrite your methods everywhere you want to use
them.</font>
<br>
<br><font size=2 face="sans-serif">Of course this isn't particularly helpful
if you're not coding in Java.</font>
<br>
<br><font size=2 face="sans-serif">Note: Under mvel you seem to need to
specify each function name separately, when using Java you can use HelperClass.*</font>
<br><font size=2 face="sans-serif"> - This applies to any rules file-type
(.drl / .dslr / .xls / .csv / etc)</font>
<br>
<br><font size=2 face="sans-serif">Hope some of this helps,</font>
<br><font size=2 face="sans-serif">-Trav</font>
<br><font size=2 face="sans-serif"><br>
</font><font size=1 face="Arial"><b>Travis Smith</b><br>
Analyst Programmer<br>
Development Centre<br>
BNZ<br>
<br>
DDI: +644 4746356 (Or Ext 76356)</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<br><font size=1 color=#800080 face="Arial"><b>zeta <zoraidahidalgo@gmail.com></b></font>
<br><font size=1 color=#800080 face="sans-serif">Sent by: </font><font size=1 color=#800080 face="sans-serif">rules-users-bounces@lists.jboss.org</font>
<p><font size=1 face="sans-serif">05/05/2011 03:38 a.m.</font>
<br><font size=1 face="sans-serif">Please respond to<br>
Rules Users List <rules-users@lists.jboss.org></font>
<td>
<td>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">rules-users@lists.jboss.org</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">[rules-users] SPREADSHEET
DECISION TABLE: Can I use functions into CONDITIONS?</font></table>
<br></table>
<br>
<br>
<br>
<br><tt><font size=2>HI!, I need to check if a given date is between two
dates. So, I would like<br>
to call a function that calculates if the given date is between other<br>
two(specifically, between current date and current date plus some months,<br>
and the variable "months" changes dynamically). I tried to write
a<br>
function(inside spreadsheet) that receives the date and the variable months<br>
but does not compile. I have found not samples about functions used into<br>
condition part so I am wondering if that is the problem. If it is the case,<br>
what can i do?<br>
<br>
Thanks.<br>
<br>
--<br>
View this message in context: http://drools.46999.n3.nabble.com/SPREADSHEET-DECISION-TABLE-Can-I-use-functions-into-CONDITIONS-tp2899330p2899330.html<br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
rules-users@lists.jboss.org<br>
https://lists.jboss.org/mailman/listinfo/rules-users<br>
</font></tt>
<br><pre>
CAUTION - This message may contain privileged and confidential information
intended only for the use of the addressee named above. If you are not the
intended recipient of this message you are hereby notified that any use,
dissemination, distribution or reproduction of this message is prohibited.
This email was sent by the Bank of New Zealand. You can contact us on
0800 ASK BNZ (0800 275 269). Any views expressed in this message are those
of the individual sender and may not necessarily reflect the views of Bank
of New Zealand.
</pre>