drools working memory backed by cache
by Apache Zoom
Is there a project out there which can use drools working
memory using hibernate 2nd level cache ( i.e. if the objects in working
memory get too old they get put in a cache )
A second related question is it would be nice if it could be done through hibernate using hibernate 2nd level cache ?
14 years, 1 month
How to even out n buckets in Drools Planner?
by aitchnyu
I have n buckets and mn entities. Each bucket must have m entities. Each
entity carries a weight. My objective is to even out the total weight per
bucket, make them close to the average.
For example, a solution like this is skewed, see their sums.
bucket 1: 1,2,4,5=12
bucket 2: 6,8,9,6=29
bucket 3: 7,7,4,7=25
The same entities may be placed into buckets like this. This is more
desirable as the sums are closer to the mean (and each other); one does not
dominate the others.
bucket 1: 1,8,7,4=20
bucket 2: 6,2,9,6=23
bucket 3: 7,7,5,4=23
*Question:*How do I write a rule for this:
for each bucket, penalize (with soft scores) a bucket whose total
entity.weight differs from the average total entity.weight of the buckets.
Will I get the same results when I penalize each bucket for differing with
*each other*?
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-even-out-n-buckets-in-Drools-Pla...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 1 month
Where are JPA variablepersisters, in Drools 5.3?
by dunnlow
Using Drools 5.3, I'm trying to set up a statefull knowledgesession that
persists out to a database. With all of the examples on nabble and the
documentation (Example 2.10. JPA configuration for StatefulKnowledgeSessions
http://docs.jboss.org/drools/release/5.3.0.Final/droolsjbpm-introduction-...)
seems like it should be straight forward enough.
However, in all of those examples, variablepersisters are configured that
are in the package org.drools.persistence.processinstance.persisters (like:
<drools:persister for-class="javax.persistence.Entity"
implementation="org.drools.persistence.processinstance.persisters.JPAVariablePersister"
I can't find that package anywhere in Drools 5.3 (or JBPM 5.2). Can someone
PLEASE suggest where to find those classes/packages?
Is the documentation (above) incorrect/outdated? If so, can someone point
me to a working example of JPA transactions configured via Spring.
Thanks very much!
-J
--
View this message in context: http://drools.46999.n3.nabble.com/Where-are-JPA-variablepersisters-in-Dro...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 1 month
memory leak in Guvnor 5.3 when rules have incorrect regular expressions ?
by vadlam
we have hundreds of rules created in Guvnor 5.3..Final.
some of them use regular expressions when using the matches operator.
when business users enter an incorrect regular expression and rules are
built in guvnor subsequently, we have noticed heap consumption grow quite a
bit and not released subsequenlty.
currently, on a windows server that has approximately 1.3 GB heap available,
running 1 or builds consumes the whole memory and eventually crashes the
server.
The following is from one such log trace
[Near : {... **HST ....}]
^
[Line: 1, Column: 3]
[Error: Missing left node]
[Near : {... **HST ....}]
^
[Line: 1, Column: 3]
at
org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:293)
at
org.mvel2.compiler.ExpressionCompiler.compile(ExpressionCompiler.java:62)
at
org.drools.rule.builder.PatternBuilder.setInputs(PatternBuilder.java:903)
at
org.drools.rule.builder.PatternBuilder.buildRelationalExpression(PatternBuilder.java:599)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:540)
at
org.drools.rule.builder.PatternBuilder.processConstraintsAndBinds(PatternBuilder.java:398)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:314)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:131)
at
org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:65)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:2289)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:807)
at
org.drools.guvnor.server.contenthandler.GuidedDTContentHandler.compile(GuidedDTContentHandler.java:63)
at
org.drools.guvnor.server.builder.PackageAssembler.loadAllButDRLAssets(PackageAssembler.java:83)
at
org.drools.guvnor.server.builder.PackageAssembler.loadAssets(PackageAssembler.java:73)
at
org.drools.guvnor.server.builder.PackageAssembler.buildPackage(PackageAssembler.java:65)
at
org.drools.guvnor.server.builder.PackageAssembler.compile(PackageAssembler.java:55)
at
org.drools.guvnor.server.RepositoryPackageOperations.buildPackage(RepositoryPackageOperations.java:506)
at
org.drools.guvnor.server.RepositoryPackageOperations.buildPackage(RepositoryPackageOperations.java:475)
at
org.drools.guvnor.server.RepositoryPackageService.buildPackage(RepositoryPackageService.java:314)
Any thoughts or suggestions around these memory leak issues?
--
View this message in context: http://drools.46999.n3.nabble.com/memory-leak-in-Guvnor-5-3-when-rules-ha...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 1 month
Doubt over Agenda-Group
by swaroop
Hi,
Iam invoking a template from a rule using agenda-group setfocus. My doubt is
,after focusing and executing the template based on the agenda-group where
will the rule control fall back to.
Eg:
Rule 1
ruleflow-group "RF1"
WHEN
c : someFact(someCond)
THEN
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("AG1").setFocus();
Do something1
Do Something2 based on some actions set in template invoked through
agenda-group
END
Rule 2
ruleflow-group "RF1"
WHEN
c : someFact(someCond1-->someCond1 is based on the parameters set in
template called in prev rule)
THEN
Do Something3
END
What should be the flow of events after rule 1 execution ?
Thanks
Swaroop
--
View this message in context: http://drools.46999.n3.nabble.com/Doubt-over-Agenda-Group-tp3712866p37128...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 1 month
Contributing to Drools?
by Stephen Masters
Hi folks,
As with Mark's response on OSGI this morning, there have been a number of answers to questions on this list that mention that components are either not currently being worked on, or which request that users contribute new features or patches.
It tends not to be that easy to get to grips with a large open source project, so recently the London Java Community organised an OpenJDK hack session (http://www.meetup.com/Londonjavacommunity/events/49243872/) where they were helping people to build the projects and working on some 'low-hanging-fruit' issues. And apparently the session produced around 20 patches, which seems pretty impressive to me given that it was just a 3-hour evening session.
There seems to be a reasonable number of Drools developers and users in or near London, although I'm not sure about other locations. So I was wondering how feasible it might be to organise something similar around Drools. Obviously it would need a combination of some core developers prepared to spend some of their time helping folks such as myself get to grips with building and testing things, and enough developers interested in spending their spare time learning their way around the internals of the various Drools components. The London JBoss User Group set up a JBoss AS7 hackathon last year, so perhaps there might be someone there who would be prepared to help out?
Any thoughts?
Steve
14 years, 1 month