[rules-users] Implementing Refraction with Drools

Mark Proctor mproctor at codehaus.org
Tue Jan 22 11:25:56 EST 2013


> Unfortunately, I'm afraid your proposal doesn't scale as well as impacting
> performance and
> expected behaviour negatively

W3C RIF have tried to document refraction and repeatability. 
http://www.w3.org/2005/rules/wiki/PRD_Refraction_Repeatability

Under that definition drools already has refraction, what we don't have is repeatability control. 

What you've done is more like hard coding repeatability=false. Also as davide mentions, it's not an efficient implementation.

As Drools implements a modify-in-place we know whether an activation was created or modified when it reaches the RTN. It can be cheaply filtered (ignored) there, we just need to add an attribute to be able to control this behaviour per rule.

One reason why I haven't done this, is I believe the concept can be extended further to give more control. There is a concept of rising and falling edges. I prefer the idea of allowing or disallowing activations based on these edges.
was true, still true
was false, is true
was true, is false

We also more recently added property reactive, which provides powerful control for choosing what you do or do not react.

I have always found the definition of refraction hard. My understanding of the OPS5 definition was similar to your interpretation, which is a hard coding of repetability=false. I believe some of the confusion comes from the fact that OPS5 was list based, it didn't have objects and slots.

Mark

On 22 Jan 2013, at 04:45, Davide Sottara <dsotty at gmail.com> wrote:

> Recently, Esteban covered the topic quite extensively, you can start from
> there:
> 
> http://ilesteban.wordpress.com/2012/11/16/about-drools-and-infinite-execution-loops/
> 
> Best
> Davide
> 
> Unfortunately, I'm afraid your proposal doesn't scale as well as impacting
> performance and
> expected behavior negatively
> 
> 
> 
> --
> View this message in context: http://drools.46999.n3.nabble.com/Implementing-Refraction-with-Drools-tp4021705p4021706.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list