5.4.0.Beta2 parse error in consequence /* in string
by Benjamin Bennett
Just passing on I am using the drools 5.4.0Beta2
The following doesn't compile using the mvel dialect .
rule "some rule"
when
fact: Fact()
then
BasicFact fault= new BasicFact( "/*");
end
but
rule "some rule"
when
fact: Fact()
then
BasicFact fault= new BasicFact( "/ *");
end
does compile some how /* is being parsed as an expression I think and not a
string literal.
Thanks,
Ben
14 years
limits on number of rules in Guvnor in a package, loaded in knowledge base
by vadlam
are there are any benchmarks around number of rules that can be created in a
package in Guvnor?
we run Guvnor 5.3.0.final in Guvnor on a windows server that has 1.4 GB heap
and we are seeing memory issues when the package has reached around 900
rules or so.
by memory issues, I mean that after the package is built successfully,
memory is not being released back. this behaviour is more obvious at such
high number of rules in package than when we had just around 600 rules or
so.
also, when we try to load the package generated (around 6.4 MB) into the
knowledgesession, it crashes the system .
are there any recommendations on
1. whether we can split up a package into two separate packages, and load
the 2 of them separately one after the other into the session ?
2. amount of memory that guvnor needs to build such high number of rules ?
3. ways to shrink the number of rules as per some best practices while
still meeting requirements ?
--
View this message in context: http://drools.46999.n3.nabble.com/limits-on-number-of-rules-in-Guvnor-in-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years
Drools Guvnor 5.0.1 - Memory Usage Tuning
by tdakanalis
Hi,
We're using Drools Guvnor 5.0.1 in a production environment, running on
Tomcat 6. We're experiencing permgen issues, particularly when doing large
imports of rules, archiving, or compilation of rules.
Following permgen exceptions, we increased the permgen to :
-XX:MaxPermSize=2048M -ms3192M -mx3192M.
This sustained us for a while, but our assets are ever growing, and again
we're exceeding the permgen space allocated. Can someone recommend
appropriate settings/configuration in order to reduce the memory/cpu usage?
Assets in Guvnor:
~ 21K rules in 11 decision tables (.xls) in 1 package
Thanks,
Themistoklis Dakanalis
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Guvnor-5-0-1-Memory-Usage-Tuning...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years
Variable length sliding windows?
by Lauer, Will C
I'm evaluating the use of Drools Fusion for a new project and have a question about sliding windows that wasn't clear from the documentation. Does the time specification in a sliding window need to be hardcoded in the rule, or can it be derived from something else? Basically, I'm wondering whether I can write a rule that looks something like
when
...
Window ($win : length)
Number (intValue > $someValue) from accumulate (
Sample($len: length, value > $someThreashold) over window:time ($win),
sum($len) )
then
...
end
I know window:time() supports constant values like "10m", but can the window be driven from one of the other facts in the LHS picked up by the LHS of the rule?
Will Lauer
CA Technologies
Sr Software Architect
Tel: +1-713-625-9410
Cell: +1-979-820-2210
Will.Lauer(a)ca.com
14 years
Getting java.lang.ClassCastException: - using Drools 5.3
by kashif10
HI.
I am getting following exception.
Exception in thread "main" org.drools.RuntimeDroolsException:
d1.rule.Rule_8f09c0aa350100000080cb1e0dd40f6fEval4Invoker@f6f66af4 :*
java.lang.ClassCastException: d1.rule.facts.Medication cannot be cast to
d1.rule.facts.Procedure*
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:119)
at
org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:178)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:197)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:72)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:161)
at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:458)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:386)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:134)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:215)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:244)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:330)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:291)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:886)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:845)
at
org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:255)
at d1.rule.facts.PatientFacts.loadFactsInSession(PatientFacts.java:6075)
at d1.rule.DREvaluator.startEvaluation(DREvaluator.java:278)
at d1.rule.DREvaluator.main(DREvaluator.java:72)
Caused by: java.lang.ClassCastException: d1.rule.facts.Medication cannot be
cast to d1.rule.facts.Procedure
at
d1.rule.Rule_8f09c0aa350100000080cb1e0dd40f6fEval4Invoker.evaluate(Unknown
Source)
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
Following is the rule. I found that due to "or" the Procedure block not
runs.
If I change "or" to "and" than procedure block executed & the error not
produced.
I am not sure what's the problem, I am using Drool 5.3
rule "8f09c0aa350100000080cb1e0dd40f6f"
when #conditions
(
$cepFacts: CEPFacts(id=="D1")
and
eval($cepFacts.initialize())
and
(
(
$DxDate_1 : ( Medication( name equalsIgnoreCase "Ofloxacin" ) )
and
eval($cepFacts.checkRelativeValues($DxDate_1) )
)
or
(
$DxDate_2 : ( Procedure( name equalsIgnoreCase "Pres antibiotic" )
)
and
eval($cepFacts.checkRelativeValues($DxDate_2) )
)
)
and
(
$DxDate_3 : ( Medication( name equalsIgnoreCase "Trazodone" ) )
and
eval($cepFacts.checkTimeIs($DxDate_3)
)
)
then
resultIds.add("8f09c0aa350100000080cb1e0dd40f6f");
end
--
View this message in context: http://drools.46999.n3.nabble.com/Getting-java-lang-ClassCastException-us...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years
api's, factories and services
by Mark Proctor
Just a reminder when doing api's
Stage interfaces in internal-api and make sure you do factories for
them, almost never expose "new" constructors to users. We provide both
static factories and a service registry, and we ideally should continue
to support both. i.e. we have
KnowledgeBuilderFactory (static method factory, actually wraps below)
KnowledgeBuilderFactoryService (singleton service)
static example:
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder()
singleton service exmaple:
KnowledgeBuilderFactoryService kbuilderfs =
ServiceRegistry.getInstance().get( KnowledgeBuilderFactoryService.class )
KnowledgeBuilder kbuilder = kbuilderfs .newKnowledgeBuilder()
All of our factory services should be registered in
org.drools.util.ServiceRegistryImpl, this has delegation to say OSGi if
it exists (via the service locator pattern). So we become much more
friendly to OSGi or other container environments that are service
locator oriented.
"new" should almost never be used, apart from when construcing say
default or debug listener implementations.
Mark
14 years
Guvnor Problem
by arup
Hi all,
I have deployed guvnor 5.1 in WAS 6.1. i get no errors while deploying. the
guvnor link is working fine. but after uploading any pojo model when i'm
trying to validate it, its saying that it cannot find the Class inside the
package. but if i download the model from the guvnor, i'm getting the full
class structure inside the jar. also getting problem while creating the rule
as no facts are coming. do u know why this is happening????
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-Problem-tp3790091p3790091.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years