In RC2 (at least, can't remember RC1), you can use any method that returns a
parameter (and takes no arguments).
eg Person(runSomeMethod == "blah)
assuming Person.runSomeMethod() exists.
and please take a look at drools-examples when you can.
On 4/15/06, Mark Proctor <[EMAIL PROTECTED]> wrote:
>
> SomeObject so =3D new SomeObject();
> if (MyEngine.staticMethod1(arg1, arg2) &&
> (new MyObject(param1, param2)).isConditionTrue() &&
> so.getString().startsWith("a"))
>
>
> I don't know where arg1, arg2, param1 and param2 come from; I need to
> know that before I can show you this in DRL. However what you have there
> will be very difficult to optimise; most of it will go into Evals, which
> will not provide better performance over 2.x
>
> Mark
>
> Dmitry Goldenberg wrote:
> > The issue may not necessarily be the particular language constructs as
> > much as having enough samples and best practices to infer how to get
> > stuff done. This is especially true for a Java developer who is a
> > novice to the wonderful world of rules :) I don't mind the learning
> > curve as long as there are enough tools in the toolbox for me to get my
> > job done.
> >
> > For example, how do I express the following logic through DRL? -
> >
> > SomeObject so =3D new SomeObject();
> > if (MyEngine.staticMethod1(arg1, arg2) &&
> > (new MyObject(param1, param2)).isConditionTrue() &&
> > so.getString().startsWith("a"))
> >
> > I've gathered that
> > customer : Customer( subscription =3D=3D "Silver" )
> > is equivalent to
> > Customer customer =3D new Customer();
> > if (customer.getSubscription().equals("Silver")) { ...
> >
> > But how do I deal with static method invokations, passing parameters
> > into constructors, and invoking methods other than getters?
> >
> > Thank you,
> > - Dmitry
> >
> >
>
>