 |
 |
|
|
|
Creating and exporting rules
ILOG Rules Builder enables you to create business
rules for use with workflows. Rule sets are
named and assigned to workflows using the Process Designer.
These rule set appear in ILOG Rules Builder
as rule packages. The individual rules are created
and added to the rule packages in ILOG Rules
Builder. The figure below shows version 1 of
a workflow repository in ILOG Rules Builder.
The workflow repository contains four rule packages
(rule sets)AfterLaunch, BeforeSubMap,
CalculateDiscount, and UpdateBalance; the CalculateDiscount
rules package contains three rules. Note that
the Rules Engine
interface supports the JRules business action
language (BAL) rule language only.

To create or update rules for a workflow you
must first transfer the workflow to the Rules
repository. Once the workflow repository is
in the Rules repository, you can create or update
the rules from within ILOG Rules Builder. Before
the rules can be executed you must export the
rules packages to an .ilr filea compiled
version of the rule packages. One .ilr file
contains all rule packages for a workflow repository.
Each time a new version of a workflow is transferred
to the repository, Rules Engine also creates
a new version of the .ilr fileprovided
there are no errors in the rules. If the rules
contain errors such as an invalid data field,
a new rule set .ilr file is not created. You
must manually edit and check the rule, and then
export the rule set to a new .ilr file.
To create a rule set for
a workflow
- If you have not already done so, transfer
the workflow from the Process Designer.
- Start
ILOG Rules Builder by executing runilog.bat
(Windows) or runilog
(UNIX) from a command prompt.
- Open the repository for the workflow you
transferred. If there is more than one version
of the workflow, Rules Builder prompts you
to select the project (version of the workflow)
you want to open.
- In the left pane, expand the rules package
node and select the rule you want to create/edit.
- Edit the rule as appropriate. See the ILOG
documentation for information on creating
rules.
- When you are finished editing the rule,
verify that the rule syntax is valid by right-clicking
on the rule and selecting Check from
the context menu.
- Edit and check any additional rules as necessary.
- Save the repository by selecting File
> Save Repository.
To export a rule set for
a workflow
- Start ILOG Rules Builder by executing runilog.bat
(Windows) or runilog
(UNIX) from a command prompt.
- Open the workflow repository that contains
the rule set you want to edit. If there is
more than one version of the workflow, Rules
Builder prompts you to select the project
(version of the workflow) you want to open.
- Verify that the syntax of the rules packages
(rules set) in the repository is valid by
right-clicking on the repository node and
selecting Check from the context menu.
- Export the rule set by selecting File
> Export > Ruleset > ILR from
the Rules Builder menu bar.
- In the Generate Rule File dialog specify
the name and location of the rule set .ilr
file.
NOTE The
.ilr file must have the same name, including
the version number, as the workflow project.
For example, a rule set .ilr file for a workflow
project named loanApproval_1 in region 120
must be named loanApproval_1.ilr
and saved under fnsw_loc\connectors\ILOG\rules\120\
(Windows) or fnsw/local/connectors/ILOG/rules/120/
(UNIX).
- Click Save.
|