Configurator Events

An event is an identifiable action or condition that happens in a model during a run time configuration session, such a change in the value of a node. Events have names, such as postValueChange.

Event Binding

Event binding connects a method in an extension rule to a configurator event. An extension rule must have at least one event binding.

At run time, Configurator detects and reacts to configurator events using objects called listeners, which are registered to listen for (meaning detect) the occurrence of specified events. You don't explicitly specify listeners when you use extension rules. When you create an event binding for an extension rule, Configurator registers the appropriate listener for the specified event.

If an event happens during a run time configuration session, and there are bindings for that event with that scope in any extension rules in the model, then Configurator runs all the bound methods for that event.

The events that you can bind to a extension rule are predefined for Configurator, and are described elsewhere in this topic. When you define an extension rule, you select one of these events as part of the binding of a method in your extension rule text.

Event Binding Scope

Event binding scope is the scope in which the configurator event in an event binding is evaluated. An event binding always has a binding scope.

When defining an event binding, you bind events within a certain scope. This event binding scope tells listeners that are registered for the event where in the run time model tree to listen for an occurrence of that event. The following table describes the scopes for event binding.

Event Binding Scope

Effect

Base Node

The extension rule is executed only for the base node.

Event Descriptions

An extension rule must always be bound to one of the following predefined events.

Event

Description

postConfigInit

Event dispatched immediately after initializing a new or restored configuration session. You can use this event to set values in your model as soon as an end user starts configuring the model.

postConfigSave

Event dispatched immediately after a configuration is saved. You can use this event to set the values in your model whenever an end user saves changes to the configuration of the model.

postValueChange

Event dispatched immediately after the value of a node is changed. You can use this event to set the values in your model whenever an end user changes the value or selection of the node associated to the event explicitly or by rules.

preAutoComplete

Event dispatched immediately before the autocompletion process runs. The autocompletion process is triggered by clicking Finish or Finish and Review in the configurator UI, at run time. You can use this event to set the values in your model before an end user reviews the configuration, or saves the configuration and finishes the configuration session.