Lucene usages in Guvnor ( BRMS )
by Ashish Soni
Hi All ,
I see lucene jar in Guvnor but not sure where and how it is exactly used ,
Can some one please put some lights on it.
Regards,
Ashish
15 years, 9 months
Cost of queries
by David Cracauer
Hi All,
I'm wondering if anyone can tell me the relative performance impact of
queries. Is it just the cost of matching facts against them ( regular
caching rules apply etc.)?
Thanks,
Dave
15 years, 9 months
How can I query tasks created by MinaServer?
by Cristiano Gavião
Hi,
Im trying to query the human tasks that was created and persisted by
the MinaServer.
Looking at junit tests I could see that for that job I should use
MinaTaskClient.getTasksAssignedAsPotentialOwner("Darth Vader", "en-
UK", responseHandler) or other methods like this one;
In this case I should pass one responseHandler that implements
TaskSummaryResponseHandler.
In the source code I could see that exists
BlockingTaskSummaryResponseHandler class that implements
TaskSummaryResponseHandler.
Should I use this class or create one myself???
By the way, these class isn't on M5 JAR.... I think because Its not
located on the right path. It is on src/test folder instead of src/
main.....
thanks and best regards
____________________________________
Cristiano Gavião
15 years, 9 months
one question about asserting facts
by Senlin Liang
Hi all,
I am trying to assert (or insert) a large number of facts (or
DataClass objects) in to a session, what i am doing right now is to
insert them one by one as
---------------------
while (line != null) {
str = bufRead.readLine();
session.insert(new DataClass(line, str));
line = bufRead.readLine();
}
---------------------
My question: is there an efficient way to insert all facts at once, so
that it takes less time?
Thanks,
Senlin
15 years, 9 months
Java Bean dependency
by Sachin Mangal
Hi,
I want to use Drools as a part of a classification system which consist of
Machine Learning based classification (semi supervised) followed by an
expert system (rule based classification). The issue is that ML part and the
framework is in C++ and Drools supports Java. So, I will use some IPC
mechanism for sending data objects from framework to the rule system (I have
my own serialization and deserialization modules for that). I just want to
know that the object classes correspoding to DRLs need to be in some special
format or any format with getter and setter methods will do?
Thanks in advance,
Sachin Mangal
Member of Research Staff,
Guavus Network Systems Pvt Ltd
15 years, 9 months
Eclipse guvnor plugin issue
by Steven Williams
Hi all,
I am using the snapshot version of the eclipse plugin from Feb 5. When I
attempt to drag a file from the repository explorer into the Navigator view
I get the following exception:
java.lang.Exception: Could not create directory C:\Documents and
Settings\Administrator\workspace\.metadata\.plugins\org.guvnor.tools\623d8213:11f48a3ddff:-7fff
at org.guvnor.tools.views.RepositoryView.prepareFileTransfer(Unknown
Source)
at org.guvnor.tools.views.RepositoryView.access$1(Unknown Source)
at org.guvnor.tools.views.RepositoryView$2.dragSetData(Unknown Source)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:54)
...
I am using Windows and can drag the file from a mapped webdav directory on
my computer. I think the problem is that the filename contains the invalid
character :
Should I raise a bug?
thanks
Steve
15 years, 9 months
Need help to pass Decision Table (XLS file) into RuleBase in Drools version 4.0.7
by Hong-Qiang Gao
Hi All,
In Drools version 2.1, I can pass the Decision Table (XLS file) into
RuleBase and it works great;
...
file = new File(dir, XLS _filename);
InputStream stream = null;
RuleBase ruleBase = null;
WorkingMemory wm = null;
try {
stream = new FileInputStream(file);
} catch{...
}
try{
ruleBase = DecisionTableLoader.loadFromInputStream(stream);
wm = ruleBase.newWorkingMemory();
} catch{ ...
}
return wm;
.
In Drool version 4.0.7, I tried to pass the Decision Table (XLS file) into
RuleBase in the following way and it is not worked yet, though I used the
same XLS file;
.
file = new File(dir, XLS _filename);
InputStream stream = null;
RuleBase ruleBase = null;
WorkingMemory wm = null;
try {
stream = new FileInputStream(file);
} catch{...
}
try{
ruleBase = RuleBaseFactory.newRuleBase();
PackageBuilder builder = new PackageBuilder();
SpreadsheetCompiler sCompiler = new SpreadsheetCompiler();
String drl = sCompiler.compile(stream, InputType.XLS);
builder.addPackageFromDrl(new StringReader(drl));
ruleBase.addPackage(builder.getPackage());
wm = ruleBase.newStatefulSession();
} catch{ ...
}
return wm;
.
Is above coding a correct way to pass Decision Table (XLS file) into
RuleBase in Drools version 4.0.7?
Are following exceptions related to the org.drools.decisiontable.model
changes (V2.1 Parameter, Ruleset, Variable vs V4.0.7 DRLOutput, Global,
Package)?
Above coding using v4.0.7 complains as following;
java.lang.NullPointerException
at jxl.biff.drawing.Drawing.initialize(Drawing.java:249)
at jxl.biff.drawing.Drawing.<init>(Drawing.java:157)
at jxl.read.biff.SheetReader.read(SheetReader.java:737)
at jxl.read.biff.SheetImpl.readSheet(SheetImpl.java:620)
at jxl.read.biff.WorkbookParser.getSheet(WorkbookParser.java:230)
at
org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:7
9)
at
org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.jav
a:89)
at
org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.jav
a:68)
...
java.lang.IllegalArgumentException: Invalid rule table header cell. Should
be in the format of 'RuleTable YourRuleName'. It was: RuleTable
(ControlledVocab vocab)]
at
org.drools.decisiontable.parser.RuleSheetParserUtil.invalidRuleTableDef(Rule
SheetParserUtil.java:47)
at
org.drools.decisiontable.parser.RuleSheetParserUtil.getRuleName(RuleSheetPar
serUtil.java:41)
at
org.drools.decisiontable.parser.DefaultRuleSheetListener.initRuleTable(Defau
ltRuleSheetListener.java:256)
at
org.drools.decisiontable.parser.DefaultRuleSheetListener.processNonRuleCell(
DefaultRuleSheetListener.java:307)
at
org.drools.decisiontable.parser.DefaultRuleSheetListener.newCell(DefaultRule
SheetListener.java:232)
at
org.drools.decisiontable.parser.xls.ExcelParser.newCell(ExcelParser.java:184
)
at
org.drools.decisiontable.parser.xls.ExcelParser.processSheet(ExcelParser.jav
a:122)
at
org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:8
0)
at
org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.jav
a:89)
at
org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.jav
a:68)
...
Thanks, Hong
15 years, 9 months
drools-solver results question
by Andrew Waterman
Hello,
I'm starting to work with the drools-solver to help on a gaming
project. Basically, we have a game that works in two modes: 1) a
competitive game where humans (or agents) compete with one another on
a well defined game board to achieve 24 points by using three (or
four) agricultural development tokens. 2. A puzzle, where all 4
players work cooperatively to create an equitable solution, where all
4 players win with at least 24 points by means of our agricultural
development tokens.
I am starting to work with drools-solver to address the puzzle part of
our game. Basically, we are interested in having the solver do two
things for us: a) find the optimal solution for our game/puzzle,
based upon our requirements [this part seems quite straightforward]
and b) getting the total number of solutions that satisfy our
constraints. We would like, as well, to be able to inspect these
other, sub-optimal, solutions, in order to explore our game and puzzle
further. From my reading of the "Solver" API , it looks like we will
only be able to get the optimal solution. Does anyone have any
suggestions for a workaround in this case? Or is there some
functionality in the solver that I am missing?
I look forward to your feedback.
best wishes,
Andrew
---------------------------------
Andrew Waterman
San Cristóbal de las Casas, Chiapas, Mexico
15 years, 9 months
How to pass Decision Table (XLS file) into RuleBase in Drools version 4.0.7?
by Hong-Qiang Gao
Hi All,
Is this a correct way to pass Decision Table (XLS file) into RuleBase in
Drools version 4.0.7?
Are the exceptions related to the org.drools.decisiontable.model changes
(V2.1 Parameter
<file:///D:\Drools\2.1Drools\drools-2.1\docs\apidocs\org\drools\decisiontabl
e\model\Parameter.html> , Ruleset
<file:///D:\Drools\2.1Drools\drools-2.1\docs\apidocs\org\drools\decisiontabl
e\model\Ruleset.html> , Variable
<file:///D:\Drools\2.1Drools\drools-2.1\docs\apidocs\org\drools\decisiontabl
e\model\Variable.html> vs V4.0.7 DRLOutput
<file:///D:\Drools\documentation\apidocs\org\drools\decisiontable\model\DRLO
utput.html> , Global
<file:///D:\Drools\documentation\apidocs\org\drools\decisiontable\model\Glob
al.html> , Package
<file:///D:\Drools\documentation\apidocs\org\drools\decisiontable\model\Pack
age.html> )?
In Drools version 2.1, I can pass the Decision Table (XLS file) into
RuleBase and it works great;
...
file = new File(dir, XLS _filename);
InputStream stream = null;
RuleBase ruleBase = null;
WorkingMemory wm = null;
try {
stream = new FileInputStream(file);
} catch{...
}
try{
ruleBase = DecisionTableLoader.loadFromInputStream(stream);
wm = ruleBase.newWorkingMemory();
} catch{ ...
}
return wm;
.
In Drool version 4.0.7, I tried to pass the Decision Table (XLS file) into
RuleBase in the following way and it is not worked yet, though I used the
same XLS file;
.
file = new File(dir, XLS _filename);
InputStream stream = null;
RuleBase ruleBase = null;
WorkingMemory wm = null;
try {
stream = new FileInputStream(file);
} catch{...
}
try{
ruleBase = RuleBaseFactory.newRuleBase();
PackageBuilder builder = new PackageBuilder();
SpreadsheetCompiler sCompiler = new SpreadsheetCompiler();
String drl = sCompiler.compile(stream, InputType.XLS);
builder.addPackageFromDrl(new StringReader(drl));
ruleBase.addPackage(builder.getPackage());
wm = ruleBase.newStatefulSession();
} catch{ ...
}
return wm;
.
It complains as following;
java.lang.NullPointerException
at jxl.biff.drawing.Drawing.initialize(Drawing.java:249)
at jxl.biff.drawing.Drawing.<init>(Drawing.java:157)
at jxl.read.biff.SheetReader.read(SheetReader.java:737)
at jxl.read.biff.SheetImpl.readSheet(SheetImpl.java:620)
at jxl.read.biff.WorkbookParser.getSheet(WorkbookParser.java:230)
at
org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:7
9)
at
org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.jav
a:89)
at
org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.jav
a:68)
...
java.lang.IllegalArgumentException: Invalid rule table header cell. Should
be in the format of 'RuleTable YourRuleName'. It was: RuleTable
(ControlledVocab vocab)]
at
org.drools.decisiontable.parser.RuleSheetParserUtil.invalidRuleTableDef(Rule
SheetParserUtil.java:47)
at
org.drools.decisiontable.parser.RuleSheetParserUtil.getRuleName(RuleSheetPar
serUtil.java:41)
at
org.drools.decisiontable.parser.DefaultRuleSheetListener.initRuleTable(Defau
ltRuleSheetListener.java:256)
at
org.drools.decisiontable.parser.DefaultRuleSheetListener.processNonRuleCell(
DefaultRuleSheetListener.java:307)
at
org.drools.decisiontable.parser.DefaultRuleSheetListener.newCell(DefaultRule
SheetListener.java:232)
at
org.drools.decisiontable.parser.xls.ExcelParser.newCell(ExcelParser.java:184
)
at
org.drools.decisiontable.parser.xls.ExcelParser.processSheet(ExcelParser.jav
a:122)
at
org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:8
0)
at
org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.jav
a:89)
at
org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.jav
a:68)
...
Thanks, Hong
15 years, 9 months