Starting Guvnor in Eclipse
by Justin Case
Hi all,
any Eclipse users around here?
I have followed the instructions here:
https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/blob/master/READ...
for Eclipse Helios+EGit+m2eclipse.
I downloaded 5.2.0.Final from https://github.com/droolsjbpm/guvnor.git, imported
all Maven projects it could find in the directory (except guvnor-docs which
misses something and I didn't care).
The Guvnor application will start in development mode, but:
- Firefox is causing often 100% CPU with it (might be the development mode)
- Eclipse Development Mode view shows LOTS of errors like this:
[ERROR] [org.drools.guvnor.Guvnor] - Errors in
'file:/C:/PocDev/GitHome/git/guvnor/droolsjbpm-ide-common/src/test/java/org/drools/ide/common/client/modeldriven/SuggestionCompletionEngineTest.java'
[ERROR] [org.drools.guvnor.Guvnor] - Line 47: No source code is
available for type
org.drools.ide.common.server.rules.SuggestionCompletionLoader; did you forget to
inherit a required module?
[ERROR] [org.drools.guvnor.Guvnor] - Line 49: No source code is
available for type java.util.jar.JarInputStream; did you forget to inherit a
required module?
Again, one can work also like this but seeing hundreds of errors is not helping
at all when I try to tinker with something somewhere. Plus there's the 100% CPU
thing... where and what should I inherit more than Maven is configured already
to inherit?
Tinkering around:
- I set all other projects as dependencies
- I set to export all sources from all projects (but there it bitches also about
missing java.util sources, who cares about these?)...
- added all these sources to the run configuration
nothing changed, I still have the above errors from both system libraries AND
project dependencies.
Or do I experience the problem mentioned in this message?
http://markmail.org/message/h52xvo4j52msambe#query:+page:1+mid:lg4mlgiof4...
Thanks for any hints,
JC
14 years, 8 months
AgendaGroup and AgendaFilter
by Saleem Lakhani
Hi,
Previous Code from drools 3.x:
Below is an example of overridden method in a class that implemented
org.drools.spi.AgendaFilter
public boolean accept(Activation activation) {
boolean evaluateRule = false;
String agendaGroup = activation.getRule().getAgendaGroup();
if (functionalArea.equalsIgnoreCase(agendaGroup) {
evaluateRule = true;
}
return evaluateRule;
}
Drools 5.x
Now I have changed the implementation to
org.drools.runtime.rule.AgendaFilter
How do I re-write the bold-italic line inside the method when variable
activation is now an instance of org.drools.runtime.rule.Activation;
It doesn't support activation.getRule().getAgendaGroup();
Thanks,
saleem
14 years, 8 months
Fact Types and Processes not found in package after upgrading Guvnor / Drools to 5.2.0.Final and JBPM to 5.1.0.Final
by robert.atherton
The project I am working on is using JBPM 5.1.0.M1 and Guvnor / Drools
5.2.0.M2. We are using guvnor to house our business rules, fact types, and
business processes, and pull those down to our application using a knowledge
agent. When using the versions mentioned above everything works fine, but
once I upgrade JBPM to 5.1.0.Final and Guvnor / Drools to 5.2.0.Final, my
application is no longer able to find my fact type or processes that are in
the package.
After I upgrade Guvnor to 5.2.0.Final and rebuild all of my packages, which
work fine, and if I manually download the package and open it in notepad, I
can see the process and fact type names in the package, but as I mentioned
when I load the package through the knowledge agent, my processes and fact
types are not available to me.
Thanks in advance for any help that is provided.
--
View this message in context: http://drools.46999.n3.nabble.com/Fact-Types-and-Processes-not-found-in-p...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
Class not found Exception dynamically loadind DRLs
by ukriegel
Hi there,
we try to load small rule packages containing java classes to be provided as
globals and drl-definitions from a webserver using an URLClassloader. the
"globals"classes could be read and their tests are ok, but as soon as a
drl-file is loded which references souch a dynamically loaded "globals2
class, a class no found-Exception is fired.
That could be expaned with the differenz class loaders used - the
URLClassloader for loading the "globals"-Classes and the standard class
loader used to load the drl-files via kbuilder.add(
resourceFactory.newUrlResource(url), ResourceType.DRL);
Is there any solution for this problem.
Thanks in advance
--Ulrich
--
View this message in context: http://drools.46999.n3.nabble.com/Class-not-found-Exception-dynamically-l...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
rule evaluation during insert
by Neelesh Deo Dani
Hi,I'm using drools expert. When I insert the User object again in the session, after modifying the member variable 'trades' (details mentioned below) the rule doesn't get evaluated. It evaluate the rules only during the 1st insert. Is there a way to trigger the rule evaluation after every insert of the same object (when state is modified)?
I've following declaration and rule.------------declare User
@timestamp(datetime)
name : String
trades: Integer
end
rule "Trades"
when
$u:User(trades >= 3)
then
System.out.println("Trades > 3 for "+ $u.getName());
end ----------Following is the piece of code:
StatefulKnowledgeSession session = s.kbase.newStatefulKnowledgeSession();String[] names = new String[]{"bob", "sam", "john"};FactType userType = s.kbase.getFactType("com.sample", "User" );
Map<String, Object> name2user = new HashMap<String, Object>();
for( String name: names ){
Object u = userType.newInstance();
userType.set(u, "name", name);
name2user.put(name, u);
}
userType.set(name2user.get("bob"), "trades", 1);session.insert(name2user.get("bob"));session.fireAllRules();
userType.set(name2user.get("bob"), "trades", 3);session.insert(name2user.get("bob"));// this insert doesn't evaluate the rule and hence the // condition $u:User(trades >= 3) is not checked
session.fireAllRules();
Thanks & Regards,Neelesh
14 years, 8 months
Activation group and list of contained objects
by Wishing Carebear
Hi,
I have an employee object that contains list of Address.Activation group is
defined on the Address rules. The Address list contains 4 address and 3 of
them satisfies the Rule1. But all the rules are defined in the same
activation group.
Observe that only one Address element executes the first rule. Is the
expected bahvior of Activation group?
Thanks for your time,
14 years, 9 months
One rule calling another rule
by Roger Smith
I am involved in a project in which one rule needs to call another re-usable
rule. Have anyone had experience using Drools to support such cascaded
rules? If yes, any pointers as to how to do it?
Roger
14 years, 9 months