<br><font size=2 face="sans-serif">Hi </font><font size=1 face="sans-serif"><b>Michael</b></font>
<br>
<br><font size=2 face="sans-serif">Thanks you very much for your quick
reply.</font>
<br><font size=2 face="sans-serif">I am sorry I could not understand the
proper classification of the forum.</font>
<br><font size=2 face="sans-serif">I have already sent the request to the
drools-user forum.</font>
<br>
<br><font size=2 face="sans-serif">In fact what I wanted to mean that -
</font>
<br><font size=2 face="sans-serif">I am using the 'TeamAllocationExample.xls'
- which is the default example I found searching in net.</font>
<br><font size=2 face="sans-serif">Here LHS and RHS portions are given
- I would like to know how could I execute the rule and get the result
what is given under 'ACTION' column? </font>
<br>
<br><font size=2 face="sans-serif">A code snippet could help me to go forward.</font>
<br>
<br><font size=2 face="sans-serif">Thanks again for your time and cooperation.</font>
<br><font size=2 face="sans-serif"><br>
Regards<br>
Sanjib Karmakar<br>
SkyTech Solutions Pvt. Ltd</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>&quot;Anstis, Michael (M.)&quot;
&lt;manstis1@ford.com&gt;</b> </font>
<br><font size=1 face="sans-serif">Sent by: rules-dev-bounces@lists.jboss.org</font>
<p><font size=1 face="sans-serif">06/30/2010 04:35 PM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
Rules Dev List &lt;rules-dev@lists.jboss.org&gt;</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">&quot;Rules Dev List&quot; &lt;rules-dev@lists.jboss.org&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [rules-dev] Request help for source
code of accessing excel &nbsp; &nbsp; &nbsp; &nbsp;file using Drools
5.0</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>Firstly, this would be best targeted at the drools-user
forum, as the<br>
dev mailing list is the preserve of drools development itself.<br>
<br>
Secondly, can you advise why you need to access the rules rather than<br>
the results inferred by the rules themselves when operating on facts?<br>
<br>
Once you have your KnowledgeBase you can retireve Rule objects using the<br>
API, however they appear to have limited use.<br>
<br>
Can you explain your use-case more?<br>
<br>
-----Original Message-----<br>
From: rules-dev-bounces@lists.jboss.org<br>
[mailto:rules-dev-bounces@lists.jboss.org] On Behalf Of Sanjib Karmakar<br>
Sent: 30 June 2010 09:04<br>
To: rules-dev@lists.jboss.org<br>
Subject: [rules-dev] Request help for source code of accessing excel<br>
file using Drools 5.0<br>
<br>
<br>
Hi <br>
<br>
I am new in drools and in my project I would like to access rules in<br>
excel<br>
file using drools 5.0<br>
Please provide me the source code for how to access the rules in excel<br>
file.<br>
<br>
I have done the following code<br>
<br>
KnowledgeBuilder kBuilder =<br>
KnowledgeBuilderFactory.newKnowledgeBuilder(); <br>
DecisionTableConfiguration dtconf =<br>
KnowledgeBuilderFactory.newDecisionTableConfiguration(); <br>
dtconf.setInputType( DecisionTableInputType.XLS ); <br>
dtconf.setWorksheetName(&quot;Tables&quot;); <br>
kBuilder.add(ResourceFactory.newFileResource(&quot;TeamAllocationExample.xls&quot;<br>
),<br>
ResourceType.DTABLE, dtconf);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
KnowledgeBuilderErrors errors = kBuilder.getErrors();<br>
 if (errors.size() &gt; 0) <br>
 &nbsp;{<br>
 &nbsp; &nbsp;for (KnowledgeBuilderError error: errors) {<br>
 &nbsp; &nbsp;System.out.println(error);<br>
 &nbsp;}<br>
 &nbsp;throw new IllegalArgumentException(&quot;Could not parse knowledge.&quot;);<br>
}<br>
<br>
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();<br>
kbase.addKnowledgePackages(kBuilder.getKnowledgePackages());<br>
return kbase; <br>
<br>
How could I use the POJO for accessing the rule?<br>
<br>
Please help me.<br>
<br>
Thanks in advance<br>
Sanjib<br>
<br>
-- <br>
View this message in context:<br>
http://drools-java-rules-engine.46999.n3.nabble.com/Request-help-for-sou<br>
rce-code-of-accessing-excel-file-using-Drools-5-0-tp932651p932651.html<br>
Sent from the Drools - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-dev mailing list<br>
rules-dev@lists.jboss.org<br>
https://lists.jboss.org/mailman/listinfo/rules-dev<br>
<br>
_______________________________________________<br>
rules-dev mailing list<br>
rules-dev@lists.jboss.org<br>
https://lists.jboss.org/mailman/listinfo/rules-dev<br>
</tt></font>
<br>