Configuring Event Handlers
Event handlers are defined by events, condition, priority, and actions. When an event is received, the corresponding event type and condition of the handler are evaluated based on the priority. When a condition is met, the corresponding actions are performed according to the event attributes. The action can update or add event attributes to the events for subsequent processing of the same event. An action invokes a function provided by a processor and must provide the parameters required by that function. After an event handler has completed its processing, event processing continues with the next applicable event handler.
A list of configured event handlers appears. For example:
![]()
You can create, delete, or modify event handlers.
- To add an event handler, enter a name for the action in the New Event Handler field, and click Create.
- To delete an event handler, click Delete next to the event handler that you want to delete.
- To modify an event handler, select the event handler that you want to modify.
If you create or modify an event handler, the event handler configuration screen appears. For example:
![]()
Fill in the following fields to configure the event handler.
Priority
- Priority for evaluating and running this event handler.
- Value—Integer in the range 1-1000; the smaller number has the higher priority
- Default—No value
Events
- List of events.
- Value—Select from the list of configured events. Use the Ctrl or Shift keys to select multiple events.
- Default—No value
Condition
- Condition that the event handler evaluates to determine whether the event handler should handle the event.
- Value—You can specify the condition as a formula, as a JavaScript program, or by one of the following values returned by the JavaScript program:
- Guidelines—If no condition is specified, true is returned as the value. If a referenced attribute does not exist in the event, the referenced attribute's value is null.
- Default—true
- Example—The following example is a condition that must be met to refill a quota:
var newBalance=<balance_BoughtQuota>+<balance_PeriodicQuota>;if(<old_balance_PeriodicQuota>==null) <old_balance_PeriodicQuota>=<balance_PeriodicQuota>;if(<old_balance_BoughtQuota>==null) <old_balance_BoughtQuota>=<balance_BoughtQuota>;return <old_balance_PeriodicQuota>+<old_balance_BoughtQuota><=0&&newBalance>0 ;Actions