Skip to end of metadata
Go to start of metadata

Dynamic event channels is the mechanism for selectively controlling event channels through the arrival of events on other control channels.

This functionality relies on an annotation @id(ID) that associates a (unique within the group) name with an event channel. Once we have a way to refer to a specific channel, we can use events arriving on control channelsto affect the named channel(s). There are quite a few natural things we can do. We can permanently stop listed channels by using a@stop(IDLIST) annotation on a control channel. We also can pause and resume detection of events on channels with @pause(IDLIST) and @resume(IDLIST) on control channels. A paused event channel ignores any events that would have matched the paused reaction. Finally, a channel can start in a paused state (denoted by the @paused annotation), in which case, it will take an event arrival on a control @resume(IDLIST)channel to unpause the initially paused channel. Here is an example rules/reloaded/or_paused.prova demonstrating the described functionality. Obviously, we cannot show all combination here but the ProvaMetadataTest.java included in the Prova code runs an extensive suite of tests demonstrating a large number of situations.

The above example outputs:

Note that the pair of logins from 30.30.30.30 followed by 40.40.40.40 is not the pattern as detection of further logins is initially paused until an 'update' event is detected.

Labels: