Try OpenEdge Now
skip to main content
BPM Events User's Guide
The rule language : Adding and removing rules dynamically : Dynamic loading and unloading of rule modules
 

Dynamic loading and unloading of rule modules

When installing an application through Business Process Portal Administration or BPM Events Admin, the main rule module of this application is automatically loaded. If the application has more than one rule modules under its rule folder, then those modules that are imported by the main rule module are also loaded.
It is possible, however, to add new modules for this application, separately and at any time. Similarly, these additional modules can be individually unloaded. Complete these operations using the administration utility BPM Events Admin, described in Loading rules and Unloading rules .
Note: Any module can import other module(s), and an imported module can in turn import other modules.
Loading/unloading rule modules is done according to the following principles:
*When loading a module, all imported modules are automatically loaded first. This means that their initialize{} sections execute first, before the initialize{} section of the importing module.
*When unloading a module, all imported modules automatically unload after they are imported in any other modules. This means that their finalize{} sections execute after the finalize{} section of the importing module.
*A module M2 that is imported by another module M1 cannot be unloaded separately from M1. It can only unload when M1 is unloaded.
The BPM Events Admin utility allows you to see, at any time, which current rule modules and current rules load into the engine.