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

Rule compiling

You may create rules in three ways:
*With the Rule Editor (included only in the Business Process Server platform).
*With the Rule Wizard.
*With any text editor.
Rules are saved as a text file (also referred to as a rule module) and are associated with an application environment, that is, must be stored under an application folder. For example, assuming the application name is appName, you must store the rules for this application under:
The main rule module for the application is named appName_rules.bps.
After a rule module is compiled, there should also be a file with the extension *.bpo under the same folder.
If you use the Business Process Server RuleEditor to generate the text version of a rule module, then it automatically compiles the rules for you and generates the BPO file. If you use any other text editor, then you must compile the rules yourself. To do this, open the OEBPS_HOME\bin folder and run the utility:

RuleCompiler.cmd (on Windows) (on UNIX)
You may compile rules in one of the three following ways. Note that the rule modules compiled must be stored under an application rule folder (OEBPS_HOME\ebmsapps\appName\rules).
*Compile the main module of your application (here, appName_rules), and all the directly or indirectly imported modules, regardless of their previous status (some may have been compiled before (that is, have *.bpo files), some may not). Note that this command does not compile the independent modules (if any) that do not have an import relationship with the main rule module of the application. The compile command is:
RuleCompiler -a appName
*Compile a single module and all the modules it imports. The compile command must use the option -m, and requires giving the qualified name of the module. The general syntax of this command is:
RuleCompiler -m <appname>::<modulename>
For example,
RuleCompiler -m appName::mymoduleA
*Compile all rule files under an application rule folder:
RuleCompiler -a appName -all.
Note: Module names and file names are case sensitive.
Note: If your application uses the BP Server API library of BPM Events,then compile with the -blapi_lib option or import the BP ServerAPI::BP ServerAPI_rules module into your application by using the following command:
import BP ServerAPI::BP ServerAPI_rules;