Error Loading multiple input files
by Mahalakshmi
Hi,
I have 3 separate text files with my input data. I need to load all the
input files data to my working memory and then fire the rules on this data.
I am able to work with just 1 input file. But when I try to add multiple
files - which I tried by adding an array of input files - my program
terminates giving me a FileNotFoundException.
Same problem occurs if I try to add an multiple .drl files ( different rule
files).
Can you guys please help me. Not understanding how to solve this error.
Also, how can I add my modified data to a new file. My new file gets created
and the rules which are fired do modify my data as required ( printed it on
the console)
But how do I store this information back to my working memory and print it
out to my output file.
All my input files have only 1 field in common otherwise are not related.
Is it a better option to have all data in only 1 input file??
Thanks you.
-M
14 years, 5 months
RuleAgent in webservice
by shekharputtur puttur
Hi All,
I am using drools API, and developed a webservice out of it.
I created rule binary package using BRMS Guvnor.
I used RuleAgent to acces the properties file.
ie RuleAgent agent = RuleAgent.newRuleAgent("/
application.properties");
"application.properties" file was stored in current working directory.
I executed my application using eclipse, it was fine .
For testing purpose i deployed the application in tomcat application
server.
Now it is unable to find "application.properties" file. and shows following
in "catalina.out" file:
java.lang.NullPointerException
at java.util.Properties$LineReader.readLine(Properties.java:418)
at java.util.Properties.load0(Properties.java:337)
at java.util.Properties.load(Properties.java:325)
at org.drools.agent.RuleAgent.loadFromProperties(RuleAgent.java:299)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:256)
My question is, in which location should i keep the "application.properties"
file , so that RuleAgent can access it.
Could you please tell me the solution.
Thanks & Regards
Shekhar
14 years, 5 months
Feediing events into Drools Fusion
by djerir smail
Hi ,
I am reading about how to put events in and out from Drools fusion , I
have found pipeline as a solution for input events but is it possible
to use pipeline also for output events ? and is there any other
solutions to connect Drools fusion to other event sources ?
Please Help
Smail
14 years, 5 months
Boolean logic fail?
by Matthew Runo
Hello folks -
We noticed something weird today, and was hopeing that someone here might be able to explain it for us a bit.. Here's the rule we had:
eval( -1 < 0 or
8 > 1 or
182 < 0 or
0 == 0);
This was failing, but doesn't it seem like it should work? To get it to work, we tried this:
eval( (-1 < 0) or
(8 > 1) or
(182 < 0) or
(0 == 0));
... but that didn't compile. We then tried this (and it worked!):
eval( (-1 < 0) ||
(8 > 1) ||
(182 < 0) ||
(0 == 0));
So, my question is simply - why? What's the difference between "or" and || - and when should we use them?
Thanks for your time!
Matthew Runo
Software Engineer, Zappos.com
mruno(a)zappos.com - 702-943-7833
14 years, 5 months
Sunday Morning, June 6th, 0600 GMT
by James C. Owen
Greetings:
I know, I know - this is NOT about rules nor rulebased systems nor
anything like that. But, sometimes, we need to reach as many people
as possible who may or may not be interested in what we need to say
and please forgive me for this minor indiscretion. (But, I'll
probably do it again in December)
OK, what’s so special about June 6th? Next Sunday morning at 0600 GMT
- NOT Daylight Savings Time - will mark the 66th year since the
invasion of Europe by the Allied forces at Normandy, France, on June
6, 1944. Remember, the war in England and the rest of Europe had been
going on since September, 1939, when this happened.
Unless you are over 40 (or had a father figure in the military) you
probably don’t know about Normandy and D-Day. I asked 10 or 15 people
at Best Buy the other night and got all blank looks except for one
future-Marine (just enlisted) who knew it had something to do with a
war or a battle or something like that. Look up “D-Day Normandy” on
Google. Or, better yet, go watch “Saving Private Ryan” [there is a
brief blurb is on YouTube at http://www.youtube.com/watch?v=qrjNEReJI2Q&feature=related
] or "The Longest Day” (terrible acting but far more vivid than
anything up until that time) [another brief blurb at http://www.youtube.com/watch?v=s-hzm6lkQPI&NR=1
] - the stuff on YouTube or watching the movie will give you a WAY
more graphical and personal point of view than just reading about it
on the computer screen.
Regardless, having a “Monday in May” (that's what we did in the USA)
for all veterans of all wars doesn’t seem to cover the carnage of D-
Day and Omaha Beach. The U. S. Army Center for Military History
claims over 60,00 USA dead and wounded at Omaha Beach on that one
day. If the Germans could have had another six months to prepare, the
British and Canadians would not have walked ashore at Gold and Juno
beaches nor the other Americans at Utah and Sword beaches, although
the Allies at Utah beach did receive a pretty warm welcome. We can
also be thankful that Adolph totally ignored his Generals and kept the
15th Panzer division locked up at
Total dead (mostly dead – not much in the way of medical aid that day)
and wounded for the USA that day was over 135,000 US Army and
Marines. The UK (a much smaller nation) lost 65,000 of their finest
that day. the Germans lost 320,000 men (30K killed, 80K wounded, 210K
MIA) in the Heer or Wehrmacht regular army, not so much the Waffen SS
who were stationed elsewhere at the time. In addition, there were
12,000 civilian casualties killed or missing. All total: a number
that was over 500,000 humans died in one battle that one day. Please,
try to remember all of them on Sunday morning; USA, UK, Canadian,
French, Polish, Austrian, German, Russian, all of them.
SDG
jco
CoFounder DRG 2000
CoFounder ORF-2008/ORF-2009
http://www.DallasRulesGroup.org
http://www.OctoberRulesFest.org
http://www.RulesFest.org
14 years, 5 months
Re: [rules-users] rules-users Digest, Vol 42, Issue 139
by John Peterson
Checked my file and it was named selectors.properties (with the 's').
Apparently, I made a typo while typing in my issue. The file was there
from my installation (I didn't create it myself). I'm still having the
error, though.
------------------------------
Hi,
the file should be called
selectors.properties and not
selector.properties - I've just fixed that in the tutorial.
Thanks,
Jarek
John Peterson wrote:
> I?m working off of Jaros?aw Kijanowski?s blog post from 7/8/2009 on
> using Selectors:
>
>
_http://www.kijanowski.eu/index.php?site=articles&article=guvnor_selecto
rs&lang=en_
>
<http://www.kijanowski.eu/index.php?site=articles&article=guvnor_selecto
rs&lang=en>
>
> I?ve followed the instructions for a DRL selector, including adding a
> line to the selector.properties file as follows:
>
> onlyNonDraftRules=/NonDraft.drl
>
> Both the NonDraft.drl file and selector.properties file are here:
>
> <parent
>
directory>\jboss-4.2.3.GA\server\default\deploy\drools-guvnor.war\WEB-IN
F\classes
>
> My NonDraft.drl is as follows:
>
> package org.drools.guvnor.server.selector
>
> import org.drools.repository.AssetItem
>
> import org.drools.guvnor.server.selector.Allow
>
> rule 'non draft rules'
>
> dialect 'mvel'
>
> when
>
> AssetItem(stateDescription != "Draft")
>
> then
>
> insert(new Allow());
>
> end
>
> When I try to do a ?Build Package? in Guvnor, I get the following
error:
> ?Name: com.sample, Format: package, Message: The Selector named
> onlyNonDraftRules is not available?
>
> My package in Guvnor has a few rules, only one of which is not in
Draft
> status. Everything is built in Guvnor (including Facts - no code is
> written in Eclipse).
>
> Has anyone seen this error before and know how to correct it? I?m
using
> 5.0.1.
>
>
>
------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
End of rules-users Digest, Vol 42, Issue 139
********************************************
14 years, 5 months
Exception handling policy
by Gerret Hansper
Hello,
I have got a question about Exception handling policy in Drools 5.0.
My issue is a case where a client application triggered rule execution on the
server, which was throwing a ConsequenceException.
The client, not having drools libs in its classpath, then had a
ClassNotFoundException.
I would therefore want to catch the ConsequenceException on the server and throw
an Exception with its cause.
I am not sure however if ConsequenceException.getCause() would always yield a
non-drools Exception or if that might be another drools type.
Also, is it always a ConsequenceException that gets thrown from a session or can
there be other Exception types?
Thanks,
Gerret
14 years, 5 months
-Uploading modified output file
by Fnu Mahalakshmi
Hi,
I have data from a text file (consists of 2 columns : A and B with data respectively)which is read and stored into a Vector <Objects>.
I have multiple input files with 2 columns of data so used Vector<Objects>.
This collection of data is loaded to my rule runner which loads data in the rulebase and fires rules on that data.
1. how do I upload the modified data output into another text file? Should I reload it in a vector?
But whenever rule is fired and data is modified how can I store the modified data in another file? Because my input and output has different columns.
1. is using a vector a bad way?? Could I do it in any other better way?
2. how can I identify what my A and B columns are- to load the specific rule only?? As of now I am just reading its name and storing it.
Could I do it in a better way???
Please help!!
Thankyou.
M
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.
</STRONG></P><pre>
14 years, 5 months
Re: [rules-users] Object referencing error
by Fnu Mahalakshmi
Thank you guys so much for all the help!!! I am trying out what you suggested. :)
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Friday, June 04, 2010 7:48 AM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 43, Issue 18
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Using the ForEach component in RuleFlow (Darshan)
2. Re: forEach node Clarification (Darshan)
3. Re: Object Referencing Error (Esteban Aliverti)
----------------------------------------------------------------------
Message: 1
Date: Fri, 4 Jun 2010 03:30:46 -0700 (PDT)
From: Darshan <darshan.vartak(a)polaris.co.in>
Subject: [rules-users] Using the ForEach component in RuleFlow
To: rules-users(a)lists.jboss.org
Message-ID: <1275647446097-870012.post(a)n3.nabble.com>
Content-Type: text/plain; charset=us-ascii
I am trying to use ForEach component in the process flow. I need to call a
set of rules in loop. I have this subFlow created inside ForEach component.
The collection set in the working memory becomes available to the ForEach
component and infact even in subFlow the OnEntryAction and OnExitAction can
access the integerObject from the collection. But when it comes to executing
the rules, looks like the integerObject is not available to the rule and
none of the rules are executed. If I add a dummy rule without any condition
it does get executed but only once. Have anybody tried similar kind of
scenario. If yes please send me some example, as I am really stuch out here
trying to call rules in a loop.
I am attaching the souce code along with this post. Please have a look.
Here is how the ForEach flow looks like
http://drools-java-rules-engine.46999.n3.nabble.com/file/n870012/ForEachF...
Here is my SubFlow layout
http://drools-java-rules-engine.46999.n3.nabble.com/file/n870012/subProce...
Here is the output of Java Program
Setting numberList
Entry 1
Entry 2
Exit 1
Entry 3
Exit 2
Entry 4
Exit 3
Entry 5
Exit 4
Entry 6
Exit 5
Entry 7
Exit 6
Entry 8
Exit 7
Entry 9
Exit 8
Entry 10
Exit 9
Entry 11
Exit 10
Entry 12
Exit 11
Entry 13
Exit 12
Entry 14
Exit 13
Entry 15
Exit 14
Entry 16
Exit 15
Entry 17
Exit 16
Entry 18
Exit 17
Entry 19
Exit 18
Exit 19
Rules executed
testSubFlowForEach.rf looks like this
<?xml version="1.0" encoding="UTF-8"?>
<process xmlns="http://drools.org/drools-5.0/process"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/drools-5.0/process
drools-processes-5.0.xsd"
type="RuleFlow" name="testForEach" id="processForEach"
package-name="com.sample" >
<header>
<imports>
<import name="java.util.ArrayList" />
<import name="com.sample.IntegerObject" />
</imports>
<variables>
<variable name="numberList" >
<type
name="org.drools.process.core.datatype.impl.type.ObjectDataType"
className="java.util.ArrayList" />
</variable>
<variable name="integerObject" >
<type
name="org.drools.process.core.datatype.impl.type.ObjectDataType"
className="com.sample.IntegerObject" />
</variable>
</variables>
</header>
<nodes>
<start id="1" name="Start" x="224" y="15" width="80" height="40" />
<forEach id="2" name="processForEach" x="163" y="111" width="203"
height="268" variableName="integerObject" collectionExpression="numberList"
>
<nodes>
<subProcess id="13" name="SubProcess" x="55" y="110" width="80"
height="40" processId="testSubFlow" independent="false" >
<mapping type="in" from="integerObject" to="integerObject" />
<onEntry>
<action type="expression" dialect="java" >System.out.println("Entry
" + ((IntegerObject) integerObject).getIntVal());</action>
</onEntry>
<onExit>
<action type="expression" dialect="java" >System.out.println("Exit "
+ ((IntegerObject) integerObject).getIntVal());</action>
</onExit>
</subProcess>
</nodes>
<connections>
</connections>
<in-ports>
<in-port type="DROOLS_DEFAULT" nodeId="13"
nodeInType="DROOLS_DEFAULT" />
</in-ports>
<out-ports>
<out-port type="DROOLS_DEFAULT" nodeId="13"
nodeOutType="DROOLS_DEFAULT" />
</out-ports>
</forEach>
<end id="5" name="End" x="230" y="456" width="80" height="40" />
</nodes>
<connections>
<connection from="1" to="2" />
<connection from="2" to="5" />
</connections>
</process>
http://drools-java-rules-engine.46999.n3.nabble.com/file/n870012/testForE...
testForEach.zip
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Using-the-ForEach-com...
Sent from the Drools - User mailing list archive at Nabble.com.
------------------------------
Message: 2
Date: Fri, 4 Jun 2010 04:21:50 -0700 (PDT)
From: Darshan <darshan.vartak(a)polaris.co.in>
Subject: Re: [rules-users] forEach node Clarification
To: rules-users(a)lists.jboss.org
Message-ID: <1275650510581-870109.post(a)n3.nabble.com>
Content-Type: text/plain; charset=us-ascii
Hi Rajakanthan,
I am trying similar kind of thing and need help. I need to call a set of
rules in loop by passing a object fro0 a collection to the rules. Here are
more details about What I am trying to do. Please help.
http://drools-java-rules-engine.46999.n3.nabble.com/Using-the-ForEach-com...
Here is the code
http://drools-java-rules-engine.46999.n3.nabble.com/file/n870109/testForE...
testForEach.zip
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/forEach-node-Clarific...
Sent from the Drools - User mailing list archive at Nabble.com.
------------------------------
Message: 3
Date: Fri, 4 Jun 2010 08:47:29 -0300
From: Esteban Aliverti <esteban.aliverti(a)gmail.com>
Subject: Re: [rules-users] Object Referencing Error
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<AANLkTimIW7JDDsJauQJk6KraHSUKsiAbhfjrlq0zyUZu(a)mail.gmail.com>
Content-Type: text/plain; charset="windows-1252"
True, I forgot about the objectB field restriction.
2010/6/4 Swindells, Thomas <TSwindells(a)nds.com>
> In fact in your case you when condition doesn?t make any sense ? B will
> never equal the empty string as B isn?t a string.
>
> You probable want the following:
>
> rule ?foo?
>
> when
> $a :A(Type == "Prod" , objectB == null)
>
> then
> B bobject = new B();
>
> bobject.setType(?Prod?);
>
> bobject.setId($a.getNumber().getId());
>
> modify($a) {
>
> setObjectB(bobject);
>
> };
>
> end
>
>
>
> This rule only executes when objectB is null, this means you won?t get
> into the loop as once you have created objectB the rule won?t evaluate to
> true again.
>
>
>
> Thomas
>
>
>
> *From:* rules-users-bounces(a)lists.jboss.org [mailto:
> rules-users-bounces(a)lists.jboss.org] *On Behalf Of *Esteban Aliverti
> *Sent:* 03 June 2010 23:43
> *To:* Rules Users List
> *Subject:* Re: [rules-users] Object Referencing Error
>
>
>
> Yes, your rule entered in an infinite loop because when every time you
> insert/modify/retract a Fact, rules are reevaluated to check if the
> insertion/modification/retraction generates activations or not. In your
> case, your rule is being reevaluated every time you update your $a object,
> the evaluation ends firing the rule, and this starts an endless loop.
>
> If you only have this behavior with this rule, you can consider using the
> "no-loop" attribute. If your problem is multiple rules being re executed
> (and you don't wont that) you can use "lock-on-active" attribute. Try to
> read the documentation about these attributes for further information.
>
> It is very important for the people new in drools to understand the life
> cycle of a rule.
>
>
>
> Best,
>
> On Thu, Jun 3, 2010 at 7:33 PM, Fnu Mahalakshmi <FMahalakshmi(a)nyx.com>
> wrote:
>
> Hi,
>
> I tried what you said but program goes into an infinite loop.
> It does not break out of the when loop only.
> I did exactly as you mentioned.
> In the test information I put in a.type = "Prod"
> And a.bObject(new B());
> Any idea whats wrong??
>
> Thanks,
> M
>
> -----Original Message-----
> From: rules-users-bounces(a)lists.jboss.org [mailto:
> rules-users-bounces(a)lists.jboss.org] On Behalf Of
> rules-users-request(a)lists.jboss.org
> Sent: Thursday, June 03, 2010 4:52 PM
> To: rules-users(a)lists.jboss.org
> Subject: rules-users Digest, Vol 43, Issue 15
>
> Send rules-users mailing list submissions to
> rules-users(a)lists.jboss.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.jboss.org/mailman/listinfo/rules-users
> or, via email, send a message with subject or body 'help' to
> rules-users-request(a)lists.jboss.org
>
> You can reach the person managing the list at
> rules-users-owner(a)lists.jboss.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of rules-users digest..."
>
>
> Today's Topics:
>
> 1. Re: Object Referencing error: (Esteban Aliverti)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 3 Jun 2010 17:51:10 -0300
> From: Esteban Aliverti <esteban.aliverti(a)gmail.com>
> Subject: Re: [rules-users] Object Referencing error:
> To: Rules Users List <rules-users(a)lists.jboss.org>
> Message-ID:
> <AANLkTimeZIJ5VfMTBESLFJIWoc_4MEZSXbKMIXAvJRiC(a)mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> You can't modify bobject, becuase it doesn't exist inside the session. You
> just created it a few lines above. Maybe you need an insert() or maybe you
> need the bobject reference from the LHS. Something like this:
>
> *rule* "prod"
>
>
>
> *when*
>
> $a :A(Type == "Prod" , objectB != "")
>
> *then*
>
> B bobject = *new* B();
>
> $a.getObjectB().setType( "Prod" );
>
> $a.getObjectB().setId($a.getNumber().getId());
>
> *update*($a);
>
> * end*
>
> Note that you need to update $a and not B, because A is the inserted Fact
> in
> your session.
>
> Best,
>
>
> 2010/6/3 Fnu Mahalakshmi <FMahalakshmi(a)nyx.com>
>
> > Hi,
> >
> >
> >
> > I am getting the following error when I try to do complex object
> > referencing in drools:
> >
> > My class:
> >
> > A{
> >
> > String Type;
> >
> > B objectb;
> >
> > //getters and setters for above
> >
> > }
> >
> >
> >
> > My rules:
> >
> >
> >
> > *rule* "prod"
> >
> >
> >
> > *when*
> >
> > $a :A(Type == "Prod" , objectB != "")
> >
> > *then*
> >
> > B bobject = *new* B();
> >
> > bobject.setType( "Prod" );
> >
> > bobject.setId($a.getNumber().getId());
> >
> > *update*(bobject);
> >
> >
> >
> > *end*
> >
> > * *
> >
> > *I want to basically output a file which has updated values of B (type,
> > Id)
> >
> > *
> >
> > * *
> >
> > *Error:*
> >
> > *org.drools.spi.ConsequenceException*: *org.drools.FactException*: Update
> > error: handle not found for object: com.org.Ip@f42ad0. Is it in the
> > working memory?
> >
> > at
> > org.drools.base.DefaultConsequenceExceptionHandler.handleException(*
> > DefaultConsequenceExceptionHandler.java:13*)
> >
> > at org.drools.common.DefaultAgenda.fireActivation(*
> > DefaultAgenda.java:558*)
> >
> > at org.drools.common.DefaultAgenda.fireNextItem(*
> > DefaultAgenda.java:518*)
> >
> > at org.drools.common.AbstractWorkingMemory.fireAllRules(*
> > AbstractWorkingMemory.java:475*)
> >
> > at org.drools.common.AbstractWorkingMemory.fireAllRules(*
> > AbstractWorkingMemory.java:439*)
> >
> > at com.org.DroolsTest.main(*DroolsTest.java:30*)
> >
> > Caused by: *org.drools.FactException*: Update error: handle not found for
> > object: com.org.Ip@f42ad0. Is it in the working memory?
> >
> > at org.drools.base.DefaultKnowledgeHelper.update(*
> > DefaultKnowledgeHelper.java:100*)
> >
> > at com.org.Rule_Prod_Ip_0.consequence(*Rule_Prod_Ip_0.java:10*)
> >
> > at com.org.Rule_Prod_Ip_0ConsequenceInvoker.evaluate(*
> > Rule_Prod_Ip_0ConsequenceInvoker.java:22*)
> >
> > at org.drools.common.DefaultAgenda.fireActivation(*
> > DefaultAgenda.java:554*)
> >
> > ... 4 more
> >
> >
> >
> > Please help! I am very new to drools! Not able to figure out why this
> > error:
> >
> >
> >
> > I am using eclipse and working on Windows machine. Error above was
> > generated on eclipse console.
> >
> >
> >
> > Thank you.
> >
> >
> >
> > M
> >
> > ------------------------------
> >
> > *Please consider the environment before printing this email.*
> >
> > *Visit our website at http://www.nyse.com
> >
> *****************************************************************************
> >
> > Note: The information contained in this message and any attachment to it
> is
> > privileged, confidential and protected from disclosure. If the reader of
> > this message is not the intended recipient, or an employee or agent
> > responsible for delivering this message to the intended recipient, you
> are
> > hereby notified that any dissemination, distribution or copying of this
> > communication is strictly prohibited. If you have received this
> > communication in error, please notify the sender immediately by replying
> to
> > the message, and please delete it from your system. Thank you. NYSE
> > Euronext. *
> >
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users(a)lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
>
> --
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>
> Esteban Aliverti
>
14 years, 5 months
-Doubt using HSSFWorkbook and multiple inputs
by Fnu Mahalakshmi
Hi,
I have a real basic question about the working of drools.
I figured it to be this way:
We load our input data (our facts) - fire the rules on this data - get the modified out put in our output file.
Doubt:
I am reading all my input data from a text file.
1. How can I load all the data contained in my text file into the memory at the same time? Like we used HSSF workbook concept for the excel file?
And fire all the rules at the data at once.?
2. Again When I have multiple input files, Shouldn't I be loading all the input files in the memory and firing rules on them? How can I do that? I should have different test files for different input datasets?? (for example like the ExcelDataRulesTest.java file in the example)
I am still stuck with the procedural way of thinking- read lines and run rules and generate output.
Please help!!! I am really new to this and going round and round.
Thank you.
M
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.
</STRONG></P><pre>
14 years, 5 months