<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.5921" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=914094913-30062010><FONT face=Arial 
color=#0000ff size=2>No problem.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=914094913-30062010><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=914094913-30062010><FONT face=Arial 
color=#0000ff size=2>I'd suggest you look into KnowledgeBase's 
newStatefulKnowledgeSession or newStatelessKnowledgeSession (depending upon your 
use-case).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=914094913-30062010><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=914094913-30062010><FONT face=Arial 
color=#0000ff size=2>Once you have these you can insert your POJO (Fact) objects 
and receive the appropriate results (Actions).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=914094913-30062010><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=914094913-30062010><FONT face=Arial 
color=#0000ff size=2>I get the feeling you have not read the excellent 
documentation; this would definitely assist you.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=914094913-30062010><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=914094913-30062010><FONT face=Arial 
color=#0000ff size=2>With kind regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=914094913-30062010><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=914094913-30062010><FONT face=Arial 
color=#0000ff size=2>Mike</FONT></SPAN></DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> rules-dev-bounces@lists.jboss.org 
  [mailto:rules-dev-bounces@lists.jboss.org] <B>On Behalf Of </B>Sanjib 
  Karmakar<BR><B>Sent:</B> 30 June 2010 13:39<BR><B>To:</B> Rules Dev 
  List<BR><B>Cc:</B> Rules Dev List; 
  rules-dev-bounces@lists.jboss.org<BR><B>Subject:</B> Re: [rules-dev] Request 
  help for source code of accessing excel file using Drools 
  5.0<BR></FONT><BR></DIV>
  <DIV></DIV><BR><FONT face=sans-serif size=2>Hi </FONT><FONT face=sans-serif 
  size=1><B>Michael</B></FONT> <BR><BR><FONT face=sans-serif size=2>Thanks you 
  very much for your quick reply.</FONT> <BR><FONT face=sans-serif size=2>I am 
  sorry I could not understand the proper classification of the forum.</FONT> 
  <BR><FONT face=sans-serif size=2>I have already sent the request to the 
  drools-user forum.</FONT> <BR><BR><FONT face=sans-serif size=2>In fact what I 
  wanted to mean that - </FONT><BR><FONT face=sans-serif size=2>I am using the 
  'TeamAllocationExample.xls' - which is the default example I found searching 
  in net.</FONT> <BR><FONT face=sans-serif size=2>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 face=sans-serif 
  size=2>A code snippet could help me to go forward.</FONT> <BR><BR><FONT 
  face=sans-serif size=2>Thanks again for your time and cooperation.</FONT> 
  <BR><FONT face=sans-serif size=2><BR>Regards<BR>Sanjib Karmakar<BR>SkyTech 
  Solutions Pvt. Ltd</FONT> <BR><BR><BR>
  <TABLE width="100%">
    <TBODY>
    <TR vAlign=top>
      <TD width="40%"><FONT face=sans-serif size=1><B>"Anstis, Michael (M.)" 
        &lt;manstis1@ford.com&gt;</B> </FONT><BR><FONT face=sans-serif 
        size=1>Sent by: rules-dev-bounces@lists.jboss.org</FONT> 
        <P><FONT face=sans-serif size=1>06/30/2010 04:35 PM</FONT> 
        <TABLE border=1>
          <TBODY>
          <TR vAlign=top>
            <TD bgColor=white>
              <DIV align=center><FONT face=sans-serif size=1>Please respond 
              to<BR>Rules Dev List 
          &lt;rules-dev@lists.jboss.org&gt;</FONT></DIV></TR></TBODY></TABLE><BR></P>
      <TD width="59%">
        <TABLE width="100%">
          <TBODY>
          <TR vAlign=top>
            <TD>
              <DIV align=right><FONT face=sans-serif size=1>To</FONT></DIV>
            <TD><FONT face=sans-serif size=1>"Rules Dev List" 
              &lt;rules-dev@lists.jboss.org&gt;</FONT> 
          <TR vAlign=top>
            <TD>
              <DIV align=right><FONT face=sans-serif size=1>cc</FONT></DIV>
            <TD>
          <TR vAlign=top>
            <TD>
              <DIV align=right><FONT face=sans-serif size=1>Subject</FONT></DIV>
            <TD><FONT face=sans-serif size=1>Re: [rules-dev] Request help for 
              source code of accessing excel &nbsp; &nbsp; &nbsp; &nbsp;file 
              using Drools 5.0</FONT></TR></TBODY></TABLE><BR>
        <TABLE>
          <TBODY>
          <TR vAlign=top>
            <TD>
            <TD></TR></TBODY></TABLE><BR></TR></TBODY></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("Tables"); 
  <BR>kBuilder.add(ResourceFactory.newFileResource("TeamAllocationExample.xls"<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("Could not parse 
  knowledge.");<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></BLOCKQUOTE></BODY></HTML>