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.
14 years, 4 months
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.
14 years, 4 months
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?
14 years, 4 months
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
14 years, 4 months
Decision table multiple sheets...
by Sumeet Karawal
Hi,
I am having my rules in a Decision Table (.xls)
There I have 3 sheets for rules.
Like in Sheet1 there are two Rule Tables... In Sheet2 there are 2 and in
Sheet3 there is only 1.
When I am creating the knowledgebase and firing rules, the rules that are
in the Sheet1 are getting fired. But the rules in other sheets are not
getting fired.
When I convert them to String to check using this code :
String str = DecisionTableFactory.loadFromInputStream
(ResourceFactory.newClassPathResource
("com/sample/MemberDiscountRules.xls").getInputStream(), dtconf);
System.out.println(str);
I can see the rules that are present in Sheet1 only.
Please anybody help me on this. How can I get the rules in other two sheets
to get fired.
Also how can we fire the rules of only a particular Rule table in the
decision table.
Thanks & Regards,
Sumeet
Mailto: sumeet.karawal(a)tcs.com
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
14 years, 4 months
Drools Planner Advise
by Raúl Raja Martínez
Hello everyone,
I'm looking for a Drools Planner consultant that can help review and advise on a application that we are building related to scheduling.
If anybody has drools planner experience and it's interested, please msg me at raul(a)47deg.com or reply to this email.
Thanks in advance,
--
Raúl Raja Martínez
http://47deg.com
14 years, 4 months
added features in Guvnor 5.4.0 Beta
by G S
Where I can see the added features of Guvnor 5.4.0 Beta?
I checked the documentation. 1.2 Features Outline, it seems same as 5.3.0 Final
14 years, 4 months
Running rules from the past
by Celso Junior
Hi folks,
I work at a bank and I am currently studying the best way to use JBoss
Rules so that it fits our needs. Our loan analysis process can take several
months depending on the type of the loan. Although our business rules can
evolve, a loan must follow the rules valid at the time the loan application
was made.
In order to attend this requirement I thought about storing at the database
the name of the current snapshot with the loan application data, so that it
will possible run this rules in the future without freezing my rule
database.
* Is there a better way to attend this requirement?
* How can I retrieve meta information from a snapshot, such as the date
when the snapshot was created?
Thanks in advance,
Celso
14 years, 4 months