My problem is not knowing what directory it is actually scanning. If I put
anything in the property file except 'dir=/' then I get an invalid directory
error. It accepts this entry, tells me it found 34 files, none of which of
course is a rule file, and I can't even find a place on my machine that has
34 unique files in it. I am a little hobbled by Eclipse because it is
difficult sometimes to tell where the root of an RCP actually lives.
- Mike
dave sinclair wrote:
Mike,
For question #1, check out the Javadoc for RuleAgent. The class header
provides some decent documentation. As far as what it is reading, it takes
the path specified by dir and scans that directory.
dir = new File(d);
if (!(dir.isDirectory() && dir.exists())) {
throw new IllegalArgumentException("The directory " + d
+ "is not valid.");
}
scanner = new FileScanner();
scanner.setFiles( dir.listFiles() );
On Tue, Nov 25, 2008 at 8:58 AM, J Michael Dean <mdean77(a)comcast.net>
wrote:
> Two questions. I am interested in using RuleAgent but with the file or
> dir
> property rather than the URL. However, it is not clear to me where the
> directories or files must actually be located. If I use
>
> dir=/
>
> then the DirectoryScanner is invoked and claims to have found some number
> of files, but I have no idea WHERE it is scanning. If I add anything
> like
> dir=/foo then I get an invalid directory exception.
>
> If I try file=/foo.pkg then I get exception that this is invalid file.
>
> Question 1 - is there an example somewhere that can help me understand
> where I am going off the track? I am working Eclipse environment.
>
--
View this message in context:
http://www.nabble.com/RuleAgent-question-tp20681831p20693347.html
Sent from the drools - user mailing list archive at
Nabble.com.