[rules-users] Drools verifier

Wolfgang Laun wolfgang.laun at gmail.com
Tue Mar 15 05:58:00 EDT 2011


Try a rule with an empty consequence. (rule x when Object() then end).

The .DRL file must compile for the Verifier to do its task.
Duplicate rules (rule names) do not compile.

"Gaps" is not something a verifier would detect. It does not try to
"understand" your rules. What do you expect?

-W


On 15 March 2011 09:21, FrankVhh <frank.vanhoenshoven at agserv.eu> wrote:

> Hi all,
>
> Triggered by a post on this forum, I decided to try a testcase
> implementation of Drool Verifiier.
>
> I manage to write some code that does not produce any errors at runtime,
> which is good. Unfortunately, it doesn't produce any errors/warnings/notes
> on my rulefile either, which isn't good.
>
> The drl file consists of some duplicate rules, and since the file is only
> part of a ruleset, there might be some gaps as well.
>
> I pasted the java-code below. Does anyone see where I am going wrong?
>
> Thanks in advance!
>
> Regards,
> Frank
>
>                VerifierBuilder vBuilder =
> VerifierBuilderFactory.newVerifierBuilder();
>
>                Verifier verifier = vBuilder.newVerifier();
>
>                String ruleText  =
>
> "C:\\Users\\Frank\\Documents\\DroolsWorkSpaces\\EmpiricalExperiments\\Financial
> Rules\\src\\main\\rules\\clearancerules.drl";
>                verifier.addResourcesToVerify(
> ResourceFactory.newReaderResource(
> new StringReader( ruleText ) ), ResourceType.DRL );
>
>                verifier.fireAnalysis();
>
>                VerifierReport result = verifier.getResult();
>
>                for(VerifierMessageBase base: result.getBySeverity(
> Severity.ERROR ) ){
>                    System.out.println( base );
>                }
>                for(VerifierMessageBase base: result.getBySeverity(
> Severity.WARNING ) ){
>                    System.out.println( base );
>                }
>                for(VerifierMessageBase base: result.getBySeverity(
> Severity.NOTE )
> ){
>                    System.out.println( base );
>                }
>
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/Drools-verifier-tp2681002p2681002.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110315/0be00633/attachment.html 


More information about the rules-users mailing list