[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1169) PredicateConstraint and/or MVEL Constraint issue?

Mark Proctor (JIRA) jira-events at lists.jboss.org
Wed Sep 12 20:42:12 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBRULES-1169?page=comments#action_12376514 ] 
            
Mark Proctor commented on JBRULES-1169:
---------------------------------------

if you can send us a self contained example of the rules, we will try and fix in our engine - you don't need to fix this yourself. Its really important we nail all bugs down, and we need the help of the community for this. If you can't supply us with a working exampe, we'll have to reject this JIRA :(

> PredicateConstraint and/or MVEL Constraint issue?
> -------------------------------------------------
>
>                 Key: JBRULES-1169
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-1169
>             Project: JBoss Rules
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 4.0.1
>            Reporter: Yuri de Wit
>         Assigned To: Edson Tirelli
>            Priority: Critical
>             Fix For: 4.0.2
>
>
> Consider the following rules:
> rule (1)
>    when
>       a: Criteria(
>          $criteriaA : criteriaA,
>          $criteriaB : criteriaB
>       )
>       b: Criteria(
>          matchCriteriaA == true && criteriaA == $criteriaA
>             || matchCriteriaB == true && criteriaB == $criteriaB
>       )
>    then
>       ...
> end
> rule (2)
>    when
>       a: Criteria(
>          $criteriaA : criteriaA,
>          $criteriaB : criteriaB 
>       )
>       b: Criteria(
>          eval(
>             matchCriteriaA == true && criteriaA == $criteriaA
>                || matchCriteriaB == true && criteriaB == $criteriaB
>          )
>       )
>    then
>       ...
> end
> I am seeing different behavior for the same test cases. I am basically inserting
>  "a" and "b" with matching criteriaA and criteriaB and I am testing different
> combinations of matchCriteriaA and matchCriteriaB (i.e. F/F, F/T, T/F, T/T).
> Results for rule (1):
> F/F -> rule activated (incorrect)
> T/F -> rule activated (correct)
> F/T -> rule activated (correct)
> Results for rule (2):
> F/F -> rule activated (incorrect)
> T/F -> rule activated (correct)
> F/T -> rule activated (correct)
> I also tried an eval column (now a snippet based on the actual rule I ran):
> 		eval(
> 			($t_matchDvpAccount == true && $t_accountCode == $c_accountCode) 
> 			|| ($t_matchPartialAccount == true && $t_accountCode5 == $c_accountCode5)
> 			|| ($t_matchClientAccount == true && $t_clientAccountCode == $c_accountCode)
> 			|| ($t_matchNoAccount == true)
> 		)
> And with the following data (took while debugging the evaluation):
> $t_matchClientAccount	Boolean  (id=176) value	false	
> $t_accountCode	"123450ACCT"	
> $t_matchDvpAccount	Boolean  (id=176) value	false	
> $t_matchPartialAccount	Boolean  (id=191) value	true	
> $t_clientAccountCode	"12345CACCT"	
> $c_accountCode5	"12345"	
> $t_accountCode5	"12345"	
> $t_matchNoAccount	Boolean  (id=176) value	false	
>  
> The evaluation returns false.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list