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.
13 years, 4 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.
13 years, 4 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
13 years, 4 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,
13 years, 4 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
13 years, 4 months
Nested objects
by Amin Mohammed-Coleman
Hello there
I have the following object model
ClassA
String name
ClassB classB
ClassB
String status
String context
Before upgrading drools 5.2.0.Final I had the following rule:
when
ClassA ( classB.status =='Open' && name =='Hello' && classB.context='jump')
then
System.out.println("Hit rule");
end
However after upgrading to 5.2.0 the above rule does not get fired, instead I have to do the following:
when
ClassA ( name =='Hello' && classB.status =='Open' && classB.context='jump')
then
System.out.println("Hit rule");
end
or
when
ClassA ( classB.status =='Open' && classB.context='jump' && name=='Hello')
then
System.out.println("Hit rule");
end
Has there been a change causing the original rule not to work? Or should the approach always be to use
when
ClassA ( name =='Hello' && classB.status =='Open' && classB.context='jump')
then
System.out.println("Hit rule");
end
or
when
ClassA ( classB.status =='Open' && classB.context='jump' && name=='Hello')
then
System.out.println("Hit rule");
end
Any help would be appreciated
Thanks
Amin
13 years, 4 months
FireAllRules and threads
by echirulli
Hi there,
I've got a question regarding statefull session and threads.
I searched a lot about this topic but I'm still a bit confused so...
When a StatefullSession - fireAllRules() returns, can I be sure that the
entire rules processing has ended?
I red something about the fact that this is true unless rules inference
happens, is it correct?
My simple purpose is to insert a fact into a statefullsession working
memory, fire rules, wait until the end of rules processing and than retract
that fact.
How can i do it?
Thank you
Errico
--
View this message in context: http://drools.46999.n3.nabble.com/FireAllRules-and-threads-tp3151572p3151...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 4 months