[rules-users] FW: Capitalized element names

Edson Tirelli ed.tirelli at gmail.com
Tue Jul 26 21:09:36 EDT 2011


   If one works and the other doesn't, then we have a problem. It must work
if you make the first letter lowercase, as that is part of the javabeans
spec.

   Feel free to open a JIRA and we will take a look at it.

   Edson

2011/7/26 <Tom.E.Murphy at wellsfargo.com>

> Thanks Edson, however here is more info on the issue as I’ve been playing
> with it:****
>
> **1.       **I have other elements in other objects referenced within the
> same rule group that start with capital letters and they have no problem.
> Example:****
>
> , FHAMaxBaseMortgageWithToleranceAmt <
> ($totalLoanAmt+$aggregateSubordinateFinancingAmt)****
>
> Compiles just fine in the same session.****
>
> **2.       **If I lower the first M to m to make it
> mICompanyMarketClassification, it compiles in 5.2 but does NOT compile in
> 5.0.1****
>
> **3.       **If I leave it as the capitalized
> MICompanyMarketClassification, it compiles in 5.0.1 but not 5.2****
>
> Thoughts?****
>
> *Tom Murphy*
>
> Systems Architect
> Wells Fargo HCFG - CORE Deal Decisioning Platform
>
>
>
> 800 S. Jordan Creek Parkway | West Des Moines, IA 50266
> MAC: X2301-01B*
> *Office: 515 324 4853 | Mobile: 515 423 4334
>
> tom.e.murphy at wellsfargo.com
>
> This transmission may contain information that is confidential and/or
> proprietary. If you are not the individual or entity to which it is
> addressed, note that any review, disclosure, copying, retransmission, or
> other use is strictly prohibited. If you received this transmission in
> error, please notify the sender immediately and delete the material from
> your system.****
>
> ** **
>
> ** **
>
> *From:* rules-users-bounces at lists.jboss.org [mailto:
> rules-users-bounces at lists.jboss.org] *On Behalf Of *Edson Tirelli
> *Sent:* Tuesday, July 26, 2011 7:45 PM
> *To:* Rules Users List
> *Subject:* Re: [rules-users] Capitalized element names****
>
> ** **
>
> ** **
>
>    Hi Tom,****
>
> ** **
>
>    I've seen this before and AFAIK, the javaBeans spec always transforms
> the first letter to lowercase when converting a get method into a property
> name. We can try to address this in future releases, maybe falling back to
> uppercase if the lower case property name lookup fails, but I don't think
> there is a solution to keep it as is. In 5.2. you can use the full method
> name instead, but not sure if that isn't event worse:****
>
> ** **
>
>                 MortageInsurance{ getMICompanyMarketClassification() in
> (“2”, “3”) }****
>
> ** **
>
>      Edson****
>
> ** **
>
> 2011/7/26 <Tom.E.Murphy at wellsfargo.com>****
>
> In the following rule, the element MICompanyMarketClassification is
> capitalized due to the MI portion being an acronym for Mortgage Insurance.
> ****
>
> This comes from our enterprise data model and is not something I can
> change.****
>
>  ****
>
> rule “R1234”****
>
>         dialect “java”****
>
>         when****
>
>                 MortageInsurance{ MICompanyMarketClassification in (“2”,
> “3”) }****
>
>         then ****
>
>                 system.out.printLn(“something”);****
>
> end****
>
>  ****
>
> The rule refuses to compile, giving a message “Unable to Analyse Expression
> MICompanyMarketClassification == "2" || MICompanyMarketClassification ==
> "3":****
>
> [Error: no such identifier: MICompanyMarketClassification]****
>
> [Near : {... MICompanyMarketClassification ....}]”****
>
>  ****
>
> I assume this is caused by the capitalized first letter?****
>
> Anything I can do to fix the issue or work around it?****
>
>  ****
>
> Drools 5.2 community edition****
>
> *Tom Murphy
>
> *Systems Architect
> Wells Fargo HCFG - CORE Deal Decisioning Platform
>
>
>
> 800 S. Jordan Creek Parkway | West Des Moines, IA 50266
> MAC: X2301-01B
> Office: 515 324 4853 | Mobile: 515 423 4334
>
> tom.e.murphy at wellsfargo.com
>
> This transmission may contain information that is confidential and/or
> proprietary. If you are not the individual or entity to which it is
> addressed, note that any review, disclosure, copying, retransmission, or
> other use is strictly prohibited. If you received this transmission in
> error, please notify the sender immediately and delete the material from
> your system.****
>
>  ****
>
>  ****
>
>  ****
>
>  ****
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110726/2a1b44fc/attachment.html 


More information about the rules-users mailing list