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
how to specify classpath dependencies in .drl files.
by Godmar Back
My question is how to manage a rule base that is composed from sets of
rules drawn from different sources.
Our goal is to supply sets of rules as .jar files - each .jar file
containing a related set of rules. For instance, consider an expert
system where different experts could export their expertise in such a
jar file. Such a .jar file would contain one or more .drl files and a
set of supporting .java classes. We'd like to be able to refer to
these .jar files using a URLClassLoader and/or JarURLConnection so
they can be referred to without a user having to download them prior
to starting their application.
Users should be able to combine those provided rules (that is, the
rules of those experts whose knowledge they wish to exploit) with
their own rules in their own .drl files.
My question is whether drools supports such a setup easily.
Specifically, is there a way for a user to import external .jar files
in their .drl files? A statement such as
use jar:http://expertbase.com/expert1/knowledge5.jar
which would instruct the rule compiler to load the classes from this
jar to its compile class path, and which would instruct the class
loader used to load the user's classes to delegate to the loader used
to load the jar file's classes? [Note that a given expert's knowledge
should only be loaded by one classloader.]
I browsed through the API and discovered that the package builder
configuration allows the specification of a class loader. Does this
mean the rule compiler will attempt to load related classes through
this loader as well? If so, it would need to use reflection to examine
those classes (which I'd find unlikely). If not, is there a way to
control the rule compiler's compiler classpath?
In our current prototype, we need to load everything through the
application classpath to avoid compile errors.
- Godmar
15 years, 10 months
Independent rule evaluations
by Yuri
Considering that I have a set of rules that can be time consuming to assert is
there a way to separate them from other rules without having to resort to
multiple working memories?
I basically want to be able to assert facts and evalute a set of rules as fast
as I can before actually having the time consuming set of rules evaluate.
thanks,
16 years
Nested Rules
by Vishal Deshmukh
Hi
I am using Drools 4.0.4 with Eclipse 3.2. I m much happy with the results. But now my application needs nested loops..
Can i write nested rules like
rule "rule 1 " // if condition of rule 1 is true then only execute rule 2 other wise skip it
when
condition is true
then
execute rule2
rule "rule 2 "
when
condition is true
then
action
rule "rule 3"
when
condition is true
then
action
Thanks and Rgards
Vishal
16 years
Writing rules using java..
by Kolla, Sandeep
Hi Rahul,
Its not about storing the whole file into the database.
I would have a Table representing the parameteres required to construct
a rule.
For example.
Tables:
RuleSetTable:
Ruleset_id
Ruleset_name
RuleTable:
Rule_id
Rule_name
Rule_saliance
Rule_condition
Rule_consequence
Ruleset_id
Now while loading the rules the application basically should read from
the DB, and construct the rules, as everything required to construct the
rules is avaliable in the tables.
This requirement had come up because as the rules keep changing quite
frequently, we don't want to bring down the application to load a new
DRL file.
Hope you understood what I want to achieve.
Thanks much,
Sandeep.
16 years, 1 month
wrapping drools api?
by thomaskukofka@web.de
Hello,
some people write about wrapping the Drools API with an own access API
for integration in the application.
Sorry for the perhaps stupid question, but what is the reason for this?
Does this only make sense if I'm thinking about changing the rule
engine one day?
If I'm not intending to change the rule engine from Drools to another,
so isn't it the same if the developpers has to use the native Drools API
or an self-written access API?
Regards
Tom
16 years, 2 months
activationCancelled() not being executed?
by Fermion
Hi!
I'm using a JTable to display rules that have been activated.
My goal is to have the table display a set of activations ordered by their
salience. The user should then choose which one of them to fire (if you want
to know why, be invited to read the background).
Of course this makes only sense as long as the activations are valid. Rules
whose activation has been cancelled should still be displayed, but in a
different style (like greyed out).
In order to accomplish this, I want to use an implementation of the
AgendaEventListener-interface, implementing the
activationCancelled()-method.
The Listener itself works, as I use the activationCreated()-method to add
the rule as a row to my table (which works fine).
Unfortunately the activationCancelled()-method doesn't seem to be executed
at all!
I assume that I have a fundamental misunderstanding of what should trigger
an activationCancelled() event?
Background: (just if you're curious...)
I'm working as a PhD student in physics at the CERN international
high-energy physics laboratory, for the ATLAS experiment.
As a member of the Detector Control System (DCS) group, I'm going to write
an expert system in order to assist the shift crew with the detector
operation.
The operation of the detector is a difficult task, because more than 70000
parameters (like voltages, currents and temperatures) have to be controlled.
A Finite State Machine (FSM) computes a defined and limited number of states
from the given parameters (like ON, OFF, STANDBY,...).
I'm going to synchronize the expert system application to ERROR states of
the FSM, in order to extract the relevant parameters from the system (as it
would be impossible to feed all parameters into the XPS all the time).
This is handled by quite some control rules that decide which data has to be
requested, released and so on.
Once all necessary data has been received, this might lead to activations of
the (more interesting) user rules.
Those rules have an explanatory character like "The temperature of this XYZ
is too high, so please try ABC."
For a given set of facts I assume more then one rule to be activated. Whilst
the rule engine should take care of the execution (firing) of all control
related rules, the execution of the user rules should be under direct user
control.
Displaying all activations in a GUI will allow the user to pick one (try it)
and rate it (the proposed solution solved the problem "yes/no"). Changing
the rules salience according to the answer, will allow the system to
dynamically reflect the current system status. (Rules that are related to
broken connections / wrongly connected cables are likely to be found at the
beginning of the experiment but hopefully only on rare occasion later on.)
In order to ensure that no information is lost during the absence of DCS
experts (which will not always be around), a log file should be written for
each major FSM-ERROR. At the moment the WorkingMemoryFileLogger seems to be
predestined for this job. This way I hope to collect large amounts of ERROR
data during the initial phase of the experiment that helps to extract rules
for numerous error conditions.
This will become especially handy, as such errors have a tendency to come
back, even if the original detector experts are gone for years...
--
View this message in context: http://www.nabble.com/activationCancelled%28%29-not-being-executed--tf434...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 2 months
RuleML-2008: Deadline Extension
by Adrian Paschke
[ our apologies should you receive this message more than one time ]
=====================================================================
Due to a number of requests we have to decided to extend
the submission deadline by 2 weeks.
NEW deadline for paper/demo submission: June 16
=====================================================================
2008 International RuleML Symposium
on Rule Interchange and Applications (RuleML-2008)
October 30-31, 2008, Orlando, Florida
http://2008.ruleml.org
--------------------------------------------------------------------
RuleML-2008 Highlights:
- Keynote speakers:
* Michael Kifer (State University of New York at Stony Brook, USA),
on "Rule Interchange Format: Not Just Syntax".
Joint keynote between RuleML-2008 and RR2008.
* David Luckham (Stanford University, USA) on complex event processing.
* Paul Haley (Haley Ltd) on business rules.
* Benjamin Grosof (Vulcan Inc, USA) on the SILK KRR system of the HALO
project.
(Details at: http://2008.ruleml.org/keynote.php )
- Joint Lunch Panel with the Business Rules Forum about "Rules on the Web"
- RuleML-2008 Challenge with prestigious prices
(Details at: http://2008.ruleml.org/challenge.php )
(Submissions at: http://ruleml-challenge.cs.nccu.edu.tw/ )
- Lightning talks / Highlight talks
Accepted papers will be published in Springer LNCS proceedings and
a journal special issue (IEEE TKDE pending) is forthcoming.
PRESS RELEASES: http://www.targetwire.com/vpo/rm/
--------------------------------------------------------------------
Call for Papers
Collocated with the 11th International Business Rules Forum, the 2008
International Symposium on Rule Interchange and Applications
(RuleML-2008) is
the second symposium (after last year's highly successful RuleML-2007 -
http://2007.ruleml.org/) devoted to work on practical distributed rule
technologies and rule-based applications which need language standards for
rules operating in the context of, e.g., the Semantic Web, Intelligent
Multi-
Agent Systems, Event-Driven Architectures and Service-Oriented Computing
Applications. The RuleML symposium is a new kind of event where the Web
Rules
and Logic community joins the established, practically oriented Forum of the
Business Rules community (http://www.businessrulesforum.com) to help cross-
fertilizing between Web and Business Logic technology.
The goal of RuleML-2008 is to bring together rule system providers,
representatives of, and participants in, rule standardization efforts (e.g.,
SBVR, RuleML, RIF, PRR, CL) and open source rules communities (e.g., jBoss
Rules, CLIPS/Jess, Prova, OO jDrew, Mandarax, XSB, XQuery),
practitioners and
technical experts, developers, users, and researchers. They will be offered
an exciting venue to exchange new ideas, practical developments and
experiences on issues pertinent to the interchange and application of rules
in open distributed environments such as the Web.
The Symposium gives emphasis on practical issues such as technical
contributions and show case demonstrations of effective, practical,
deployable rule-based technologies, rule interchange formats and
applications
as well as discussions of lessons learned that have to be taken into account
when employing rule-based technologies in distributed, (partially) open,
heterogeneous environments. We also welcome groundwork that helps to
build an
effective, practical, and deployable rule standard, improve rule technology,
provide better understanding of the integration and interchange of
rules, and
make the current generation of rule engines and rule technology more usable
for advanced Web and Service Oriented Architectures.
More details in: http://2008.ruleml.org/cfp.pdf
--------------------------------------------------------------------
RuleML-2008 Challenge
The RuleML-2008 Challenge is one of the highlights of RuleML-2008. It
addresses the system demonstration for practical use of rule technologies in
distributed and/or Web-based environments. The focus of the challenge is on
rule technologies (including rule languages and engines), interoperation and
interchange. The challenge offers participants the chance to demonstrate
their commercial and open source tools, use cases, and applications. Prizes
will be awarded to the two best applications. All accepted demos will be
presented in a special Challenge Session.
More details in: http://2008.ruleml.org/challenge.php
--------------------------------------------------------------------
Important Dates
- Paper Submissions due June 16, 2008 (EXTENDED)
- Notification of acceptance July 22, 2008
- Final submissions due August 13, 2008
- Symposium date October 30-31, 2008
- RuleML Challenge October 30, 2008
--------------------------------------------------------------------
Submission Site is open:
http://www.easychair.org/conferences/?conf=ruleml2008
Submission guidelines:
http://2008.ruleml.org/submissions.php
Topics of Interest:
http://2008.ruleml.org/topics.php
Organizing Committee:
http://2008.ruleml.org/oc.php
Program Committee:
http://2008.ruleml.org/pc.php
=====================================================================
Co-located with:
The 11th International Business Rules Forum
http://www.businessrulesforum.com
=====================================================================
Sponsored by:
Gold level : Vulcan Inc (pending)
Silver level: Model Systems
Bronze level: STI Innsbruck, ruleCore, JBoss
Sponsoring opportunities: http://2008.ruleml.org/sponsoring/
=====================================================================
In Co-operation with:
AAAI, W3C, BPM-Forum, Business Rules Forum , ECCAI, OASIS, OMG,
Dallas Rules Group, Belgium Business Rules Forum,
MIT Sloan CIO Symposium,
ACM, ACM SIGART, ACM SIGMIS, ACM SIGWEB, Open Research Society,
IEEE Systems Man and Cybernetics Society
IEEE SMCS TC on Intelligent Internet Systems
IEEE SMCS TC on Distributed Intelligent Systems
IEEE Computer Society TC on Autonomous and Autonomic Systems
=====================================================================
Media Partners:
Springer LNCS, MoDo Marketing
=====================================================================
16 years, 2 months
Can drools work in multithreaded environment?
by Barath
Hi,
While doing a load test with jmeter,my web service application with drools
works fine for few clients(5 simultaneous hits for 10 times)
but when i increase my clients(120 simultanious hits for 100 times) i am
gettin the following exception for
few client, (out of 12,000 hits 200 throws this exception)
problem encountered at node [11] 5{170,189}: unable to resolve property:
null pointer exception in property: declr.identifier
org.mvel.TemplateInterpreter.execute(TemplateInterpreter.java:528)
org.mvel.TemplateInterpreter.parse(TemplateInterpreter.java:341)
org.drools.rule.builder.dialect.java.AbstractJavaBuilder.generatTemplates(AbstractJavaBuilder.java:113)
org.drools.rule.builder.dialect.java.JavaConsequenceBuilder.build(JavaConsequenceBuilder.java:95)
org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:67)
org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:446)
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:304)
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167)
com.drools.util.RuleEngine.applyRule(RuleEngine.java:47)
com.drools.util.DroolsController.getAdvertisement(DroolsController.java:94)
com.drools.util.DroolsController.routeBusinessMethod(DroolsController.java:67)
com.drools.util.DroolsController.getAdvertisement(DroolsController.java:43)
com.drools.MyEndpoint.getAdvertisement(MyEndpoint.java:237)
com.drools.MyEndpoint.process(MyEndpoint.java:144)
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:595)
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
java.lang.Thread.run(Thread.java:619)
drl file has 6 rules,
5 rules - which retract facts which passes the rule.
1 rule(low salience) - will add the fact to java.util.List (set as global)
which passes the rule.
1 . Am i getting this error bcoz of the global list? or any other reason?
2 . How to solve this problem?
here the rules,
<code>
global java.util.List feasibleAdv;
rule " percentage rule "
when
$adv : Advertisement( percentageLimit != 0 , percentageLimit <
playedPercentage )
then
System.out.println("remove this adv (failed percentage):
"+$adv.getAdvertisementID());
retract($adv);
end
rule "per day rule"
when
$adv : Advertisement( limitperday != 0 , limitperday <= playedperday
)
then
//System.out.println("remove this adv (failed day):
"+$adv.getAdvertisementID());
retract($adv);
end
rule "per week rule"
when
$adv : Advertisement( limitperweek != 0 , limitperweek <=
playedperweek)
then
//System.out.println("remove this adv (failed week):
"+$adv.getAdvertisementID());
retract($adv);
end
rule "per month rule"
when
$adv : Advertisement( limitpermonth != 0 , limitpermonth <=
playedpermonth)
then
//System.out.println("remove this adv (failed month) :
"+$adv.getAdvertisementID());
retract($adv);
end
rule "total played rule"
when
$adv : Advertisement( totallimit != 0 , totallimit <= totalplayed )
then
//System.out.println("remove this adv (failed total played) :
"+$adv.getAdvertisementID());
retract($adv);
end
rule "advertisement select rule"
salience -1
when
$adv : Advertisement( $playedPercentPerAdvertisement :
playedPercentPerAdvertisement)
not( Advertisement( playedPercentPerAdvertisement <
$playedPercentPerAdvertisement ) )
$advertisementCount : Integer()
then
boolean status = true;
if($advertisementCount-1 < 0){
//System.out.println("halted");
status = false;
drools.halt();
}
if(status){
feasibleAdv.add($adv);
drools.update(
drools.getWorkingMemory().getFactHandle($advertisementCount), new
Integer($advertisementCount-1) );
retract($adv);
}
end
</code>
--
View this message in context: http://www.nabble.com/Can-drools-work-in-multithreaded-environment--tp170...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 2 months
Re: Ruleflow-group attribute causing rule to not fire
by Roger Tanuatmadja
> From: "Roger Tanuatmadja" <rogerst(a)gmail.com>
> To: rules-users(a)lists.jboss.org
> Date: Mon, 19 May 2008 11:55:19 -0700
> Subject: Ruleflow-group attribute causing rule to not fire
> Hi,
>
> I am new to both rules engine and Drools. I am currently evaluating Drools
> 4.0.7 for use in our new project.
> Basically I have been writing a bunch of individual rules and things have
> been fine, the rules that I expected to fire were fired, etc, etc. I then
> proceeded to investigate rule flows. I started innocently enough i.e. adding
> the ruleflow-group attribute to some of my rules. I also defined a ruleflow
> mapping (.rfm).
>
> I then reran my unit-tests (WITHOUT reading the rules in as rule flows) and
> some of my rules were no longer firing!!. I added an Agenda Listener to my
> code and
> 1. without the ruleflow-group attribute, activations were created, and
> fired.
> 2. with the ruleflow-group attribute, activations were created but not
> fired.
>
> Using the debugger yielded the same logical outcomes i.e. without the
> ruleflow-group attribute, my breakpoints were hit, but with the attribute
> specified, none of my breakpoints were hit.
>
> My question is: Is this behavior expected? And why? Especially since some
> other rules (with the attribute specified) continued to work. I've read the
> documentations as much as possible, but I am really new to this field so I
> might not even know what questions to ask either.
>
> Any help would be greatly appreciated.
>
> Thanks,
>
> Roger
>
>
>
>
16 years, 2 months