DSL Rules error : unable to expand
by vester_s
Hi,
I have a DSL file like this
[then]showing popup thing = foo.put("showing","ON");
and a DRL file like this
Rule "popup"
no-loop tru
when
....
then
showing popup thing
end
It keeps giving me an error
"Unable to expand: showing popup thing. Due to Expression was not
expandable: showing popup thing"
The other rules is working fine, i couldn't find any problem with this DSL
and DRL. Anybody can help?
thanks,
--
View this message in context: http://www.nabble.com/DSL-Rules-error-%3A-unable-to-expand-tp16707000p167...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 7 months
Survey On Rule Base Development - Methods, Tools and Problems
by Valentin Zacharias
Hello Everyone!
We are conducting an online survey on the development of rule bases and
would really appreciate your opinion! The survey is very short and should
only require a few minutes to complete. Any additional feedback or comments
are also very welcome.
To participate please go to:
<http://www.surveymonkey.com/s.aspx?sm=EsZHdwQjfp1J2VBieI2aYg_3d_3d>
The goal of the survey is to give an overview of the kind of methods and
tools actually used for the development of rule-based systems (with a focus
on verification and validation). It also tries to identify some of the
challenges facing rule-base development.
The results of the survey will be publicly available. Drop me a note or
enter your email address at the end of the survey to have them sent to you.
I'll also send another note to this mailing list once the results are
available.
If you answer all questions and enter your email address at the end of the
survey, you have a chance to win a Canon SD1100 that will be given to one of
the participants
thanks for your support,
Valentin Zacharias
--
email: rules(a)vzach.de
phone: +49-721-9654-806
fax : +49-721-9654-807
http://www.vzach.de/blog
=======================================================================
FZI Forschungszentrum Informatik an der Universität Karlsruhe (TH)
Haid-und-Neu-Str. 10-14, 76131 Deutschland, http://www.fzi.de
SdbR, Az: 14-0563.1 Regierungspräsidium Karlsruhe
Vorstand: Rüdiger Dillmann, Michael Flor, Jivka Ovtcharova, Rudi Studer
Vorsitzender des Kuratoriums: Ministerialdirigent Günther Leßnerkraus
=======================================================================
16 years, 7 months
NPE after rule consequence executes
by Scott Reed
Running Drools 4.0.3, on Win 2k sp4, JDK 1.6.0_03.
I am getting this exception after the debugger shows execution has gone
past the end of the rule. The exception is occurring in
ReteTuple.get(Descriptor). I believe the descriptor argument is null.
Can anyone suggest why this might be happening and what I can do to
avoid it?
Thanks,
Scott
java.lang.NullPointerException
at org.drools.reteoo.ReteTuple.get(ReteTuple.java:97)
at
org.fp.findata.Rule_2MS__Calculate_now_scheduled_or_periodic_transaction_0ConsequenceInvoker.evaluate(Rule_2MS__Calculate_now_scheduled_or_periodic_transaction_0ConsequenceInvoker.java:19)
at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:550)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:514)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:471)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:433)
at
org.fp.rules.RuleEngineManager$RunTask.run(RuleEngineManager.java:225)
org.drools.spi.ConsequenceException: java.lang.NullPointerException
at
org.drools.base.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:14)
at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:554)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:514)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:471)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:433)
at
org.fp.rules.RuleEngineManager$RunTask.run(RuleEngineManager.java:225)
Caused by: java.lang.NullPointerException
at org.drools.reteoo.ReteTuple.get(ReteTuple.java:97)
at
org.fp.findata.Rule_2MS__Calculate_now_scheduled_or_periodic_transaction_0ConsequenceInvoker.evaluate(Rule_2MS__Calculate_now_scheduled_or_periodic_transaction_0ConsequenceInvoker.java:19)
at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:550)
... 4 more
16 years, 7 months
newbie: update and shallowCache
by Piccand, Regis
Hi all,
I am evaluating Drools and am stuck with a simple rule that selects
elements which do not correspond to the condition... Since I am updating
objects in the RHD, I guess it has to do with my wrong understanding
(and the cache...?)
I am trying to allocate lessons to periods (hour). My object model can
be summarize is as follows :
Lesson
boolean : allocated // true if the lesson has been allocated to
an hour
int : session // a session is a bunch of lessons
Subject : subject // an allocated lesson is assigned a subject
Subject
Set<Day> : allocatedDays // days in which this subject is taught -
checked before allocation, as a subject can only be taught once a day
Hour
boolean : allocated // true is this hour has been allocated with a
lesson
Day : day // the day this hour belongs to - required to check with
subject.allocatedDays
I put in the workingMemory a bunch of Lesson objects, which have been
set with Subject and Session id. I also put a bunch of Hour object, set
with a Day.
My rule is as follows:
rule "allocate"
when
$lesson : Lesson(allocated == false, session.type == Session.DISTINCT,
$allocatedDays : subject.allocatedDays)
$availableHour : Hour(allocated == false, day not memberOf
$allocatedDays)
then
$lesson.setHour($availableHour ) ;
$lesson.setAllocated(true) ;
update($lesson);
$availableHour.setSubject($lesson.getSubject()) ;
$availableHour.setAllocated(true );
update($availableHour);
end
When I set a debug on the first line of the THEN section, I can see that
sometimes $availableHour.allocated == true ... sometimes
$lesson.allocated == true (although it's an implicit And statement ...)
Therefore, I can see that the update() works, but it seems that the rule
does not use the updated object (due to shallow copy ??)
Any help more than welcome
Regis
16 years, 7 months
Modify() block in decision tables?
by Irving Reid
I have a bunch of decision tables with two columns of action, like:
RuleSet
ED_Notification
Import
...Visit
RuleTable Triggers
CONDITION
CONDITION
ACTION
ACTION
$visit:Visit
Facility
age >= $1, age <= 115
$visit.setTriggerStatus($param);
$visit.setRuleTriggered($param);
4116
70
Over_70
4166
80
New
Over_80
Note that not every row has an entry in the first ACTION column.
Is there any way to get the spreadsheet compiler to put all the ACTION columns into a modify() block, or some other equivalent construct, so that the changes to the visit object get propagated?
I’ve tried making by ACTIONS be:
modifyRetract($visit);$visit.setTriggerStatus($param)
and
$visit.setRuleTriggered($param);modifyInsert($visit);
But when there’s no value in the first ACTION column, the compiler doesn’t put in the retract. I suppose I could wrap each of the actions in a modify() block, but I’m concerned about the performance of taking every object in and out of the working memory twice.
- irving -
16 years, 7 months
Ruleflows
by Jonathan Guéhenneux
Hi,
I have to compute the gravity of a debt according to a set of rules organized in a ruleflow. I will have to process about ten thousands debts every minute.
There is no dependency between the debts. All the rules are applied to one debt.
What is the best strategy?
- Insert all the debts, and start the ruleflow process
or
- (Insert one debt, start the ruleflow process) for each debt
Another question:
If a rule "r1" in the ruleflow group "rfg1" is fired on a debt "d1", can a second rule "r2" in the same ruleflow group be fired on the same debt "d1"?
_________________________________________________________________
Avec Hotmail, vos e-mails vous suivent partout ! Mettez Hotmail sur votre mobile !
http://www.messengersurvotremobile.com/?d=hotmail
16 years, 7 months
Identify bean fields used in rules
by Sylvain Gaudan
Hi all,
Is there a way to get, for each Bean Class, the list of fields
that are used in a rulebase in order to optimize the amount of data
loaded in a bean?
Thank you for your help,
Sylvain
16 years, 7 months
Modifying fact object during rules execution
by vmuthupal
Hi,
Currently we have a rule defined like this
When
Currency value = 300
Currency type = USD
Condition 3 = something
Condition 4 = something
Then
do this
If the input values are not of the same currency then we need to do a
currency conversion and then evaluate the above rule. For example if the
input value says Currency value = 250 and currency type = Euro. then we need
to convert the currency value from Euro to USD and then execute the rule. Is
this possible by using functions on the LHS. If possible is there a better
way to do this as we are currently looking at 10,000 rules to go through
this routine.
Thanks.
--
View this message in context: http://www.nabble.com/Modifying-fact-object-during-rules-execution-tp1665...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 7 months
Data enumeration
by vmuthupal
Hi all,
We have the following destination hierarchy defined in our application-
continent, country, state, city and locale. We thought of providing the
users a drop down in BRMS to select the appropriate values. Current
selection should based on the previously selected destination value. For
example - If the country is selected as 'UK' then all the states in 'UK'
should be populated and shown as the state. This works perfectly well on
using the conditional enumeration feature.
Currently we have around 6 million records defined and loading all of these
during the application start poses a performance issue. Is there a way to
tweak this behaviour during BRMS start up. Our rquirement is to load only
the continent data first and upon selecting the continent, the application
should make a call to the underlying database to retrieve the country
related information and so on. I firmly believe there should be a way to do
this. If there is currently no provision to do this we are ready to tweak
the GWT code to make this work. If someone can provide a little hindsight on
where to start from, it would be really helpful.
Thanks a lot.
--
View this message in context: http://www.nabble.com/Data-enumeration-tp16659931p16659931.html
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 7 months
MVEL modify block
by Juraj Bednar
Hello,
trying as hard as I can, I am not able to do method calls within MVEL
modify block, as I can
do with Java block.
For example:
modify($p) { addDescription("aaa") }
This works in Java, but not in MVEL. I was not able to find out how to
call methods (not
set properties, which works quite well). Any ideas what am I doing wrong?
Does MVEL support method calls within modify block at all? If not,
how can I safely
call a method, that modifies fact attributes from MVEL? (I am not
using shadow facts).
Thanks,
Juraj.
16 years, 7 months