Hi Frank and Wolfgang,
Looks right. Are you using the latest codes or 5.2.0.M1? The latest codes in git are not
working properly.
If you get the same result with any of the the Drools release jars please open a Jira and
I will take a look.
"Gaps" is not something a verifier would detect. It does
not try to
"understand" your rules. What do you expect?
The verifier can actually find some gaps from rule sets. For example uncovered checks for
number values.
If you have
Person( age <18 )
it gives a warning that you might want to cover Person( age >= 18 ).
Toni Rikkola
On Mar 15, 2011, at 11:58 AM, Wolfgang Laun wrote:
> 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(a)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-tp268...
> Sent from the Drools - User mailing list archive at
Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users