[rules-users] Drools objects' methods
Hello, In the documentation, it is written (4.8.2.1.1): A Field constraint specifies a restriction to be used on a named field A bit further: A field is derived from an accessible method of the object. If your model objects follow the Java Bean pattern, then fields are exposed using getXXX or isXXX methods, where these methods take no arguments, and return something. Within patterns, fields can be accessed using the bean naming convention... Is this mean that we have no access to our Objects' method ? (excepting get or is) Is there a way to get around this ? Thank you in advance. Regards, Benoît _ Consultez vos emails Orange, Gmail, Yahoo!, Free ... directement depuis HOTMAIL ! http://www.windowslive.fr/hotmail/agregation/___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools objects' methods
you can use the eval() CE for execute methods and functions. eval(myObject.myMethod()); This requiere that myMethod() returns a boolean value. If not you can always compare things inside eval and return a boolean value eval( myObject.myMethod() 5) 2010/4/2 Bertrand Grottier b_grott...@hotmail.com Hello, In the documentation, it is written (4.8.2.1.1): A Field constraint specifies a restriction to be used on a named field A bit further: A field is derived from an accessible method of the object. If your model objects follow the Java Bean pattern, then fields are exposed using getXXX or isXXX methods, where these methods take no arguments, and return something. Within patterns, fields can be accessed using the bean naming convention... Is this mean that we have no access to our Objects' method ? (excepting get or is) Is there a way to get around this ? Thank you in advance. Regards, Benoît -- Hotmail débarque sur votre téléphone ! Paramétrez Hotmail sur votre téléphone! Gratuit ! http://www.messengersurvotremobile.com/?d=Hotmail ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- - http://salaboy.wordpress.com - http://www.jbug.com.ar - Salatino Salaboy Mauricio - ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools objects' methods
Use an eval() statement. --- On Fri, 4/2/10, Bertrand Grottier b_grott...@hotmail.com wrote: From: Bertrand Grottier b_grott...@hotmail.com Subject: [rules-users] Drools objects' methods To: rules-users@lists.jboss.org Date: Friday, April 2, 2010, 10:34 AM Hello, In the documentation, it is written (4.8.2.1.1): A Field constraint specifies a restriction to be used on a named field A bit further: A field is derived from an accessible method of the object. If your model objects follow the Java Bean pattern, then fields are exposed using getXXX or isXXX methods, where these methods take no arguments, and return something. Within patterns, fields can be accessed using the bean naming convention... Is this mean that we have no access to our Objects' method ? (excepting get or is) Is there a way to get around this ? Thank you in advance. Regards, Benoît Hotmail débarque sur votre téléphone ! Paramétrez Hotmail sur votre téléphone! Gratuit ! -Inline Attachment Follows- ___ 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