[rules-users] functions inside fact type declaration?
Edson Tirelli
tirelli at post.com
Mon Aug 9 22:03:19 EDT 2010
Hehe, ok, you convinced me Greg! ;)
https://jira.jboss.org/browse/JBRULES-2652
Edson
2010/8/9 Greg Barton <greg_barton at yahoo.com>
> +1 on the full constructor.
>
> GreG
>
> On Aug 9, 2010, at 3:58 PM, Edson Tirelli <tirelli at post.com> wrote:
>
> I thought about adding that, but I feel like we would just be
> reimplementing java, in this case. So, if you need anything else other than
> simple java beans, you should implement it as a java class.
>
> Regarding the constructor, I might still add a constructor that
> receives all fields as parameters, just to reduce verbosity when using the
> java dialect, but if you are using mvel dialect, you can use "with":
>
> rule ...
> when ...
> then
> with( person = new Person() ) {
> name = "Bob",
> age = 35
> }
> insert( person );
> end
>
> Edson
>
> 2010/8/9 Tina Vießmann < <tviessmann at stud.hs-bremen.de>
> tviessmann at stud.hs-bremen.de>
>
>> Hi,
>>
>> is it possible to define a function/constructor inside a fact type
>> declaration? If yes, how can it be done?
>>
>> Thank you :)
>> Tina
>> _______________________________________________
>> rules-users mailing list
>> <rules-users at lists.jboss.org>rules-users at lists.jboss.org
>> <https://lists.jboss.org/mailman/listinfo/rules-users>
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100809/3a38a842/attachment.html
More information about the rules-users
mailing list