Try OpenEdge Now
skip to main content
BPM Events User's Guide
Administering and operating BPM Events : The rule development cycle : Loading rules
 

Loading rules

When loading (or installing) a rule module that imports other modules, all the imported modules are loaded, recursively, prior to the initial module. The initialize{} section of a module is automatically executed once the loading phase is over. This section performs initial tasks, like creating and initializing infopads. The syntax that specifies these actions is the same as the syntax of the action part of rules.
It is important to use infopad names that does not match with existing infopads. In BPM Events, you are responsible for creating infopads that are unique across applications. Indeed, infopads are sharable across applications. For example, two cases of infopad name collision follow, along with the behavior of the engine:
*Assume an application A1 is currently loaded and creates an infopad "mypad". If a new application A2 loads and creates an infopad with the same name, then the previous infopad in A1 is replaced by the new version, both in memory and in database, and the previous version is lost.
*Assume an application A1 is currently loaded and creates an infopad "mypad", and this application does not discard this infopad in its finalize{} section, that is, has no discard (mypad) statement. If this application unloads and reloads, then it attempts to recreate an infopad already created (both in memory and in database). In such a case, the previous version is deleted (both in memory and in database), and the loading enforces the creation and initialization of the new version of the infopad.
Loading is subject to failure due to these initial actions. For example, the creation of a persistent infopad, completed when executing the initialize{} section, fails due to a database server connection problem. In such a case, the failure is considered serious enough to cause loading interruption.
Normally, an aborted loading should not affect the consistency of BPM Events. In case the internal state of BPM Events is considered undesirable, it is recommended to run the command setupBPMEvents -c state or setupOEBPS -c bpmevents (if you have Business Process Server) otherwise the corrupt backup state is discarded. Note, however, that in the current version it is not possible to isolate the backup of one application from other applications loaded in the server: All are discarded at once.
* Loading rules using Business Process Portal's Administration module
* Loading rules using BPM Events Admin