lock-on-active documentation
by Wolfgang Laun
>From Drools-5.0.0, Expert, 7.8.1. Sentence numbers added by me:
[1] when a ruleflow-group becomes active or an agenda-group receives the
focus
any rules that have lock-on-active set to try cannot place activations onto
the
agenda, the rules are matched and the resulting activations discarded.
[2] This is a stronger version of no-loop.
[3] It's ideally for calculation rules where you have a number of rules that
will modify a fact and you don't want any rule re-matching and firing.
[4] In summary fire these currently active rules and only these rules, no
matter how the data changes, do not allow any more activations for the rules
with the attribute set to true.
[5] When the ruleflow-group is no longer active or agenda-group loses the
focus those rules with lock-on-active set to true can once again add
activations onto the agenda.
[4] says that activations "for the rules with the attribute set to true" are
disallowed. This is confusing or even in contradiction with [1], which I
understand to mean that WM updates done by the RHS of a rule X with
lock-on-active==true don't result in any activations. (Of course, this
includes activations of X itself.)
[5] is absolutely confusing: How can rules in a group that isn't active
or doesn't have the focus can add activations - irrespective of its
lock-on-active setting?
[1] s/when/When/, s/try/true/
I would create a JIRA, but I'd like to be sure what to suggest for a fix.
-W
15 years, 8 months
ClassCastException in ruleflow
by Femke De Backere
Hi,
I have a real annoying problem with my ruleflow, when I execute a
subprocess, I get a classcastexception on my variable communication.
Apparently Drools thinks the variable is an instance of the class
masterproef.common.Patient, while my variable is of the type
masterproef.humancommunication.Communication... I really don't know
how this happened. All my settings appear to be correct.
Any ideas?
Thx,
15 years, 8 months
Testing out Type Declarations in simple rule file causing exceptions
by CK
Hi,
I'm wondering if I am doing something wrong in my code:
I create dummy type declarations to indicate presence of certain
states (is there possibly a better way of doing this?):
declare Domestic
dummy : boolean
end
declare Multiple
dummy : boolean
end
rule "..."
when
......
then
insert(new Domestic());
end
Something like this is giving me the following errors during DRL file
parsing:
Unable to build expression for 'consequence': Failed to compile: 1
compilation error(s):
- (0,0) could not resolve class: Domestic ' insert(new Domestic());
Based on what the docs say, this should generate the proper dynamic
classes and I should immediately be able to use the declared types.
I did additional checking by outputting the registered Type
Declarations. These two types are indeed registered in the
PackageBuilder.getPackage().getTypeDeclarations().
So I can only guess that either I'm doing something wrong here or
there is a bug in the CR1 release.
15 years, 8 months
classcastexception in ruleflow
by Femke De Backere
Hi,
I have a real annoying problem with my ruleflow, when I execute a
subprocess, I get a classcastexception on my variable communication.
Apparently Drools thinks the variable is an instance of the class
masterproef.common.Patient, while my variable is of the type
masterproef.humancommunication.Communication... I really don't know
how this happened. All my settings appear to be correct.
Any ideas?
Thx,
Femke De Backere
15 years, 8 months
using forall with from
by Garrett Conaty
I've got an odd parse case that I'm hoping the parser wizards could
confirm is the same as the bug JBRULES-1611:
This works
not (exists (Event(eval
(eventDate.after(CalendarUtil.getDateDaysPast(30)))) from $room.events))
but this doesn't
forall( Event(eval
(eventDate.before(CalendarUtil.getDateDaysPast(30)))) from
$room.events )
It's like doing math proofs all over again. Technically I think I've
got to fix the logic because !< is >-= rather than >.
Thanks,
Garrett
15 years, 8 months
serialVersionUID incompatibility with MVELDialectRuntimeData when using Guvnor 5.0CR1
by 山本 裕介
Hi,
I'm evaluating Guvnor 5.0CR1 and having problem when the
MortgageApplicationTest example.
It just fails with InvalidClassException, saying that serialVersionUID
of MVELDialectRuntimeData are different.
That doesn't make sense to me because I'm using absolute paths to
point the server side jars.
The version I'm using is "Drools 5.0.0.CR1 Guvnor Standalone".
$ java -Dfile.encoding=UTF-8 -classpath /Users/yusukey/jbproject/
droolstest/target/classes:/Users/yusukey/jboss-eap-4.3cp03/server/
default/deploy/drools-guvnor.war/WEB-INF/lib/drools-
core-5.0.0.CR1.jar:/Users/yusukey/jboss-eap-4.3cp03/server/default/
deploy/drools-guvnor.war/WEB-INF/lib/drools-api-5.0.0.CR1.jar:/Users/
yusukey/jboss-eap-4.3cp03/server/default/deploy/drools-guvnor.war/WEB-
INF/lib/mvel2-2.0.8pre1.jar com.notidiots.MortgageApplicationTest
RuleAgent(MyConfig) INFO (Sat Mar 14 11:06:13 JST 2009): Configuring
with newInstance=true, secondsToRefresh=30
RuleAgent(MyConfig) INFO (Sat Mar 14 11:06:13 JST 2009): Configuring
package provider : URLScanner monitoring URLs: http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/mort...
RuleAgent(MyConfig) EXCEPTION (Sat Mar 14 11:06:25 JST 2009):
org.drools.rule.MVELDialectRuntimeData; local class incompatible:
stream classdesc serialVersionUID = -3277457858074244250, local class
serialVersionUID = 6582893639473442227. Stack trace should follow.
java.io.InvalidClassException: org.drools.rule.MVELDialectRuntimeData;
local class incompatible: stream classdesc serialVersionUID =
-3277457858074244250, local class serialVersionUID = 6582893639473442227
One thing I may need to mention is that I needed to change one single
line to compile MortgageApplicationTest.java as following:
----------------
- import org.drools.rule.FactType;
+ import org.drools.definition.type.FactType;
----------------
Any idea why?
I'm attaching the full stack trace.
Cheers,
Yusuke
15 years, 8 months
Localization in DSL
by Shigeaki Wakizaka
Hello.
I'd like to use Japanese in DSL.
Is it possible?
Do you have a plan to do the localize-thing with DSL and
brand-new BRMS?
Thanks in advance
Shige
15 years, 8 months
ClassCastException with 5.0CR1 on execute(Iterable obj)
by psentosa
Hi all,
I've just updated to drools 5.0CR1.
Before I had this kind of expression:
ksession.executeIterable(objects) with objects ist a list containing
different kind of objects
and this worked perfectly.
after updating, I use the forementioned execute(Iterable obj) on the same
list of objects, but I got the class cast exception:
12:13:18,718 INFO [STDOUT] [] [2009:03:72 12:03:718:info] KnowledgeAgent
new KnowledgeBase now built and in use
12:13:19,156 ERROR [myClass.Interceptor] []
org.drools.base.mvel.MVELEvalExpression@14e4952 :
java.lang.ClassCastException: java.lang.Integer
org.drools.RuntimeDroolsException:
org.drools.base.mvel.MVELEvalExpression@14e4952 :
java.lang.ClassCastException: java.lang.Integer
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:122)
at
org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:180)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:117)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:34)
at
org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:189)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:117)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:28)
at org.drools.reteoo.FromNode.evaluateAndPropagate(FromNode.java:156)
Could this be a problem from mvel or is it eventually my code that causes
this? (no changed on my code has been made before)
many thanks for hints
Regards
--
View this message in context: http://www.nabble.com/ClassCastException-with-5.0CR1-on-execute%28Iterabl...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 8 months