#created on: Dec 3, 2009 package com.sample #list any import classes here. # default dialect for the semantic code will be MVEL dialect "mvel" #declare any global variables here declare DatarReading @role( event ) end declare FollowUpReading @role( event ) end /* rule "readings" when $reading : DatarReading($val: value) then System.err.println("reading value: " + $val); end rule "follow up readings" when $fur: FollowUpReading($val: value) then System.err.println("follow up reading value: " + $val); end */ rule "Your Second Rule" duration( 6s ) when //$bo : BuyOrderEvent( $id : id ) //$ae : AckEvent( id == $id, this after[0,10s] $bo ) $dr : DatarReading($val : value) from entry-point "readings stream" not($fur: FollowUpReading(value == $val, this after[0s,2s] $dr ) from entry-point "readings stream") then System.err.println("did not receive follow up - reading value: " + $val); end