I&#39;m a little confused, are you using spreadsheet Decision Tables or spreadsheets to simply hold data for Rule Templates?<br><br>I glean that you have a spreadsheet containing parameters used in Templates and you&#39;d like to validate these parameters.<br>
<br>Could you please clarify?<br><br>Thanks<br><br><div class="gmail_quote">On 5 March 2011 14:19, groovenarula <span dir="ltr">&lt;<a href="mailto:gnarula1@la-z-boy.com">gnarula1@la-z-boy.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello all,<br>
<br>
In my use case, I am planning on using decision tables to implement rules<br>
that contain product information (product attributes - like product grade,<br>
product style etc). I&#39;ve managed to put together the spreadsheet and have<br>
been successful in generating different set of rules (using rule templates)<br>
from this spreadsheet. The spreadsheet with contain basic product<br>
information that product fact will be matched against.<br>
<br>
e.g. The spreadsheet will contain columns of product grade and product<br>
styles that when translated into rules, the LHS would look something like<br>
<br>
     Product ( grade == &quot;010&quot;, style == &quot;515&quot; )<br>
<br>
Where the &#39;010&#39; and &#39;515&#39; would come from a spreadsheet (decision table)<br>
that the user&#39;s provide.<br>
<br>
Now here&#39;s the challenge. I need to also provide a means for the user to<br>
validate the &quot;010&quot; and &quot;515&quot;. The available product grade and styles are<br>
available in a database table. So I should be able to use that to build<br>
second set of rules (templates). So I&#39;m thinking, if there&#39;s a way to<br>
convert the user supplied spreadsheet and make it a table of &#39;facts&#39; of the<br>
validation rules, I should be able to verify the value &quot;010&quot; &quot;515&quot; against<br>
the database.<br>
<br>
Is that the best way to go about this ? If so, can someone please point me<br>
to a way to load facts from a spreadsheet ? I have looked around and found<br>
that there is a jxls project that allows loading of JavaBeans from values in<br>
spreadsheet. But it requires xml files to be configured. I really like the<br>
way rule templates work (by simply state substitution variables in the<br>
template itself - thereby avoiding the whole need to configuration xml<br>
files). I think if there&#39;s a way to load facts using templates from a<br>
spreadsheet, I should be able to use that concept to validate the values in<br>
my rules.<br>
<br>
So is it possible to do the above ? Also is there a better way ?<br>
<br>
Any insight would be appreciated.<br>
<br>
Thanks in advance,<br>
Gurvinder<br>
<font color="#888888"><br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/How-to-validate-literal-values-on-the-LHS-of-rules-tp2638081p2638081.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/How-to-validate-literal-values-on-the-LHS-of-rules-tp2638081p2638081.html</a><br>

Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br>