User and/or Code problem with insert/retract and salience
by Jared Davis
We have 5 rules that are firing out of salience order for a particular set
of 4 objects. The rules have a branch on the RHS which sometimes retracts
the A object. There are reasons why the branch is not in the LHS not shown
in this sample.
The 5 rules are like the following. The salience values
are 70, 65, 60, 55, 50
rule "a1"
salience 70
agenda-group "b"
when
a: A(name customevaluator "X")
B(name = "B")
then
// sometimes retract
end
There is one B object.
Another rule fires (at salience 0) and inserts 4 A objects.
1) A1 runs rule at salience 70 and is retracted
2) A2 runs rule at salience 70 and is not retracted
3) A3 runs rule at salience 70 and is retracted
4) A4 runs rule at salience 70 and is not retracted
5) A4 runs rule at salience 65 and is retracted
6) A2 runs rule at salience 50 and is retracted
I would have expected step 6 to have A2 run at salience 65 but instead it
went from 70 to 50 skipping 60 and 65. Is my understanding of the rule
rhs firing order wrong?
I'm using a 5.1 snapshot from Dec 23 2009.
I searched the JIRA and did not see anything related.
15 years, 11 months
The "true modify" algorithm - less memory usage, more performance
by Edson Tirelli
Hey all
First of all, I am sorry if I haven't answered many of the e-mails lately
in the list (although I am glad that more and more users are stepping up and
helping others). The reason was we were really busy developing a major
improvement to the Drools algorithm during the last few months and that will
be available in Drools 5.1. For those that haven't seen it yet, we call it
"True Modify" for the lack of a better name:
http://blog.athico.com/2010/03/drools-halves-memory-use-with-new-true.html
The gains are totally dependent on use cases, but if your application
makes heavy use of update/modify on facts, then you will definitively see
major improvements on memory usage and a nice improvements on performance.
In that particular example we reported in the blog (Drools Planner
Examination Benchmark App) we got ~35% perf improvement and a huge memory
usage improvement: while the original algorithm reached the threshold for
"Full GC" 5 times, the new algorithm never reached the threshold (running
with -Xms256M -Xmx256M).
The reason for this e-mail is that we have a limited set of test
applications we can run here and I am looking for users that could give the
new algorithm a try to make sure we got everything covered before we release
5.1 final. From a users perspective, it should be 100% backward compatible,
so what I am looking for is for people that can run a benchmark (perf and
memory usage) of your use case using 5.0.1, then using the snapshot from
trunk, make sure the application ran successfully and provide feedback on
the perf/memory usage differences.
Ping me if you are able to run such a benchmark.
Thanks,
Edson
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
15 years, 11 months
Guvnor 5.0 DSL Validation bug (Internet Explorer only)
by Paul R.
Guided Rule validation fails in Guvnor (Internet Explorer only), when Guided
rule contains DSL components.
It looks as though the LHS of the DSL isn't being substituted with the RHS
when validating.
I can't find a JIRA for this, does anybody know whether it's fixed in 5.1
M1?
Thanks and Regards,
Paul
15 years, 11 months
Drools OSS Meeting 19th - 23rd of April now at the Hacienda Hotel (San Diego)
by Mark Proctor
http://blog.athico.com/2010/03/drools-oss-meeting-19th-23rd-of-april.html
http://community.jboss.org/wiki/DroolsBootCampSanDiegoApril2010
Due to unexpected levels of attendance we've moved the event from the
provided location to a larger one. This provided the opportunity to
locate the event at a hotel, so people can stay in the same building as
the meeting. We are now located at the Hacienda Hotel
<http://haciendahotel-oldtown.com> in Old Town, near plenty of
restaurants and a trolley bus to Down Town which is 10 minutes away. So
if you have booked another hotel I would recommend you cancel it and
relocate to the Hacienda.
A special hotel rate of $110 per night is available under the booking
reference "Drools", but hurry as space is limited and we have not done
any block reservations. The event itself is free of charge. Breakfast
will be provided each morning, as part of the conference, and coffee
will be available throughout the day. If anyone would like to sponsor
lunch, let me know :) mproctor at codehaus d0t org.
Hacienda Hotel <http://haciendahotel-oldtown.com/> (4041 Harney Street .
San Diego, CA 92110 . 800-888-1991)
(click to enlarge)
<http://2.bp.blogspot.com/_Jrhwx8X9P7g/S7F3oW75hKI/AAAAAAAAAZ8/pmta54bAmAc...>
Details of the conference can be found at the registration page here:
http://community.jboss.org/wiki/DroolsBootCampSanDiegoApril2010
The meeting is really shaping up with many top names attending:
JBoss, OSDE (Argentinian Healthcare), AT&T, SAIC, Kaiser, VA, Naval
Health Research Center, Clinica, Decision Management Solutions,
University of Utah / VA, Intermountain Healthcare, termMed IT, Versatile
Systems, GE Healthcare, Open Health Data, Pharmacy OneSource, Wake
Forest University Health Science, Recondo Technology, Zementis,
University of Maryland, University of Bologna, Duke University.
We have the most excellent James Taylor key noting on Wednesday
<http://blog.athico.com/2010/03/james-taylor-to-key-note-for-drools.html>,
with many other interesting talks planned:
*Name* *Talk*
James Taylor (Decision Management Solutions
<http://www.decisionmanagementsolutions.com/>) *Wed 9am Key Note :*
Smarter systems for uncertain times
Mark Proctor (JBoss) Intro to Drools 5
Mark Proctor (JBoss) Rule Authoring Techniques
Mark Proctor (JBoss) Spring, Camel and OSGi integration
Kris Verlaenen (JBoss)
Building Domain Specific Workflows for Clinical Decision Support
Kris Verlaenen (JBoss) Dynamic Fragments for Non-Linear Execution of
Adaptive Processes
Edson Tirelli (JBoss) Applying Complex Event Processing
Davide Sottara (University of Bologna) Hybrid Ontologies
Davide Sottara (University of Bologna) Enhancing Rules with Uncertainty
and Vagueness
Ken Kawamoto (Duke University) Clinical Decision Support with HL7 and
Drools
Emory Fry (NHRC) Delivering Real-Time Clinical Decision Support
Joe White (Recondo Techology) Healthcare EDI Processing Using Drools
Kostas Stathatos (Zementis <http://www.zementis.com/>) Drools &
Predictive Analytics: Follow Your Rules and Listen to Your Data
Monday and Tuesday are focused on the medical/healthcare industries, but
Wednesday onwards are open to all.
15 years, 11 months
CHR 2010: Final call for papers
by Leslie DE KONINCK
=========================================================================
Final Call for Papers
Seventh International Workshop on Constraint Handling Rules
CHR 2010
http://www.cs.kuleuven.be/~dtai/CHR/CHR2010/
Edinburgh (Scotland), July 20, 2010
(co-located with ICLP 2010, part of FLoC 2010)
=========================================================================
News
* Abstract submission no longer required before paper submission;
paper submission deadline = April 5th
* Invited speaker: We are privileged to announce a distinguished invited
speaker this year: Mark Proctor, lead of the thriving, innovating
JBoss Drools project (http://www.jboss.org/drools/). He will introduce
the Drools Business Logic integration Platform, a fully featured
business rule engine and management system that seamlessly integrates
powerful Complex Event Processing and workflow capabilities.
Introduction
The CHR 2010 Workshop will be held July 20, 2010 in Edinburgh (Scotland)
at the occasion of the 26th International Conference on Logic
Programming (ICLP 2010), the premier international venue for presenting
research in logic programming. This year, ICLP is held as part of the
Fifth Federated Logic Conference (FLoC 2010). More information on the
venue and co-located conferences can be found on the FLOC website
(http://www.floc-conference.org/).
The Constraint Handling Rules (CHR) language has become a major declara-
tive specification formalism and implementation language for constraint
reasoning algorithms and applications. Algorithms specified using infe-
rence rules, rewrite rules, sequents, proof rules, or logical axioms can
often be directly written in CHR. Its clean semantics facilitates pro-
gram design, analysis, and transformation. For more information, please
visit the CHR website (http://www.cs.kuleuven.be/~dtai/projects/CHR/).
The aim of the CHR workshop series is to stimulate and promote interna-
tional research and collaboration on topics related to the CHR language.
The workshop is a lively, friendly forum for presenting and discussing
new results, interesting applications, and work in progress.
Previous Workshops on Constraint Handling Rules were organized in 2004
in Ulm (Germany), in 2005 in Sitges (Spain) at ICLP, in 2006 in Venice
(Italy) at ICALP, in 2007 in Porto (Portgual) at ICLP, in 2008 in Hagen-
berg (Austria) at RTA, and in 2009 in Pasadena (California, US) at ICLP.
Topics of Interest
The workshop calls for contributions on all aspects of CHR,
including topics such as:
- (Operational) semantics
- Program analysis (confluence, termination, ...)
- Comparisons with related approaches
- Expressivity and complexity
- Language extensions (negation, modules, ...)
- Constraint solvers
- Implementation and optimization
- Concurrency & parallelism
- Program transformation and generation
- Programming environments (debugging, confluence checking, ...)
- Programming pearls
Application papers that describe experience with (industrial)
applications, are especially welcome.
Important dates
- Paper submission deadline: April 5, 2010
- Notification of acceptance: May 1, 2010
- Final version due: May 17, 2010
- Workshop date: July 20, 2010
Submission Information
The four broad categories for submissions are:
1. technical papers for describing technically sound, innovative
ideas that can advance the state of the art of CHR
2. application papers, where the emphasis will be on the use of CHR
in the application, on the impact on the application domain, and
the lessons learned from this application
3. system and tool papers, empasising the novelty, practicality,
usability and general availability of the systems and tools
described
4. short papers, for ongoing work not yet ready for full publication
and research project overviews.
All papers must describe original, previously unpublished research, and
must not simultaneously be submitted for publication elsewhere.
They must be written in English. Technical papers must not exceed 15
pages. The limit for short papers is 7 pages, as is the standard page
limit for application papers, and system and tool papers. However,
particularly strong contributions in the latter two areas may be
submitted as technical paper as well.
All papers must be in the Springer LNCS format. General information
about the Springer LNCS series and the LNCS authors' instructions are
available at the Springer LNCS home page
(http://www.springer.com/computer/lncs?SGWID=0-164-7-72376-0).
Submissions must be made via the EasyChair submission system, available
at http://www.easychair.org/conferences/?conf=chr10
Programme Committee
- Sebastian Brand, National ICT Australia, and the University
of Melbourne, Victoria, Australia
- Henning Christiansen, Roskilde University, Denmark
- Veronica Dahl, Simon Fraser University, Canada
- Leslie De Koninck, Victoria Research Laboratory, NICTA, Australia
(co-chair)
- Thom Fruehwirth Ulm University, Germany
- Marco Gavanelli, University of Ferrara, Italy
- Remy Haemmerle, Universidad Politecnica de Madrid, Spain
- Maria-Chiara Meo, "Gabriele d'Annunzio" University, Italy
- Paolo Pilozzi K.U.Leuven, Belgium
- Frank Raiser, Ulm University, Germany
- Peter Van Weert, K.U.Leuven, Belgium (co-chair)
- Jairson Vitorino, Federal University of Pernambuco, Brazil
- Armin Wolf, Fraunhofer FIRST, Germany
Workshop Coordinators
Contact: chr2010(a)easychair.org
Peter Van Weert
Department of Computer Science, K.U.Leuven
Leuven, Belgium
http://www.cs.kuleuven.be/~petervw/
Leslie De Koninck
Victoria Research Laboratory, NICTA
Melbourne, Australia
15 years, 11 months
Query about the state of tuples in AgendaItem.
by Rajnikant Gupta
Hi Group,
I have a doubt regarding tuples. I created a rule using complex types
objects. I am comparing two complex type objecs which have parent-child
relationship eg. "ParentType.equals(ChildType)". I expect this to follow
java rule which allows such comparision. Now when I run the rules with
different values for fields in ParentType and ChildType (which means the
rule should fail) to my surprise it evals to TRUE. Also upon inspection, the
tuple shows me only the ChildType instance not the ParentType.
I would appreciate any help on this.
Regards,
Rajnikant Gupta
15 years, 11 months
Combined OR/NOT Rules results in NullPointerException
by Sebastian Furth
Hello,
i've already mailed last week with the same problem and with your help I was
able to locate the source of the following NullPointerException which
happens if we try to insert the Fact "knocking" (@see Source Code of the
Java Class here: http://www.pastie.org/private/juv7hh7rxahpluo5agu3q) :
*java.lang.NullPointerException
at org.drools.reteoo.LeftTuple.get(LeftTuple.java:265)
at org.drools.reteoo.LeftTuple.get(LeftTuple.java:300)
at
org.drools.rule.VariableRestriction$ObjectVariableContextEntry.updateFromTuple(VariableRestriction.java:320)
at
org.drools.common.SingleBetaConstraints.updateFromTuple(SingleBetaConstraints.java:119)
at org.drools.reteoo.NotNode.assertLeftTuple(NotNode.java:98)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:117)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:34)
at org.drools.reteoo.NotNode.assertLeftTuple(NotNode.java:123)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:145)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:57)
at
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:142)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:42)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:147)
at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:360)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:344)
at
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:185)
at
org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:146)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1046)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1001)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:788)
at
org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:216)
at de.d3web.we.drools.DroolsAction.addFacts(DroolsAction.java:334)
*
The source of the problem is the following rule:
*rule "R50"
when
$value1 : Value(value == "knocking")
not Input(name == "Engine noises" && values contains $value1)
or
$value2 : Value(value == "ringing")
not Input(name == "Engine noises" && values contains $value2)
$solution : SolutionInput(name == "Bad ignition timing")
then
$solution.setValue(N3);
end
*
Could you please tell me how I have to formulate the rule to avoid the
NullPointerException while inserting the fact?
Thank you in advance for your help.
Best regards
Sebastian Furth
15 years, 11 months
HumanTask Process
by ramram
Hi All,
I was working on the Human Task Life cycle by adding the delegate to the
drools-process-task. I have once question how we can move the process from
the "Ready" state to the "Reserved" state. If someone can help it would be
great.
Regards,
Ram
--
View this message in context: http://n3.nabble.com/HumanTask-Process-tp683271p683271.html
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 11 months
Drools - Query Problem
by Nilima R
Dear All,
I have created simple rule file and created model in that rule file only
package com.sample
import java.lang.String;
declare Rating
rate : int
band : String
name : String
end
query "employee with band E"
ratg : Rating(band == "EBand")
end
rule "for E band"
when
r : Rating( rate == 1)
then
r.setBand("EBand");
System.out.println( "in E band" );
end
rule "for D band"
when
r : Rating( rate == 2)
then
r.setBand("EBand");
System.out.println( "in E band" );
end
rule "for C band"
when
r : Rating( rate == 3)
then
r.setBand("EBand");
System.out.println( "in E band" );
end
rule "for B band"
when
r : Rating( rate == 4)
then
r.setBand("EBand");
System.out.println( "in E band" );
end
At the end I want to know how many employees have got E band and so have
written query for it in the rule file .and obtained the query results as
below
FactType bandType = kbase.getFactType( "com.source", "Rating" );
QueryResults results = ksession.getQueryResults(
"employee with band E");
System.out.println( "we have " + results.size() +
"employee with band E" );
System.out.println( "employee with band E:" );
for (Iterator i = results.iterator();
i.hasNext();) {
QueryResultsRow row =
(QueryResultsRow)i.next();
Object ratg = row.get("rating");
String name = (String) bandType.get( ratg,
"name" );
System.out.println(name);
}
But am getting the result of query as 0 records.
i am inserting objects one by one ( this for testing just purpose ) to
learn how query works.
Can someone plz point out what is wrong.Its Urgent ................
Thanks in advance.
Nilu
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
15 years, 11 months