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

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Thu Sep 6 11:16:11 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBRULES-1169?page=all ]

Edson Tirelli reassigned JBRULES-1169:
--------------------------------------

    Assignee: Edson Tirelli  (was: Mark Proctor)

> 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