Unfortunately this appears to be a problem with 5.2.
There is an additional space in "phoneTypeCode .tc" which should read
"phoneTypecode.tc".
I have confirmed this does not happen in 5.4.CR1 (and possibly earlier):-
1.|rule "r2"2.| dialect "mvel"3.| when4.| Phone( $ac :
areaCode, $tc : ptc.tc)5.| Phone( areaCode == $ac , ptc.tc != $tc )6.
| then7.|end
On 2 April 2012 16:15, arup <arup4u2007(a)gmail.com> wrote:
Thanks againg for replying so quickly.
1. view source:
#created on: Mar 27, 2012
2. |
3. | #list any import classes here.
4. |
5. | import com.gpm.domain.*;
6. | import com.gpm.rules.vo.*;
7. |
8. |
9. | #declare any global variables here
10. | global DataDifferenceVO dataDifferenceVO;
11. |
12. |
13. | rule "Phone_AreaCode_Rule"
14. | when
15. | Phone( $areaCode1 : areaCode, $tc1 : phoneTypeCode .tc )
16. | Phone( areaCode == $areaCode1 , phoneTypeCode .tc != $tc1 )
17. | then
18. |
dataDifferenceVO.getDataDiffArray().add("Party/Phone/AreaCode");
19. | end
2. guvnor version is 5.2 final
3. actual class:
public class Phone {
@XmlElement(name = "PhoneKey")
protected String phoneKey;
@XmlElement(name = "PhoneTypeCode")
protected PhoneTypeCode phoneTypeCode;
@XmlElement(name = "AreaCode")
protected String areaCode;
@XmlElement(name = "DialNumber")
protected String dialNumber;
@XmlElement(name = "Ext")
protected String ext;
.
.
.
}
public class PhoneTypeCode {
@XmlValue
protected String value;
@XmlAttribute
protected String tc;
...}
--
View this message in context:
http://drools.46999.n3.nabble.com/drl-problem-tp3877814p3877957.html
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users