Flow isn't behaving as I'd expect
by Jamie
I'm having some issues with the interaction between Flow, ruleflow-groups and
AgendaFilters. I've tried it with 5.1.1, 5.2.0 using .rf files and 5.2.0
using .bpmn files, all with the same results, so I'm sure I'm just
misunderstanding something.
I have a flow that looks like this:
http://drools.46999.n3.nabble.com/file/n3200994/fraud_analysis_flow.jpg
Rules 011 and 051 are in ruleflow-group customerAnalysis and rule 018 is in
ruleflow-group customerActivityFilterAndLookup. I added some debugging via
event listeners and if I don't use an agenda filter, I see the following
output:
Executing test Rule018TestCase001
Rules engine initialized
Invoking rules for rule name Rule 018 - Good AVS Buyer
Created activation for [Rule 018 - Good AVS Buyer]
Created activation for [Rule 011 - Bad Zip 9 Address]
Created activation for [Rule 051 - Suspicious Buyer Email]
Triggered node [Order Analysis]
Triggered node [Start Fraud Analysis Flow]
Triggered node [Customer Analysis]
About to fire [Rule 051 - Suspicious Buyer Email]
====> Rule 051 fired for order: 000000022
About to fire [Rule 011 - Bad Zip 9 Address]
====> Rule 011 fired for order: 000000022
Triggered node [Customer Activity Filter And Lookup]
About to fire [Rule 018 - Good AVS Buyer]
Created activation for [Rule 051 - Suspicious Buyer Email]
Created activation for [Rule 011 - Bad Zip 9 Address]
====> Rule 018 fired for order: 210105
Triggered node [Customer Activity Analysis]
Triggered node [Suspect Reason Code Review]
Triggered node [End Fraud Analysis Flow]
Rules executed successfully
The results are roughly what I'd expect, but I have some questions:
- Why do the activations get created for these 3 rules before any flows
have started?
- Why does the [Order Analysis] node get triggered before the [Start Fraud
Analysis Flow] node?
- Why are activations created again for 011 and 051 just prior to 018
firing?
If I introduce an AgendaFilter that only allows a rule with a specific name
to fire, things get stranger to me. If I only allow rule 018, I get the
following output:
Executing test Rule018TestCase001
Invoking rules for rule name Rule 018 - Good AVS Buyer
Created activation for [Rule 018 - Good AVS Buyer]
Created activation for [Rule 011 - Bad Zip 9 Address]
Created activation for [Rule 051 - Suspicious Buyer Email]
Triggered node [Order Analysis]
Triggered node [Start Fraud Analysis Flow]
Triggered node [Customer Analysis]
Rejecting firing of [Rule 051 - Suspicious Buyer Email] because name
doesn't match.
Cancelled activation for [Rule 051 - Suspicious Buyer Email] because FILTER
Rejecting firing of [Rule 011 - Bad Zip 9 Address] because name doesn't
match.
Cancelled activation for [Rule 011 - Bad Zip 9 Address] because FILTER
Rules executed successfully
Ruleflow customerActivityFilterAndLookup doesn't even get triggered, nor do
any nodes after that. Why not?
--
View this message in context: http://drools.46999.n3.nabble.com/Flow-isn-t-behaving-as-I-d-expect-tp320...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 12 months
OSGi version of Drools
by Flavius Vespasianus
Hello,
is there anywhere a OSGi bundle with Drools 4.0.7? I know about
com.springsource.org.drools.* but these had a lot of additional
dependencies and I wasn't able to get them work.
My problem is that I need to have three projects: one is the basic
library which uses Drools very intensively. The second project is editor
- an Eclipse plugin (that's why I need the OSGi bundle) using some
classes from the basic library. It doesn't use Drools, but there is a
dependency. The third project is classic Java application, also using
the basic library.
The basic library was originally created using standard Drools project
wizard (I have downloaded the Eclipse Drools plugin -
org.drools.eclipse). But when I tried to deploy it as an Eclipse plugin,
it couldn't find the Drools classes.
I found a little workaround - I have compiled the binaries (drools-core,
drools-compiler and from libs the mvel, antlr3 and eclipse-jdt-core)
into separate plugin using "Create a plugin from existing jars" wizard.
But if I add this dependency to the basic library, I get a
NullPointerException error on every dslr file and I cannot run the
application properly). At least the second project (editor) can be compiled.
What am I doing wrong? Or can I find somewhere the binaries compiled
correctly into OSGi bundle?
Thanks a lot!
Flavius
12 years, 12 months
Drools Expert 5 OSGi
by jflamy
I want to manage Drools Expert rules with Drools Guvnor. My understanding is
that requires the use of Drools Expert version 5.
I also need to use an OSGi-packaged version of Drools Expert.
I saw a forum posting in 2010 alluding to such a beast, but the springsource
forums only provide 4.0.7.
Is there a ready-made OSGi bundle for drools expert 5, or alternately
specific instructions for building one ?
Jean-François Lamy
--
View this message in context: http://n3.nabble.com/Drools-Expert-5-OSGi-tp681546p681546.html
Sent from the Drools - User mailing list archive at Nabble.com.
12 years, 12 months
Possible bug with isA operator
by Mike Melton
I am having trouble getting the isA operator to work with POJO facts.
The problem manifests in the IsAEvaluator.evaluate(...) method, line
163 (5.3.0.Final). This line checks whether the objectValue class is
annotated with @Traitable. For a @Traitable fact fully declared in
DRL, this line correctly evaluates to true. For a POJO fact which is
declared @Traitable in DRL, this line evaluates to false. (I tried
adding @Traitable to the POJO fact itself, which results in the line
evaluating true, but the next line which casts to a TraitableBean
fails.)
I have attached a test demonstrating the problem. There are two DRL
files, one which declares a fact entirely, and another which adds
@Traitable to a POJO fact. The declared fact and the POJO fact have
identical structure, and the rules are also otherwise identical.
However, the declared test passes, while the POJO test fails.
Is this a bug, or am I doing something horribly wrong? Thanks.
Mike
13 years
Drools 5 Memory Issues
by drools.user
We are planning on moving from Drools 3.0.5 to Drools 5.2.0. In Load Testing
of Drools 5.2, we faced some issues:
1. KnowledgeBaseImpl Object in Drools 5 is almost 50% bigger than
ReteooRuleBase Object of Drools 3.
2. The server heap memory usage keeps on increasing during Load Testing to
finally give OutOfMemory error and crash.
We are using StatefulKnowledgeSession and calling dispose() after
fireAllRules().
So, the questions we have are:
1. Looking at the heap snapshot, we noticed > 300,000 Objects for some of
Drools Classes (e.g. org.drools.reteoo.LeftTupleImpl) occupying > 25MB in
heap memory. Is that normal?
2. Is there any Memory Leak issues with Drools 5?
3. What is the advantage of using KnowledgeBase vs RuleBase? Is it fine to
use RuleBase in Drools 5?
4. We are using Drools 5.2. Has anything changed significantly in Drools
5.3? Will moving to that help in our memory issues?
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-Memory-Issues-tp3615095p361509...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years
Empty rule and event retention
by MarcoMojana
Hello everybody,
I'm using drools 5.3.0-final to process events in stream mode with a pseudo
clock. I have created an do-nothing rule as follows:
rule "Do nothing"
when
$m : Message( ) from entry-point fromDb
then
end
Then I add a big number of events:
Calendar timestamp = new GregorianCalendar(2011, Calendar.DECEMBER, 10, 12,
0, 0);
for(int i = 0;i < 100000;i++) {
Message message = new Message("test", timestamp.getTime());
advanceSessionClock(pseudoClock, message.getTimestamp());
fromDb.insert(message); // <---
ksession.fireAllRules(); // <---
timestamp.add(Calendar.HOUR_OF_DAY, 1);
}
At the loop exit the memory usage is about 600MB. Increasing the number of
events increases also the ram usage up to about 1.4GB, then it remains
constant. If I don't insert the messages (lines with the comments), but I
still instantiate them, at the exit of the loop, the program requires only
90MB.
With the given rule, it's not necessary to store the events, so in theory
the insert() should do nothing... however, when the events are inserted, it
seems that drools performs a lot of useless work and allocates a lot of
memory. The fact that the consumption tops at 1.4GB (a quantity much higher
than the 90MB used by the messages alone) tells us that at that point the gc
is triggered and that drools correctly releases the references.
It seems pointless to optimize the engine for this case, but this happens
also when the rules are used as "filters" between streams:
rule "Filter test messages"
when
$m : Message( message == "test" ) from entry-point fromDb
then
entryPoints["testMessages"].insert($m);
end
rule "Only test messages"
when
$m : Message( ) from entry-point testMessages
then
end
How can I decrease the memory footprint for these simple rules?
--
MM
--
View this message in context: http://drools.46999.n3.nabble.com/Empty-rule-and-event-retention-tp361677...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years
how to add jbpm-5.2.0 in Guvnor 5.4 Beta 1 (Jboss AS 7)
by G S
My Jbpmn is not working in Guvnor 5.4 Beta (in Jboss AS 7), I saw
"Download the jBPM Web Designer for Guvnor here"
Do I have to add this file in Jboss AS 7 or any where in Guvnor 5.4 Beta?
When I tried, it shows attache error.
13 years
Null Pointer Exception : org.mvel2.ast.Negation.getReducedValueAccelerated(PredicateConstraint.java:298)
by Ronald Albury
MVEL appeared to be null pointer protected when it evaluated our rules ...
at least until it got to a Boolean attribute. In every other instance when
an value is null Drools skips over the rule ... however, I get the null
pointer exception listed above when Drools goes to execute this rule and
the getOwn_eaIsProposedInsuredIndAsBoolean method returns null.
rule "EasyApp Owner Insert"
ruleflow-group "insert-group"
when
$ea : EasyApp(!getOwn_eaIsProposedInsuredIndAsBoolean())
then
insert($ea.getOwn_xmParty());
insert($ea.getOwn_xmAddress());
insert($ea.getOwn_xmRelation());
end
Can anyone provide me some guidance?
13 years
Drools 5.3 is not working in a OSGi tycho building
by Cristiano Gavião
I've tried unsuccessfully to upgrade my osgi application to jbpm 5.2 and
Drools 5.3. I'm using tycho and I got this error:
[ERROR] Missing requirement: org.drools.core 5.3.1.Final requires
'bundle org.drools.api 5.3.1.SNAPSHOT' but it could not be found
Its worth to say that with Jbpm 5.1 and Drools 5.2 everything is ok.
Looking at the org.drools.core pom's I could see that the problem seems
to be this:
<Require-Bundle>org.drools.api;visibility:=reexport;*bundle-version="${drools.osgi.version}"*</Require-Bundle>
*So ${drools.osgi.version} *is being resolved to 5.3.1.SNAPSHOT that is
not being resolved because .SNAPSHOT is not a valid OSGI word as the
.qualifier is.
regards
Cristiano
13 years