Annotations and guards are useful for any general purpose rules. Messaging and reaction rules are no exception. rules/reloaded/guard.prova now contains an additional example that shows how annotations and guards can be used to detect sequential event patterns. First, let's look at the client.
:- eval(client()). client() :- % Send all the test messages from a separate thread switch_thread(), sendMsg(XID,task,0,request,login(user1,'10.10.10.10')), % Wait synchronously, could have waited asynchronously instead java.lang.Thread.sleep(500L),