[rules-users] Inheritance-Like Design Question

Moe Alkhafaji moe.alkhafaji at medcpu.com
Tue Mar 9 12:48:44 EST 2010


I am working on such a thing right now. Thanks for the DSL suggestion, we
are doing baby steps :) Thanks for all the suggestions and help.

On Tue, Mar 9, 2010 at 11:46 AM, Pavel Tavoda <pavel.tavoda at gmail.com>wrote:

> For this you have DSL. It's very good for end users. 80% of work will
> be done in nice predefined language which you build for them. Advanced
> features should be temporarily patched by using ">" at beginning of
> line with normal Drools syntax. Look for DSL in Drools manual. Or you
> can use excel or templates.
> What "control logic" rules are doing? Can't you deduce from some other
> object that action was done? Than you should avoid Status object.
>
> Pavel
>
> 2010/3/9 Moe Alkhafaji <moe.alkhafaji at medcpu.com>:
> > Thanks Pavel.  I was hoping for more of a transparent functionality
> > supported by Drools than have my users add those control method calls. I
> am
> > trying to make their rules as "control logic" blind as possible. But, I
> > guess they would have to do that.
> >
> > Also, any idea on re-using an object from the parent rule? What is the
> > syntax for using an object declared in the parent rule? Thanks.
> >
> > On Tue, Mar 9, 2010 at 11:25 AM, Pavel Tavoda <pavel.tavoda at gmail.com>
> > wrote:
> >>
> >> Aha, misunderstanding. Yes you can't use activation group if you want
> >> execute more children rules. However you can use fact (Status) to
> >> avoid evaluating parent rule. My suggestion:
> >>
> >> Rule DEFAULT
> >> salience -100
> >> if A and ! Status(done) then DEFAULT end
> >>
> >> Rule A
> >> if A and B then SOMETHINGB; update(Status(done)) end
> >>
> >> Rule B
> >> if A or B then SOMETHINGB; update(Status(done)) end
> >>
> >> Rule C
> >> if A or C then SOMETHINGC; update(Status(done)) end
> >>
> >> At beginning insert Status with e.g. "ready". It's possible to use
> >> instead of update also insert but because you can fire more children
> >> rules it will be waste of memory.
> >>
> >> Hope this help
> >>
> >> Pavel
> >> _______________________________________________
> >> rules-users mailing list
> >> rules-users at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
> >
> > --
> > Moe Alkhafaji
> > Chief Technology Officer, MedCPU
> > Phone: (630) 290-1113
> > Email: cto at medcpu.com
> >
> > This message contains information which may be confidential. Unless you
> are
> > the addressee, you may not use, copy or disclose to anyone the message or
> > any information contained in this message. If you have received this
> email
> > in error, please notify cto at medcpu.com and please delete the message
> > immediately. In order for the contents of this message to be binding on
> > behalf of MedCPU it must be confirmed in writing by an authorized
> signatory
> > of MedCPU. Our company accepts no liability for the content of this email
> > unless it is so confirmed. The views or opinions presented herein do not
> > necessarily represent those of the company.
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
Moe Alkhafaji
Chief Technology Officer, MedCPU
Phone: (630) 290-1113
Email: cto at medcpu.com

This message contains information which may be confidential. Unless you are
the addressee, you may not use, copy or disclose to anyone the message or
any information contained in this message. If you have received this email
in error, please notify cto at medcpu.com and please delete the message
immediately. In order for the contents of this message to be binding on
behalf of MedCPU it must be confirmed in writing by an authorized signatory
of MedCPU. Our company accepts no liability for the content of this email
unless it is so confirmed. The views or opinions presented herein do not
necessarily represent those of the company.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100309/4b768608/attachment.html 


More information about the rules-users mailing list