drop_new/0—drop a new event object
The syntax for drop_new/0 is as follows:
drop_new()
Use the drop_new/0 to drop the newly received event, being processed in a new rule.
drop_new/0 example
new close_portal_state_change_due_to_blackout: PORTAL_PARAMETER_STATE_CHANGE_BLACKOUT ($BO_EV)
updates PORTAL_PARAMETER_STATE_CHANGE ($CLOSE_EV) where
[
$CLOSE_EV.status != CLOSED
AND $CLOSE_EV.CLASS within [PORTAL_PARAMETER_STATE_CHANGE, PORTAL_PARAMETER_STATE_CHANGE_OFFLINE]
]
{
$CLOSE_EV.status = CLOSED;
$STR = concat( ['CLOSURE_REASON: ', $BO_EV.msg] );
opadd($CLOSE_EV, 'EVENT_CLOSED', $STR);
ntadd($CLOSE_EV, $STR);
drop_new;
}
END
updates PORTAL_PARAMETER_STATE_CHANGE ($CLOSE_EV) where
[
$CLOSE_EV.status != CLOSED
AND $CLOSE_EV.CLASS within [PORTAL_PARAMETER_STATE_CHANGE, PORTAL_PARAMETER_STATE_CHANGE_OFFLINE]
]
{
$CLOSE_EV.status = CLOSED;
$STR = concat( ['CLOSURE_REASON: ', $BO_EV.msg] );
opadd($CLOSE_EV, 'EVENT_CLOSED', $STR);
ntadd($CLOSE_EV, $STR);
drop_new;
}
END
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*