Hello,
I have a little piece of code I wrote to evaluate a simple fact type. The
code is basically this:
RuleAgent agent = RuleAgent.newRuleAgent("/test-config.properties");
RuleBase rb = agent.getRuleBase();
FactType testFact = rb.getFactType("testPackage.testFact");
Object factObj = testFact.newInstance();
testFact.set(factObj, "property", "value");
StatelessSessionResult rs = rb.newStatelessSession().executeWithResults(new
Object[] {factObj});
for (Iterator i = rs.iterateObjects(); i.hasNext();) {
//... retrieve results
}
This code works fine, but Eclipse highlights almost all of it with the
following warning message:
"Discouraged access: The method newRuleAgent(String) from the type RuleAgent
is not accessible due to restriction on required library
drools-core-5.0.1.jar"
The same warning is issued for many objects/methods in this code.
This only happens when I right-click my project and "Convert to Drools
Project", and all Drools dependencies (almost 80!!) are added to the
project. If I manually add only drools-api-5.0.1.jar, drools-core-5.0.1 and
mvel2-2.0.10.jar, no warnings are displayed.
So the questions are: is there something wrong with this code? Am I using
some restricted part of the API? Is it a problem with "Convert to Drools
Project"?
Any comments will be most welcome.
Best regards,
Andre
--
View this message in context:
http://www.nabble.com/%22Discouraged-access%22-warnings-when-using-Drools...
Sent from the drools - user mailing list archive at
Nabble.com.