[rules-users] Using GUVNOR for FUSION RULES
Matteo Cusmai
cusmaimatteo at gmail.com
Thu Apr 26 04:08:46 EDT 2012
Hi all,
i am novice on GUVNOR, but i would like to define my fusion rules by
graphical tool.
An example of my rules is:
rule "radiation-event"
salience 10
no-loop
when
$obs : RadiationObservation( $obsLocation : location, value > 10
) over window:length(1) from entry-point lowLevelSensorStream
not RadiationEvent( this meets[ 25s ] $obs, location
geoIsWithinDistance[ 5m ] $obsLocation )
then
insert(new RadiationEvent( $obs, "Radiation over 10",
Event.THREAT_HIGH, $obsLocation, $obs.getSensor() ));
end
rule "radiation-update"
salience 5
no-loop
when
$obs : RadiationObservation( $obsLocation : location, value > 10
) over window:length(1) from entry-point lowLevelSensorStream
$event : RadiationEvent( this meets[ 25s ] $obs, location
geoIsWithinDistance[ 5m ] $obsLocation )
then
Event e = Event.clone($event);
e.addObservation($obs);
insert( e );
retract($event);
retract($obs);
end
Is it possibile to define rules such the above using GUVNOR?
Are there some documentation or tutorial?
Thanks a lot in advance,
Matteo Cusmai.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120426/2006d48f/attachment.html
More information about the rules-users
mailing list