Re: [rules-users] Using Character typed properties in Drool 5.3
AFAIK it fixes various regressions, but we have a reasonably complex dependency hierarchy so user-beware. sent on the move On 17 Mar 2012 01:06, "julia" wrote: > Great Will MVEL 2.1.0.drools9.jar work with guvnor5.3? > > -- > View this message in context: > http://drools.46999.n3.nabble.com/rules-users-Using-Character-typed-properties-in-Drool-5-3-tp3741968p3833621.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] Using Character typed properties in Drool 5.3
Great Will MVEL 2.1.0.drools9.jar work with guvnor5.3? -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Using-Character-typed-properties-in-Drool-5-3-tp3741968p3833621.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] Using Character typed properties in Drool 5.3
I believe Mario is also releasing another version of MVEL on Monday, but drools9 might contain fixes for Characters. sent on the move On 17 Mar 2012 00:13, "Edson Tirelli" wrote: > > Try updating to MVEL 2.1.0.drools9.jar that Mario released a few days > ago. There are many fixes in there. > > Edson > > On Fri, Mar 16, 2012 at 7:53 PM, julia wrote: > >> Edson, >> any word from Mario on how to get around this problem? >> >> We are importing a lot of POJOs with Character setters/getters. I would >> hate >> to rewrite them all to Strings just to be able to work with Guvnor. Any >> advice would be appreciated. >> >> thanks! >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/rules-users-Using-Character-typed-properties-in-Drool-5-3-tp3741968p3833523.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 >> > > > > -- > Edson Tirelli > JBoss Drools Core Development > JBoss by Red Hat @ www.jboss.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] Using Character typed properties in Drool 5.3
Try updating to MVEL 2.1.0.drools9.jar that Mario released a few days ago. There are many fixes in there. Edson On Fri, Mar 16, 2012 at 7:53 PM, julia wrote: > Edson, > any word from Mario on how to get around this problem? > > We are importing a lot of POJOs with Character setters/getters. I would > hate > to rewrite them all to Strings just to be able to work with Guvnor. Any > advice would be appreciated. > > thanks! > > -- > View this message in context: > http://drools.46999.n3.nabble.com/rules-users-Using-Character-typed-properties-in-Drool-5-3-tp3741968p3833523.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 > -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Using Character typed properties in Drool 5.3
Edson, any word from Mario on how to get around this problem? We are importing a lot of POJOs with Character setters/getters. I would hate to rewrite them all to Strings just to be able to work with Guvnor. Any advice would be appreciated. thanks! -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Using-Character-typed-properties-in-Drool-5-3-tp3741968p3833523.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] Using Character typed properties in Drool 5.3
MVEL2-2.1.0.drools4.jar (packaged with Drools 5.3 final) From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Edson Tirelli Sent: Monday, February 13, 2012 5:48 PM To: Rules Users List Subject: Re: [rules-users] Using Character typed properties in Drool 5.3 Which version of MVEL are you using? It looks like a regression. I will ping Mario to take a look. Edson On Mon, Feb 13, 2012 at 6:45 PM, Welsh, Armand mailto:awe...@statestreet.com>> wrote: Correction: Even using Character.valueOf('Y') does not work anymore in Drools 5.3. The validate works, but the compile steps fails because Drools is treating 'Y' as a String. However, in Drools 5.2 and prior, 'Y' was properly casted to a Character when the property it was being compared to was a property of type Character. If anyone has any insight on where the documentation address this change in behavior, I would appreciate some guidance. I am trying to re-standardize how our rules are coded for evaluating Character typed properties. Armand -Original Message- From: rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org> [mailto:rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org>] On Behalf Of Welsh, Armand Sent: Monday, February 13, 2012 3:16 PM To: Rules Users List Subject: [rules-users] Using Character typed properties in Drool 5.3 Community, In drools 5.2 I had the following LHS" when BloombergColumn (columnName == "CRNCY", $cur : stringValue != null) Country (currency == $cur, emergingMkt == 'Y' || countryCode in ("BH","HR","CZ","EE","HK","HU","IL","KR","KW","MO","OM","QA","SA","SG","SK","SI","TT")) I am switching to Drool 5.3, and Drools Guvnor reports the following error upon validate (or compile): [bum_code_value.currency 01] Unable to Analyse Expression emergingMkt == 'Y' || countryCode == "BH" || countryCode == "HR" || countryCode == "CZ" || countryCode == "EE" || countryCode == "HK" || countryCode == "HU" || countryCode == "IL" || countryCode == "KR" || countryCode == "KW" || countryCode == "MO" || countryCode == "OM" || countryCode == "QA" || countryCode == "SA" || countryCode == "SG" || countryCode == "SK" || countryCode == "SI" || countryCode == "TT": [Error: Comparison operation requires compatible types. Found class java.lang.Character and class java.lang.String] [Near : {... == "SK" || countryCode == "SI" || countryCode == "TT" }] ^ [Line: 7, Column: 28] Looking at the emergingMkt in my data model, I see that it is defined as a Character. If I change my LHS to: BloombergColumn (columnName == "CRNCY", $cur : stringValue != null) Country (currency == $cur, emergingMkt == Character.valueOf('Y') || countryCode in ("BH","HR","CZ","EE","HK","HU","IL","KR","KW","MO","OM","QA","SA","SG","SK","SI","TT")) Then the validate passes. Was this change in behavior intentional? I don't see a reference to this change in the Drools 5.3 documentation, and this makes for a harder to read rule for our Drools analysts. Thanks in advance, Armand ___ rules-users mailing list rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org> https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org> https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.com<http://www.jboss.com> ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Using Character typed properties in Drool 5.3
Which version of MVEL are you using? It looks like a regression. I will ping Mario to take a look. Edson On Mon, Feb 13, 2012 at 6:45 PM, Welsh, Armand wrote: > Correction: > > Even using Character.valueOf('Y') does not work anymore in Drools 5.3. > The validate works, but the compile steps fails because Drools is treating > 'Y' as a String. However, in Drools 5.2 and prior, 'Y' was properly casted > to a Character when the property it was being compared to was a property of > type Character. > > If anyone has any insight on where the documentation address this change > in behavior, I would appreciate some guidance. I am trying to > re-standardize how our rules are coded for evaluating Character typed > properties. > > Armand > > -Original Message- > From: rules-users-boun...@lists.jboss.org [mailto: > rules-users-boun...@lists.jboss.org] On Behalf Of Welsh, Armand > Sent: Monday, February 13, 2012 3:16 PM > To: Rules Users List > Subject: [rules-users] Using Character typed properties in Drool 5.3 > > Community, > > In drools 5.2 I had the following LHS" > > when >BloombergColumn (columnName == "CRNCY", $cur : stringValue != null) >Country (currency == $cur, emergingMkt == 'Y' || countryCode in > ("BH","HR","CZ","EE","HK","HU","IL","KR","KW","MO","OM","QA","SA","SG","SK","SI","TT")) > > > I am switching to Drool 5.3, and Drools Guvnor reports the following error > upon validate (or compile): > >[bum_code_value.currency 01] Unable to Analyse Expression > emergingMkt == 'Y' || countryCode == "BH" || countryCode == "HR" || > countryCode == "CZ" || countryCode == "EE" || countryCode == "HK" || > countryCode == "HU" || countryCode == "IL" || countryCode == "KR" || > countryCode == "KW" || countryCode == "MO" || countryCode == "OM" || > countryCode == "QA" || countryCode == "SA" || countryCode == "SG" || > countryCode == "SK" || countryCode == "SI" || countryCode == "TT": [Error: > Comparison operation requires compatible types. Found class > java.lang.Character and class java.lang.String] [Near : {... == "SK" || > countryCode == "SI" || countryCode == "TT" }] ^ [Line: 7, Column: 28] > > Looking at the emergingMkt in my data model, I see that it is defined as a > Character. If I change my LHS to: > >BloombergColumn (columnName == "CRNCY", $cur : stringValue != null) >Country (currency == $cur, emergingMkt == Character.valueOf('Y') || > countryCode in > ("BH","HR","CZ","EE","HK","HU","IL","KR","KW","MO","OM","QA","SA","SG","SK","SI","TT")) > > > Then the validate passes. > > Was this change in behavior intentional? I don't see a reference to this > change in the Drools 5.3 documentation, and this makes for a harder to read > rule for our Drools analysts. > > Thanks in advance, > Armand > > ___ > 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 > -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Using Character typed properties in Drool 5.3
Correction: Even using Character.valueOf('Y') does not work anymore in Drools 5.3. The validate works, but the compile steps fails because Drools is treating 'Y' as a String. However, in Drools 5.2 and prior, 'Y' was properly casted to a Character when the property it was being compared to was a property of type Character. If anyone has any insight on where the documentation address this change in behavior, I would appreciate some guidance. I am trying to re-standardize how our rules are coded for evaluating Character typed properties. Armand -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Welsh, Armand Sent: Monday, February 13, 2012 3:16 PM To: Rules Users List Subject: [rules-users] Using Character typed properties in Drool 5.3 Community, In drools 5.2 I had the following LHS" when BloombergColumn (columnName == "CRNCY", $cur : stringValue != null) Country (currency == $cur, emergingMkt == 'Y' || countryCode in ("BH","HR","CZ","EE","HK","HU","IL","KR","KW","MO","OM","QA","SA","SG","SK","SI","TT")) I am switching to Drool 5.3, and Drools Guvnor reports the following error upon validate (or compile): [bum_code_value.currency 01] Unable to Analyse Expression emergingMkt == 'Y' || countryCode == "BH" || countryCode == "HR" || countryCode == "CZ" || countryCode == "EE" || countryCode == "HK" || countryCode == "HU" || countryCode == "IL" || countryCode == "KR" || countryCode == "KW" || countryCode == "MO" || countryCode == "OM" || countryCode == "QA" || countryCode == "SA" || countryCode == "SG" || countryCode == "SK" || countryCode == "SI" || countryCode == "TT": [Error: Comparison operation requires compatible types. Found class java.lang.Character and class java.lang.String] [Near : {... == "SK" || countryCode == "SI" || countryCode == "TT" }] ^ [Line: 7, Column: 28] Looking at the emergingMkt in my data model, I see that it is defined as a Character. If I change my LHS to: BloombergColumn (columnName == "CRNCY", $cur : stringValue != null) Country (currency == $cur, emergingMkt == Character.valueOf('Y') || countryCode in ("BH","HR","CZ","EE","HK","HU","IL","KR","KW","MO","OM","QA","SA","SG","SK","SI","TT")) Then the validate passes. Was this change in behavior intentional? I don't see a reference to this change in the Drools 5.3 documentation, and this makes for a harder to read rule for our Drools analysts. Thanks in advance, Armand ___ 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
[rules-users] Using Character typed properties in Drool 5.3
Community, In drools 5.2 I had the following LHS" when BloombergColumn (columnName == "CRNCY", $cur : stringValue != null) Country (currency == $cur, emergingMkt == 'Y' || countryCode in ("BH","HR","CZ","EE","HK","HU","IL","KR","KW","MO","OM","QA","SA","SG","SK","SI","TT")) I am switching to Drool 5.3, and Drools Guvnor reports the following error upon validate (or compile): [bum_code_value.currency 01] Unable to Analyse Expression emergingMkt == 'Y' || countryCode == "BH" || countryCode == "HR" || countryCode == "CZ" || countryCode == "EE" || countryCode == "HK" || countryCode == "HU" || countryCode == "IL" || countryCode == "KR" || countryCode == "KW" || countryCode == "MO" || countryCode == "OM" || countryCode == "QA" || countryCode == "SA" || countryCode == "SG" || countryCode == "SK" || countryCode == "SI" || countryCode == "TT": [Error: Comparison operation requires compatible types. Found class java.lang.Character and class java.lang.String] [Near : {... == "SK" || countryCode == "SI" || countryCode == "TT" }] ^ [Line: 7, Column: 28] Looking at the emergingMkt in my data model, I see that it is defined as a Character. If I change my LHS to: BloombergColumn (columnName == "CRNCY", $cur : stringValue != null) Country (currency == $cur, emergingMkt == Character.valueOf('Y') || countryCode in ("BH","HR","CZ","EE","HK","HU","IL","KR","KW","MO","OM","QA","SA","SG","SK","SI","TT")) Then the validate passes. Was this change in behavior intentional? I don't see a reference to this change in the Drools 5.3 documentation, and this makes for a harder to read rule for our Drools analysts. Thanks in advance, Armand ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users