On 16/05/2012, Joe Ammann <joe(a)pyx.ch> 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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users