[rules-users] The buss pass example of inference results in compilation errors, how to solve these?

Wolfgang Laun wolfgang.laun at gmail.com
Wed Mar 20 03:16:34 EDT 2013


On 20/03/2013, ajklunder2 <albert.jan.klunder at gmail.com> wrote:
> Hi,
>
> In the Drools documentation is "the buss pass" example of how to use
> inference.
>
> rule "Infer Adult"
> when
>   $p : Person( age >= 18 )
> then
>   insert( new IsAdult( $p ) )
> end
>
> However, when I try this myself I get compilation errors on IsAdult and a
> missing ";" after the insert statement. (I am using the Drools plugin in
> Eclipse)

Only when using dialect "mvel" is a semicolon added to the end of a line.
(An ill-advised feature - it may produce syntax errors even with perfectly fine
statemente sequences.)

-W


More information about the rules-users mailing list