[rules-users] Guided Rule Editor doesn't list no-setter-fields if a fact is annotated

Mark Proctor mproctor at codehaus.org
Mon Dec 19 11:11:23 EST 2011


On 19/12/2011 16:04, Michael Anstis wrote:
> You are not mistaken.
>
> For POJO models we use reflection (class.getMethods) to determine 
> whether a Type's methods members are available in the LHS or RHS or 
> both, according to Java Bean conventions. Declarative models have 
> their members available in both the LHS and RHS by default as we 
> generate "getters" and "setters" for them.
It probably looks like we should support only getters though, for 
existing beans. We just need to be intelligent enough not to allow the 
setter to be used in the IDE.

Toshiya: Sounds like a great introduction task, you up for the challenge?

Mark
>
> On 19 December 2011 05:47, Toshiya Kobayashi <tkobayas at redhat.com 
> <mailto:tkobayas at redhat.com>> wrote:
>
>     Hello,
>
>     In Guvnor 5.3.0, I can use CEP feature support in Guided Rule
>     Editor after uploading a class by "Upload POJO Model jar" and
>     annotating it in "New Declarable Mode".
>
>     1.      |       declare TestPojo
>     2.      |           @role(value = event)
>     3.      |       end
>
>     But if some fields of the POJO class have only getter methods,
>     Guided Rule Editor won't list those fields in "Modify constraints"
>     popup. (if a field has a setter method, it will be listed)
>
>     public class TestPojo {
>            private String name;
>            public TestPojo() {}
>            public String getName() { return name; }
>     //      public void setName(String name) { this.name
>     <http://this.name> = name; }
>     }
>
>     Am I missing something? If it's not an expected behaviour, I will
>     raise a JIRA.
>
>     Cheers,
>     Toshiya
>     _______________________________________________
>     rules-users mailing list
>     rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
>     https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20111219/5b1807c1/attachment.html 


More information about the rules-users mailing list