Mark Proctor | 1 Aug 16:55 2011

[rules-dev] Call for Demos: RuleML2011 - 5th InternationalRule Challenge

RuleML is just around the corner and will be in Fort Lauderdale this time.

The RuleML Challenge sessions are always interesting and fun and a great way to show case your work and get noticed. So hurry up and submit now :)

If you aren't sure that your work it suitable to submit, just email me and we will be happy to discuss it with you.

Mark
On 01/08/2011 10:38, Adrian Paschke wrote:
<!--a:link {mso-style-priority:99;} span.MSOHYPERLINK {mso-style-priority:99;} a:visited {mso-style-priority:99;} span.MSOHYPERLINKFOLLOWED {mso-style-priority:99;} p.MSOPLAINTEXT {mso-style-priority:99;} li.MSOPLAINTEXT {mso-style-priority:99;} div.MSOPLAINTEXT {mso-style-priority:99;} span.NURTEXTZCHN {mso-style-priority:99;} /* Font Definitions */ <at> font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} <at> font-face {font-family:Consolas; panose-1:2 11 6 9 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:11.0pt; font-family:Calibri;} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} p.MsoPlainText, li.MsoPlainText, div.MsoPlainText {margin:0cm; margin-bottom:.0001pt; font-size:10.5pt; font-family:Consolas;} span.nurtextzchn {font-family:Consolas;} span.E-MailFormatvorlage19 {mso-style-type:personal; font-family:Calibri; color:windowtext;} span.E-MailFormatvorlage20 {mso-style-type:personal; font-family:Arial; color:navy;} span.E-MailFormatvorlage21 {mso-style-type:personal-reply; font-family:Arial; color:navy;} <at> page Section1 {size:612.0pt 792.0pt; margin:70.85pt 70.85pt 2.0cm 70.85pt;} div.Section1 {page:Section1;} -->

Latest News

 

====================================================================*

* RuleML2011 <at> BRF - 5th International Rule Challenge                 *  

* Nov 4th                                                           *

* Westin Diplomat, Ft Lauderdale, Florida                           *

* http://2011.ruleml.org/america/?page_id=126                       *

====================================================================*

* Call for Demos - Submission Deadline - Sept. 2nd, 2011            *

* New categories in the Challenge with prestigious prizes           *

* Demo papers published as CEUR proceedings                         *

* 15% RuleML2011 <at> BRF Partner discounts - see registration page      *

* http://2011.ruleml.org/america/                                   *

* http://www.businessrulesforum.com/register.php                    *

*********************************************************************

 

Overview and Aim

======================================================

 

The RuleML2011 <at> BRF Challenge is one of the highlights at RuleML2011 <at> BRF

Conference.The RuleML2011 <at> BRF Challenge is dedicated to practical experiences

with rule-oriented applications. In particular, submissions of benchmarks

/ evaluations, demos, case studies / use cases, experience reports, best

practice solutions (e.g. design patterns, reference architectures, models),

rule-based implementations / tools / applications, demonstrations of

engineering methods, implementations of rule standards (e.g. RuleML, RIF,

SBVR, PRR, rule-based Event Processing languages, BPMN+rules, BPEL+rules,

...), rules + industrial standards (e.g. XBRL, MISMO, Accord, ...), and

industrial problem statements are particularly encouraged.

 

 

Key themes of the RuleML2011 <at> BRF Challenge include the following:

* Demos related to the RuleML2011 <at> BRF Track Topics

* Extensions and implementations of rule standards: W3C RIF, RuleML,

   SBVR, ...

* Editing environments and IDEs for Web rules

* Benchmarks and comparison results for rule engines

* Distributed rule bases and rule services

* Reports on industrial experience about rule systems

 

A dedicated track of RuleML2011 <at> BRF Challenge will be focused on the theme:

 

**Combining Rules, Objects, and Ontologies: Implementations and Applications**

- Loose/tight integrations of rules and knowledge bases

- Knowledge Modelling and Reasoning

- Real cases and practical experiences

 

Ideally, demos submitted to the Challenge track should tackle knowledge-rich

domain problems. The proposed solution should address such problem using a

combination of rule-based modelling and semantic knowledge-based modelling.

Solutions ranging from loosely coupled hybrid systems (i.e. where different

frameworks are put together), to unified homogeneous architectures (i.e. where

a unified model / semantics, within a single framework, is proposed) will be

of great interest for the special track.

 

Prizes will be awarded to the two best applications from the main focus theme

and for the all categories. All accepted demos will be presented in a special

Challenge Session.

 

Submission

======================================================

 

The submission is composed of two parts:

- open-source or commercial demo

- demo papers describing research, implementation, and technical details of

   your submission.

 

Submissions to the Rules Challenge 2011 consist of a demo paper of 4-8 pages,

describing the demo show case, and a link to the demo/show case, e.g. a

project site, an online demonstration, a presentation about the demonstration,

or a download site for the demonstration.

 

Demo and papers submission website:

https://www.easychair.org/conferences/?conf=ruleml2011challenge

 

Please upload all demo papers submissions as PDF files in LNCS format

(http://www.springer.de/comp/lncs/authors.html).

To ensure high quality, submitted papers will be carefully peer-reviewed

according to the evaluation criteria indicated below.

 

To better disseminate your work, please also udpate your demo in the systems

submission website with a brief abstract presentation:

http://2011.ruleml.org/america/?page_id=184

 

Challenge Evaluation Criteria

======================================================

 

Submissions to the RuleML2011 <at> BRF Challenge general Track will be evaluated

according to the following criteria:

- clear exposition of the objectives, outcomes, benefits for going beyond the

  state of the art in the application domain (25%)

- demos should demonstrate a good level of effectiveness to manage complex

  rules according to statistical/analytical/benchmarking evaluations (25%)

- demos have to demonstrate the results with a concrete example balancing

  conciseness and completeness (25%)

- demos should preferably (but not necessarily) be embedded into a web-based

  or distributed environment (15%)

- demos should pay attention to end-user interactions, providing an adequate

  and usable interface that favors a concrete usage of the application (10%).

 

Submissions focused on this year's special theme (Knowledge-Based Applications

combining Rules and Ontologies) should show the potential and benefits of

combining rule-based reasoning and taxonomic/frame/description-logic reasoning

in a realistic application. Demos submitted to the Special Theme will be

evaluated according to the following criteria:

 

- papers should clearly expose the objectives, outcomes, benefits for going

  beyond the state of the art in the application domain (20%)

- demos should demonstrate a good level of integration or interaction between

  rules and ontologies (40%)

- demos should demonstrate their results with a simple but meaningful case

  study, balancing conciseness and completeness (20%)

- demos should preferably be deployed in a web-based or distributed

  environment where multiple nodes exchange information (10%)

- demos should pay attention to end-user interactions, providing an adequate

  and usable interface that favors a concrete usage of the application (10%).

 

Proceedings

======================================================

 

Authors are invited to submit original contributions of practical relevance

and technical rigor in the field, benchmarks, evaluations, experience reports

and show/use case demonstrations of effective, practical, deployable

rule-based technologies or applications in web-distributed environments.

Papers must be in English.

Accepted papers will be published as CEUR Workshop Proceedings.

 

Exhibition Room

======================================================

 

The RuleML2011 <at> BRF Chairs are currently evaluating the possibility to have an

exhibition space where to present the demo live to the participants throughout

the Symposium.

More information will be released with the notification of acceptance of the

demo papers and demo systems.

 

Important Dates

======================================================

Submission deadline for demo papers and demo systems: Sept. 2nd, 2011

Notification of accepted demo papers and demo systems: Sept. 23rd, 2011

Camera ready papers: Sept. 30th, 2011

 

 

RuleML2011 <at> BRF Challenge Chairs

======================================================

Stefano Bragaglia, University of Bologna, Italy

Marco Montali, KRDB, Free University of Bozen-Bolzano, Italy

Charles Petrie, Stanford University, USA

Mark Proctor, Red Hat, UK



_______________________________________________ rules-users mailing list rules-users <at> lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Mark Proctor | 1 Aug 18:32 2011

[rules-dev] 5.3 beta N&N

Don't forget to update the N&N with any work you've done for 5.3. 
Geoffrey will be releasing within a few days.

Mark

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Michael Anstis | 1 Aug 20:08 2011
Picon

[rules-dev] Guvnor documentation

Guvnor's documentation has been restructured, with coverage expanded (admittedly to a number of "TODO" items).

Anybody fancy taking a look and checking it builds OK - git status shows everything's committed, but confirmation from someone would be good :)

Feel free to complete any of the "TODO" sections over time too ;)

Cheers,

Mike

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Geoffrey De Smet | 2 Aug 09:22 2011
Picon

Re: [rules-dev] Guvnor documentation



Op 01-08-11 20:08, Michael Anstis schreef:
Guvnor's documentation has been restructured, with coverage expanded (admittedly to a number of "TODO" items).

Anybody fancy taking a look and checking it builds OK - git status shows everything's committed, but confirmation from someone would be good :)
Hudson builds it too (hudson builds with -Dfull).

Most people don't know that you can read that latest manual online too, so here's a howto:

Just go to the guvnor job on the public hudson mirror:
  https://hudson.jboss.org/hudson/view/Drools%20jBPM/job/guvnor/
click on "last succesful artifacts" and you come here:
  https://hudson.jboss.org/hudson/view/Drools%20jBPM/job/guvnor/lastSuccessfulBuild/artifact/
and following the single_html there, you get the manual here:
  https://hudson.jboss.org/jenkins/view/Drools%20jBPM/job/guvnor/lastSuccessfulBuild/artifact/guvnor-docs/target/docbook/publish/en-US/html_single/index.html


Feel free to complete any of the "TODO" sections over time too ;)

Cheers,

Mike

_______________________________________________ rules-dev mailing list rules-dev <at> lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-dev

-- With kind regards, Geoffrey De Smet
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Mark Proctor | 2 Aug 23:17 2011

[rules-dev] Fwd: Press Release: Call to Relieve Constraints on AI



-------- Original Message --------

Press Release: Call to Relieve Constraints on AI

PRESS RELEASE

Forward this message to a friend








The Need to Relieve Constraints on Artificial Intelligence

Addressed at Rules Fest 2011

Veteran AI Leaders Paul Haley and Said Tabet Slated to Address Developers



San Francisco, CA, August 2, 2011– Organizers today posted the abstracts for keynote speakers for Rules Fest 2011, the International Conference on Reasoning Technologies, a conference by developers for developers scheduled for the San Francisco Bay Area this October 2011.

In a session titled “Roadmap for Rules, Semantics, and Business,” Paul Haley, who has been working to commercialize artificial intelligence for more than three decades, says understanding the requirements for semantic technology in enterprise vs. the capabilities of rules engines exposes the need for more classic artificial intelligence and reasoning in our technology, more emphasis on knowledge than rules in our services, and more emphasis on knowledge technology strategy in the executive suite. Haley will discuss the challenge that while semantic technology is inevitably mainstream, it remains largely divorced from the activity of knowledge engineering as practiced using business rule engines embedded within business process management or complex event processing systems.

Semantic technology encodes meanings separately from data and content files, and separately from application code. This enables machines as well as people to understand, share and reason with them at execution time. Semantic technologies make it easy to add, change and implement new relationships or interconnecting programs in a different way. For example, a context-aware, semantically-enabled system is able to distinguish terms that are labeled differently but have the same meaning, as well as terms that share the same label but have entirely different meanings.

Cloud trust, information governance, risk management, and compliance, distributed systems, mobile applications all offer a unique opportunity to realize the true potential of knowledge technology. These systems are usually covered by service level agreements that are rules-based.

Dr. Tabet’s discussion, “Semantic Technologies and the Cloud: Rules for the Next Generation,” addresses the major challenges in information management while the business environment also witnesses the drastic shift to cloud computing. Dr. Tabet will address the trend of constraining artificial intelligence and knowledge technologies in legacy environments, and says enterprise knowledge management needs strong semantic technologies, powerful inferencing systems, and advanced machine learning capabilities – not more sophisticated spreadsheets. Dr. Tabet was a co-founder of the RuleML Initiative in 2000, involved in artificial intelligence and its applications for well over a decade. He recently refocused his efforts on RuleML and Business Rules, XML, RDF and the Semantic Web as well as deductive reasoning in financial services.

Rules Fest, hosted by the non-profit Rules Fest Association, is a technical conference geared toward software developers, engineers, programmers and architects who create solutions to complex computing problems using reasoning technologies: rule-engines, logical reasoners, constraint-solvers, and other such building-blocks of practical artificial intelligence (AI). More than 200 developers, engineers, programmers, and architects
from around the globe are expected to attend the conference in Burlingame, California.

The conference will also feature a Career Center to address the war for developer talent in technology companies. Companies seeking advanced programming talent are invited to submit their open positions for posting at no charge.

Conference Fee and Package Pricing
The standard fee for the conference is $499.  All bootcamps – addressing specific programming challenges and technologies -- are $299. For a limited time, Rules Fest organizers are offering an early bird rate of $1249 including an all-access conference pass, four nights at the Hyatt Regency Burlingame, a boot camp of choice, and 10% off from next year’s conference. This “early bird” rate is available until September 30. Early discounts are also available for general admission and for bootcamps without a hotel stay. To register, attendees should visit the conference registration site on the conference website.

About Rules Fest
The non-profit Rules Fest™ Association, Inc. produces the annual Rules Fest conference, the world's only technical conference devoted to the practical application of all reasoning technologies.

For a better understanding of reasoning systems, visit http://en.wikipedia.org/wiki/Reasoning_System.

© Copyright 2011. All rights reserved. Rules Fest is a trademark of Rules Fest Association.

For information, contact info <at> rulesfest.org
Media contact:   brenda <at> visionartscommunications.com


 


Click to view this email in a browser

If you no longer wish to receive these emails, please reply to this message with "Unsubscribe" in the subject line or simply click on the following link: Unsubscribe
Rules Fest Association, Inc.
4616 W. Sahara Ave #379
Las Vegas, NV 89102
US

Read the VerticalResponse marketing policy.

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Mark Proctor | 7 Aug 08:06 2011

[rules-dev] Hilog support for query literals

Hilog supports something called "generic programs". You can think of these as query literals you can pass around and call, bit like function literals.

Because Hilog is untyped it uses a separate parenthesis to allow query literals to be passed:
http://www.cs.sunysb.edu/~warren/xsbbook/node46.html
"... snip .... closure(R)(X,Y) :- R(X,Y). closure(R)(X,Y) :- R(X,Z), closure(R)(Z,Y). Now given any binary relation, one can use use this definition to compute its closure. For example, we can define a binary predicate, parent as follows: :- hilog parent. parent(able,adam). parent(able,eve). parent(cain,adam). parent(cain,eve). etc and then we can use the generic definition of closure to find anscestors: | ?- clo ... snip ...." We could supprt this if we added generics to our query literals, probably something like: query closure( Query<String, String> q, String x, String y ) q( x, y ) or ( q( x, z ) and q(z, y) ) end Anyway something worth thinking on, when we start to look at function literal support in Drools, we should probably address the two at the same time. Mark

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Mark Proctor | 7 Aug 11:29 2011

[rules-dev] Declarative Agenda

I just got a first cut working for "declarative agenda". The idea here 
is rules can control which rule can or cannot fire. Because this is 
highly experimental it is off by default and users must explicitely 
enable it, it will stay this way until we are happy with the solution. 
My hope is that it will provide a more declarative approach to execution 
control; which will enable more readable and maintainable rules compared 
to using magic salience values and in some circumstances control objects..

         KnowledgeBaseConfiguration kconf = 
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
         kconf.setOption( DeclarativeAgendaOption.ENABLED );
         KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase( 
kconf );

The basic idea is:
-All matched rule's Activations are inserted into WorkingMemory as 
facts. So you can now match against an Activation the rules metadata and 
declarations are available as -fields on the Activation object.
-You can use the kcontext.block( $a ) for the current rule to block the 
selected activation. Only when that rule becomes false will the 
activation be elegible for firing. If it is already elebible for firing 
and is later blocked, it will be removed from the agenda until it is 
unblocked.
-An activation may have multiple blockers, all blockers must became 
false, so they are removed to enable the activation to fire
-kcontext.unblockAll( $a ) is an over-ride rule that will remove all 
blockers regardless
- <at> activationListener('direct') allows a rule to fire as soon as it's 
matched, this is to be used for rules that block/unblock activations, it 
is not desirable for these rules to have side effects that impact else 
where. The name may change later, this is actually part of the pluggable 
terminal node handlers I made, which is an "internal" feature for the 
moment.

I should be committing this later today, and will send a follow up email 
once it hits HEAD, but here is a unit test. It uses a control role to 
stop all rules with metadata declaring the rules to be in the "sales" 
department. Only when that control rule becomes false can they fire.

package org.domain.test
import org.drools.runtime.rule.Activation
global java.util.List list
dialect 'mvel'

rule rule1  <at> department('sales')
when
      $s : String( this == 'go1' )
then
     list.add( kcontext.rule.name + ':' + $s );
end
rule rule2  <at> department('sales')
when
      $s : String( this == 'go1' )
then
     list.add( kcontext.rule.name + ':' + $s );
end
rule rule3  <at> department('sales')
when
      $s : String( this == 'go1' )
then
     list.add( kcontext.rule.name + ':' + $s );
end
rule blockerAllSalesRules  <at> activationListener('direct')
when
      $s : String( this == 'go2' )
      $i : Activation( department == 'sales' )
then
     list.add( $i.rule.name + ':' + $s  );
     kcontext.block( $i );
end

KnowledgeBaseConfiguration kconf = 
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
kconf.setOption( DeclarativeAgendaOption.ENABLED );
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase( kconf );
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
List list = new ArrayList();
ksession.setGlobal( "list", list);
ksession.insert(  "go1" );
FactHandle go2 = ksession.insert(  "go2" );
ksession.fireAllRules();
assertEquals( 3, list.size() ); // none of the rules 1-3 fire, as they 
are blocked.
assertTrue( list.contains( "rule1:go2" ));
assertTrue( list.contains( "rule2:go2" ));
assertTrue( list.contains( "rule3:go2" ));

list.clear();

ksession.retract( go2 ); // the blocker rule is nolonger true, so rules 
1-3 can now fire.
ksession.fireAllRules();

assertEquals( 3, list.size() );
assertTrue( list.contains( "rule1:go1" ));
assertTrue( list.contains( "rule2:go1" ));
assertTrue( list.contains( "rule3:go1" ));

ksession.dispose();

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Mauricio Salatino | 8 Aug 00:15 2011
Picon

Re: [rules-dev] Declarative Agenda

Hi man, I didn't have the time to review the code of this feature but I'm really interested to understand how you are achieving this:

"
-All matched rule's Activations are inserted into WorkingMemory as
facts. 
"
How are you getting the newly created activation and inserting it inside the working memory? Are you wrapping the real Activation Object or creating a new representation of it?  I want to understand how you are managing the information and if you create a hook to do that to be able to copy the same mechanism and apply it for processes.

Cheers.



On Sun, Aug 7, 2011 at 6:29 AM, Mark Proctor <mproctor <at> codehaus.org> wrote:
I just got a first cut working for "declarative agenda". The idea here
is rules can control which rule can or cannot fire. Because this is
highly experimental it is off by default and users must explicitely
enable it, it will stay this way until we are happy with the solution.
My hope is that it will provide a more declarative approach to execution
control; which will enable more readable and maintainable rules compared
to using magic salience values and in some circumstances control objects..

        KnowledgeBaseConfiguration kconf =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
        kconf.setOption( DeclarativeAgendaOption.ENABLED );
        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(
kconf );

The basic idea is:
-All matched rule's Activations are inserted into WorkingMemory as
facts. So you can now match against an Activation the rules metadata and
declarations are available as -fields on the Activation object.
-You can use the kcontext.block( $a ) for the current rule to block the
selected activation. Only when that rule becomes false will the
activation be elegible for firing. If it is already elebible for firing
and is later blocked, it will be removed from the agenda until it is
unblocked.
-An activation may have multiple blockers, all blockers must became
false, so they are removed to enable the activation to fire
-kcontext.unblockAll( $a ) is an over-ride rule that will remove all
blockers regardless
- <at> activationListener('direct') allows a rule to fire as soon as it's
matched, this is to be used for rules that block/unblock activations, it
is not desirable for these rules to have side effects that impact else
where. The name may change later, this is actually part of the pluggable
terminal node handlers I made, which is an "internal" feature for the
moment.

I should be committing this later today, and will send a follow up email
once it hits HEAD, but here is a unit test. It uses a control role to
stop all rules with metadata declaring the rules to be in the "sales"
department. Only when that control rule becomes false can they fire.

package org.domain.test
import org.drools.runtime.rule.Activation
global java.util.List list
dialect 'mvel'

rule rule1 <at> department('sales')
when
     $s : String( this == 'go1' )
then
    list.add( kcontext.rule.name + ':' + $s );
end
rule rule2 <at> department('sales')
when
     $s : String( this == 'go1' )
then
    list.add( kcontext.rule.name + ':' + $s );
end
rule rule3 <at> department('sales')
when
     $s : String( this == 'go1' )
then
    list.add( kcontext.rule.name + ':' + $s );
end
rule blockerAllSalesRules <at> activationListener('direct')
when
     $s : String( this == 'go2' )
     $i : Activation( department == 'sales' )
then
    list.add( $i.rule.name + ':' + $s  );
    kcontext.block( $i );
end

KnowledgeBaseConfiguration kconf =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
kconf.setOption( DeclarativeAgendaOption.ENABLED );
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase( kconf );
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
List list = new ArrayList();
ksession.setGlobal( "list", list);
ksession.insert(  "go1" );
FactHandle go2 = ksession.insert(  "go2" );
ksession.fireAllRules();
assertEquals( 3, list.size() ); // none of the rules 1-3 fire, as they
are blocked.
assertTrue( list.contains( "rule1:go2" ));
assertTrue( list.contains( "rule2:go2" ));
assertTrue( list.contains( "rule3:go2" ));

list.clear();

ksession.retract( go2 ); // the blocker rule is nolonger true, so rules
1-3 can now fire.
ksession.fireAllRules();

assertEquals( 3, list.size() );
assertTrue( list.contains( "rule1:go1" ));
assertTrue( list.contains( "rule2:go1" ));
assertTrue( list.contains( "rule3:go1" ));

ksession.dispose();








_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev



--
 - CTO <at> http://www.plugtree.com 
 - MyJourney <at> http://salaboy.wordpress.com
 - Co-Founder <at> http://www.jbug.com.ar
 
 - Salatino "Salaboy" Mauricio -
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Mark Proctor | 8 Aug 08:21 2011

Re: [rules-dev] Declarative Agenda

The work is now committed and extensively unit tested here, which should how to use it. Notice the test at the end, so you can reason on the number of active and inactive activations:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/integrationtests/DeclarativeAgendaTest.java

I'm just doing the N&N update and then we should be good to beta1

Mark
On 07/08/2011 23:15, Mauricio Salatino wrote:
Hi man, I didn't have the time to review the code of this feature but I'm really interested to understand how you are achieving this:
"
-All matched rule's Activations are inserted into WorkingMemory as
facts. 
"
How are you getting the newly created activation and inserting it inside the working memory? Are you wrapping the real Activation Object or creating a new representation of it?  I want to understand how you are managing the information and if you create a hook to do that to be able to copy the same mechanism and apply it for processes.

Cheers.



On Sun, Aug 7, 2011 at 6:29 AM, Mark Proctor <mproctor <at> codehaus.org> wrote:
I just got a first cut working for "declarative agenda". The idea here
is rules can control which rule can or cannot fire. Because this is
highly experimental it is off by default and users must explicitely
enable it, it will stay this way until we are happy with the solution.
My hope is that it will provide a more declarative approach to execution
control; which will enable more readable and maintainable rules compared
to using magic salience values and in some circumstances control objects..

        KnowledgeBaseConfiguration kconf =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
        kconf.setOption( DeclarativeAgendaOption.ENABLED );
        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(
kconf );

The basic idea is:
-All matched rule's Activations are inserted into WorkingMemory as
facts. So you can now match against an Activation the rules metadata and
declarations are available as -fields on the Activation object.
-You can use the kcontext.block( $a ) for the current rule to block the
selected activation. Only when that rule becomes false will the
activation be elegible for firing. If it is already elebible for firing
and is later blocked, it will be removed from the agenda until it is
unblocked.
-An activation may have multiple blockers, all blockers must became
false, so they are removed to enable the activation to fire
-kcontext.unblockAll( $a ) is an over-ride rule that will remove all
blockers regardless
- <at> activationListener('direct') allows a rule to fire as soon as it's
matched, this is to be used for rules that block/unblock activations, it
is not desirable for these rules to have side effects that impact else
where. The name may change later, this is actually part of the pluggable
terminal node handlers I made, which is an "internal" feature for the
moment.

I should be committing this later today, and will send a follow up email
once it hits HEAD, but here is a unit test. It uses a control role to
stop all rules with metadata declaring the rules to be in the "sales"
department. Only when that control rule becomes false can they fire.

package org.domain.test
import org.drools.runtime.rule.Activation
global java.util.List list
dialect 'mvel'

rule rule1 <at> department('sales')
when
     $s : String( this == 'go1' )
then
    list.add( kcontext.rule.name + ':' + $s );
end
rule rule2 <at> department('sales')
when
     $s : String( this == 'go1' )
then
    list.add( kcontext.rule.name + ':' + $s );
end
rule rule3 <at> department('sales')
when
     $s : String( this == 'go1' )
then
    list.add( kcontext.rule.name + ':' + $s );
end
rule blockerAllSalesRules <at> activationListener('direct')
when
     $s : String( this == 'go2' )
     $i : Activation( department == 'sales' )
then
    list.add( $i.rule.name + ':' + $s  );
    kcontext.block( $i );
end

KnowledgeBaseConfiguration kconf =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
kconf.setOption( DeclarativeAgendaOption.ENABLED );
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase( kconf );
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
List list = new ArrayList();
ksession.setGlobal( "list", list);
ksession.insert(  "go1" );
FactHandle go2 = ksession.insert(  "go2" );
ksession.fireAllRules();
assertEquals( 3, list.size() ); // none of the rules 1-3 fire, as they
are blocked.
assertTrue( list.contains( "rule1:go2" ));
assertTrue( list.contains( "rule2:go2" ));
assertTrue( list.contains( "rule3:go2" ));

list.clear();

ksession.retract( go2 ); // the blocker rule is nolonger true, so rules
1-3 can now fire.
ksession.fireAllRules();

assertEquals( 3, list.size() );
assertTrue( list.contains( "rule1:go1" ));
assertTrue( list.contains( "rule2:go1" ));
assertTrue( list.contains( "rule3:go1" ));

ksession.dispose();








_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev



--
 - CTO <at> http://www.plugtree.com 
 - MyJourney <at> http://salaboy.wordpress.com
 - Co-Founder <at> http://www.jbug.com.ar
 
 - Salatino "Salaboy" Mauricio -


_______________________________________________ rules-dev mailing list rules-dev <at> lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-dev

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Geoffrey De Smet | 9 Aug 14:24 2011
Picon

[rules-dev] Drools 5.3.0.Beta1 released (expert, fusion, planner, guvnor)

Hi guys,

We're happy to announce the release of Drools (Expert, Fusion, Planner, 
Guvnor) 5.3.0.Beta1.
   http://blog.athico.com/2011/08/drools-530beta1-released-including.html

--

-- 
With kind regards,
Geoffrey De Smet

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev


Gmane