Re: [rules-users] Somewhat strange question: Rules without a RHS

2012-05-16 Thread Wolfgang Laun
On 16/05/2012, Joe Ammann  wrote:
> On 05/16/2012 09:06 AM, Wolfgang Laun wrote:

>> The first rule is called "No action - possibly commented out".
> Had a look at this and I think this will be the way for me: Implement my
> own set of verifier rules. It still don't quite understand how I would
> "plug" these rules into Guvnor, but I guess I'll just have to do some
> source reading :-)
>

Start a new thread with this Q and I'm sure Michael will be able to provide
more a hint or two... ;-)
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Somewhat strange question: Rules without a RHS

2012-05-16 Thread Joe Ammann
On 05/16/2012 09:06 AM, Wolfgang Laun wrote:
> On 16/05/2012, Joe Ammann  wrote:
>> On 05/15/2012 07:24 PM, Wolfgang Laun wrote:
>>> Assuming you can get hold of the resulting DRL text, a simple script
>>> might detect rules where there is nothing between "then" and "end".
>> I have currently implemented something similar. A REST client that
>> periodically scans the BRLs in certain Guvnor packages and fills out
>> missing RHS. Problem is that the users try to test their broken rules
>> faster than this script can fix them :-/
> You can easily design your DSL/DSLR in such a way that the expanded text is
> jinxed, to be rectified by your scanning script. That way, they won't be
> able to exec without some Joe's blessing ;-)
:-) I like this!
>
>> I was looking for exactly that: an option to replace or inject custom
>> extensions to what you refer to as "Guvnor's validator". But I must
>> admit that I was not able to find any pointer to this in the doc or
>> the Guvnor source. Can you point me to the place in the Guvnor source
>> where that validation actually happens? I might then be able to
>> develop some ideas. 
> There's drools-verifier-5.4.0.Beta2-sources.jar in Expert's sources. Look at
>org/drools/verifier/Consequence.drl
>
> The first rule is called "No action - possibly commented out".
Had a look at this and I think this will be the way for me: Implement my
own set of verifier rules. It still don't quite understand how I would
"plug" these rules into Guvnor, but I guess I'll just have to do some
source reading :-)

-- 
CU, Joe

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Somewhat strange question: Rules without a RHS

2012-05-16 Thread Wolfgang Laun
On 16/05/2012, Joe Ammann  wrote:
> On 05/15/2012 07:24 PM, Wolfgang Laun wrote:
>> Assuming you can get hold of the resulting DRL text, a simple script
>> might detect rules where there is nothing between "then" and "end".
> I have currently implemented something similar. A REST client that
> periodically scans the BRLs in certain Guvnor packages and fills out
> missing RHS. Problem is that the users try to test their broken rules
> faster than this script can fix them :-/

You can easily design your DSL/DSLR in such a way that the expanded text is
jinxed, to be rectified by your scanning script. That way, they won't be
able to exec without some Joe's blessing ;-)

>>
>> Otherwise, following the techniques used in the Guvnor's validator,
>> you can investigate the consequence text and use heuristics to
>> detect the bad ones.
> I was looking for exactly that: an option to replace or inject custom
> extensions to what you refer to as "Guvnor's validator". But I must
> admit that I was not able to find any pointer to this in the doc or the
> Guvnor source. Can you point me to the place in the Guvnor source where
> that validation actually happens? I might then be able to develop some
> ideas.

There's drools-verifier-5.4.0.Beta2-sources.jar in Expert's sources. Look at
   org/drools/verifier/Consequence.drl

The first rule is called "No action - possibly commented out".

-W

>
> --
> CU, Joe
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Somewhat strange question: Rules without a RHS

2012-05-15 Thread Joe Ammann
On 05/15/2012 07:24 PM, Wolfgang Laun wrote:
> Assuming you can get hold of the resulting DRL text, a simple script
> might detect rules where there is nothing between "then" and "end".
I have currently implemented something similar. A REST client that
periodically scans the BRLs in certain Guvnor packages and fills out
missing RHS. Problem is that the users try to test their broken rules
faster than this script can fix them :-/
>
> Otherwise, following the techniques used in the Guvnor's validator,
> you can investigate the consequence text and use heuristics to
> detect the bad ones.
I was looking for exactly that: an option to replace or inject custom
extensions to what you refer to as "Guvnor's validator". But I must
admit that I was not able to find any pointer to this in the doc or the
Guvnor source. Can you point me to the place in the Guvnor source where
that validation actually happens? I might then be able to develop some
ideas.

-- 
CU, Joe

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Somewhat strange question: Rules without a RHS

2012-05-15 Thread Wolfgang Laun
Assuming you can get hold of the resulting DRL text, a simple script
might detect rules where there is nothing between "then" and "end".

Otherwise, following the techniques used in the Guvnor's validator,
you can investigate the consequence text and use heuristics to
detect the bad ones.

-W


On 15 May 2012 18:28, Joe Ammann  wrote:

> Hi all
>
> I have an ongoing discussion with my users: They have been using several
> home-grown rule oriented applications for years. Almost all of these
> "rule engines" were built for one very specific reason, and the users
> have come accustomed to just specify a LHS of a rule. They never needed
> to specify a RHS, because the action of the rule was pre-determined by
> the application. So when the rule fired, it was clear what needed to be
> done in the application.
>
> Now want to merge all these "rule engines" onto Drools (5.4.0), and use
> the Guvnor BRL editor and DSLs to actually formulate them. Of course now
> Drools can not "know" what the RHS is supposed to be, since we have
> "merged" several applications. The users now need to select one of
> several predefined DSL statements as the RHS, but unfortunately they
> consistenly keep forgetting to put an RHS at all. Guvnor validates this
> successfully but of course the rules then fail to work.
>
> I have been thinking if there is any way in Guvnor or via some kind of
> Drools expert mechanism to say something like "if a rule is in packaga
> a.b.c, it's RHS should always be 'foo' unless specified otherwise". To
> be honest, I could not come up with a way to achieve this and think just
> need to educate my users better. But before doing that, I thought I'd
> use the wisdom of this group :-)
>
> --
> CU, Joe
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Somewhat strange question: Rules without a RHS

2012-05-15 Thread Joe Ammann
Hi all

I have an ongoing discussion with my users: They have been using several
home-grown rule oriented applications for years. Almost all of these
"rule engines" were built for one very specific reason, and the users
have come accustomed to just specify a LHS of a rule. They never needed
to specify a RHS, because the action of the rule was pre-determined by
the application. So when the rule fired, it was clear what needed to be
done in the application.

Now want to merge all these "rule engines" onto Drools (5.4.0), and use
the Guvnor BRL editor and DSLs to actually formulate them. Of course now
Drools can not "know" what the RHS is supposed to be, since we have
"merged" several applications. The users now need to select one of
several predefined DSL statements as the RHS, but unfortunately they
consistenly keep forgetting to put an RHS at all. Guvnor validates this
successfully but of course the rules then fail to work.

I have been thinking if there is any way in Guvnor or via some kind of
Drools expert mechanism to say something like "if a rule is in packaga
a.b.c, it's RHS should always be 'foo' unless specified otherwise". To
be honest, I could not come up with a way to achieve this and think just
need to educate my users better. But before doing that, I thought I'd
use the wisdom of this group :-)

-- 
CU, Joe

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users