[rules-dev] To match or not to match...

Wolfgang Laun wolfgang.laun at gmail.com
Wed Apr 27 12:56:54 EDT 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20110427/e12e396a/attachment.html 


More information about the rules-dev mailing list