[rules-users] Redundancy check option not working in Drools Verifier 5.4

2012-04-25 Thread worldofprasanna
Hi All,

I tried to use Drools Verifier to validate the available rules. I got all
the warning types like MISSING_EQUALITY, ALWAYS_FALSE. But I couldn t get
the redundancy warning, eventhough i have given the duplicate rules
explicitly. 

I am using Drools Verifier 5.4.0.Final.

Herewith given the following details,

1. Sample rule file


rule "rule 1"
when
$server : Server(processors==2, memory==1024)
then
System.out.println("rule 1")
end
rule "rule 2"
when
$server : Server(processors==2, processors!=2)
then
System.out.println("rule")
end
rule "rule 3"
when
$server : Server(processors==2, memory==1024)
then
System.out.println("rule 3")
end

2. Code which verifies the validity of the rule.


VerifierBuilder vBuilder = VerifierBuilderFactory.newVerifierBuilder(); 
 
Verifier verifier = vBuilder.newVerifier();

verifier.addResourcesToVerify(new
ClassPathResource("sample.drl",
DroolsVerifierCheck.class),
ResourceType.DRL);
  
verifier.fireAnalysis();
VerifierReport result = verifier.getResult();

// To display the warnings in verifier.
Collection warningMessages =
  result.getBySeverity(Severity.WARNING);
  for (VerifierMessageBase msg : warningMessages) {
  System.out.println("Note: " + msg.getMessage() +
  " type: " + msg.getMessageType() +
  " on: " + msg.getFaulty());
  }

Problem


In the sample rule, you can find rule 1 and rule 3 are same. But I didn t
get the warning for redundancy.

Research done


When i debug the code, i found like the rule "Find redundant pattern
possibilities from rule possibilities" and "Find redundant restrictions from
pattern possibilities" are loaded into the Knowledge base created and tagged
with Agenda group as Main, but those are not present in the Knowledge
session created (I mean after inserting the objects into the Knowledge
session in the code : VerifierImpl.java). 

Also can anybody explain when a rule will be present in the knowledge base
but not selected by the agenda. I haven t modified anything in the
AgendaFilter and its given the default value ScopeAgendaFilter. 

Kindly let me know why the redundancy warning is not given in my case ?

P.S : I have gone through the post below,

http://http://drools.46999.n3.nabble.com/Drools-verifier-td2681002.html
http://drools.46999.n3.nabble.com/Drools-verifier-td2681002.html 

and at the bottom they have asked the same question, but there is no answer
available for it.

Thanks,
Prasanna.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Redundancy-check-option-not-working-in-Drools-Verifier-5-4-tp3938055p3938055.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Redundancy check option not working in Drools Verifier 5.4

2012-04-26 Thread worldofprasanna
Hi,

Still am stuck up with this problem. I couldn t verify the redundancy in my
rules using Drools Verifier. Can somebody out there help me ?

Thanks,
Prasanna.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Redundancy-check-option-not-working-in-Drools-Verifier-5-4-tp3938055p3941009.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Redundancy check option not working in Drools Verifier 5.4

2012-04-26 Thread Mark Proctor
On 26/04/2012 12:56, worldofprasanna wrote:
> Hi,
>
> Still am stuck up with this problem. I couldn t verify the redundancy in my
> rules using Drools Verifier. Can somebody out there help me ?
Only toni knows that code. If it's not  working, it's likely a bug. 
Please submit a unit test:
https://hudson.jboss.org/hudson/job/droolsjbpm-knowledge/lastSuccessfulBuild/artifact/droolsjbpm-introduction-docs/target/docbook/publish/en-US/html_single/index.html#gettingstarted

Mark
>
> Thanks,
> Prasanna.
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/Redundancy-check-option-not-working-in-Drools-Verifier-5-4-tp3938055p3941009.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> 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] Redundancy check option not working in Drools Verifier 5.4

2012-04-26 Thread worldofprasanna
Hi Mark,

Thanks for the reply. And below is the issue which i have created.

https://issues.jboss.org/browse/JBRULES-3484

Regards,
Prasanna.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Redundancy-check-option-not-working-in-Drools-Verifier-5-4-tp3938055p3943464.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users