![]() |
![]() |
[ Bottom of Page | Previous Page | Next Page | Contents | Index ]
The following example shows the general structure of a plain rule:
rule: rule_name: (
description: 'description_text',
directive: directives,
event: event_filter
where [
attribute_conditions
],
action: action_name: (
action_body
)
).
rule: print_reset :(
event: _event of_class 'Printer_Error_Cleared'
where [
status: equals 'OPEN' ,
hostname: _hostname
] ,
reception_action:(
all_instances(event: _prt_ev of_class
within ['Printer_Paper_Out',
'Printer_Toner_Low',
'Printer_Offline',
'Printer_Output_Full',
'Printer_Paper_Jam',
'Printer_Door_Open'
]
where [hostname: equals _hostname,
status: outside ['CLOSED']
],
_event - 3600 - 3600 ),
change_event_status( _prt_ev, 'CLOSED' ),
drop_received_event
)
).rule: print_assist : (
event: _event of_class
within ['Printer_Paper_Out',
'Printer_Toner_Low',
'Printer_Offline',
'Printer_Output_Full',
'Printer_Paper_Jam',
'Printer_Door_Open'
]
where [
status: _status equals 'OPEN' ,
hostname: _hostname,
msg: _msg
] ,
reception_action:(
set_timer(_event, 90, '')
)
).
[ Top of Page | Previous Page | Next Page | Contents | Index ]