Using Callback

The CA Rule Engine inference engine provides a level of interactivity beyond the standard stateful rule session using callback methods.

A callback is a client-defined method invoked by the CA Rule Engine inference engine upon the occurrence of certain events. A triggering event is specific for a particular RDL class and field and the corresponding callback method must be defined or declared in the corresponding Java wrapper class or interface and not just in any derived or implementation classes.

Callback methods are event-specific and permit the client to supplement or to react to engine processing in a just-in-time-fashion.

Currently, two types of callbacks are supported by CA Rule Engine that can be used by client application: initialization callback and change callback. Using of callbacks by client is always optional. The client determines whether to define any callback methods for both types of callbacks.

Callbacks are transparent to the rulebase author. The author can design rulebases without knowing or caring whether clients will specify handlers. Likewise, for rulebases shared by multiple clients, some clients may specify handlers and others may not.

While the client may carry out any action unrelated to rule inference in a callback handler method, only limited actions related to rule inference may be carried out in a particular type of callback method.

This section contains the following topics:

Initialization Callback Methods

Change Callback Methods