AW: [rules-users] Re: Entity-Beans with Drools 4.0.2
Guardian
d.h.j. at gmx.de
Mon Oct 22 12:02:58 EDT 2007
Oh shit - sorry thats embarrassing, thanks a lot Frank.
-----Ursprüngliche Nachricht-----
Von: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] Im Auftrag von Frank Langelage
Gesendet: Montag, 22. Oktober 2007 17:50
An: rules-users at lists.jboss.org
Betreff: [rules-users] Re: Entity-Beans with Drools 4.0.2
Guardian wrote:
> Hello,
>
> i have a problem to use entity-beans (ejb 3.0) in a DRL-file.
> If i use java-beans everything works fine, but when I use the following
rule
> with the "pruefungs"-entity object i get an exception. What is the
problem,
> can i use EJB 3.0 entitybeans with drools?
>
> My rules are the following:
>
> rule "Test Entity"
> when
> p : Pruefung( name : pruefungsName )
> then
> System.out.println( name )
> end
>
> rule "Hello World"
> when
> m : Message( status == Message.HELLO, message : message )
> then
> System.out.println( message );
> m.setMessage( "Goodbye cruel world" );
> m.setStatus( Message.GOODBYE );
> update( m );
> end
>
>
> and the exception that occurs:
>
> 12:29:31,093 INFO [STDOUT] cannot read rule file:
> /drools/rules/testRule.drl
> 12:29:31,093 ERROR [STDERR] org.drools.rule.InvalidRulePackage: Rule
> Compilation error : [Rule name=Test Entity, agendaGroup=MAIN, salience=0,
> no-loop=false]
> drools/rules/Rule_Test_Entity_0.java (8:25) : File
> drools/rules/Rule_Test_Entity_0.java, Line 8, Column 25: Expression
> "System.out.println(name)" is not a type
That has nothing to do with the type of Object.
There's simply missing the ";" at the end of the RHS line.
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
More information about the rules-users
mailing list