[rules-dev] declare LocalEvent @role( event ) end

Edson Tirelli tirelli at post.com
Wed Nov 10 10:03:34 EST 2010


   Hi Wolfgang,

   Not sure what is the intent with that?

   Just to explain the design, the compiler differentiates two use
cases: (1) if a declare has no fields in it, it understands the user
is annotating an existing class. (2) If a declare has at least one
field, then the compiler tries to generate a new class and annotate
it.

   In case (1) above, if the compiler does not find an existing class,
it (correctly, IMO) raises an error.

   Can you please clarify?

   Thanks,
       Edson

2010/11/10 Wolfgang Laun <wolfgang.laun at gmail.com>:
> This simple declare for a new (not imported) class isn't permitted by
> the compiler, although it makes sense.
>
> Of course, it's possible to work around by adding a dummy field.
>
> But is this restriction intentional by design, to alert users when
> they misspell a class name, or forget to import a class?
>
> If not, I'll make a request to permit this.
>
> -W
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>



-- 
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com



More information about the rules-dev mailing list