I'm newbie to the Drools. Here i'm trying to generate a notification if a process is running for longer than some time - let's say 5 minutes.
To achieve the above I'm writing the following code in DRL file. But it doesn't seem to be working.
drl file
declare Message
@role(event)
end
rule "RULE 3"
when
$message: Message(msgtext == "1st message") over window:time( 5m ) from entry-point entryone
then
System.out.println("RULE 3 (after 5 min of message event started): " + $message.getMsgtext());
end
In the above .drl
file I have an event named Message
declared. The rule is checking whether msgtext
is 1st message
and it is running for 5 minutes - if that's the case, I have to generate a notification. In this example I'm just printing the result.
Thanks in advance. I appreciate your help.