The following is (hrrmph) difficult to understand. It was produced with a
very recent build of droolsjbpm/master.
rule "articles of a customer"
when
$c: Customer( 150 <= custid <= 250 )
$a: Article( $a1: artid, $a2: artname, custid == $c.getCustid() || == 3
)
then
System.out.println( "Customer " + $c.getCustid() );
System.out.println( " Article " + $a.getArtid() + " " +
$a.getArtname()
+ " by " + $a.getCustid() );
end
Customer 3
Article 300 micro by 3
Customer 2
Article 300 micro by 3
Customer 1
Article 300 micro by 3
Customer 2
Article 300 speakers by 2
Customer 1
Article 200 mouse by 1
Customer 1
Article 100 keyboard by 1
-W