This scenario shows you how to export, migrate and connect
BAL rules to a rule execution server (RES). You can migrate the rules
that you created in Process Designer to
a business rules management system (BRMS) such as IBM® WebSphere® ILOG® JRules, and then continue
to use the rules in a business process definition.
About this task
This scenario assumes that you previously completed the steps
outlined in
Scenario: Creating a Decision service in a Personalized Notification process. Upon completion
of that scenario, your business process definition includes a Decision
service called NotificationRulesService, which contains a BAL Rule
component called AlertRules. For the purposes of the current exporting
scenario, assume that the rules you wrote for the AlertRules component
also apply to other processes in your organization, so you want to
share the rules with your co-workers, who are developing business
rules using IBM WebSphere ILOG JRules.
You can export the rules you created in Process Designer, import them
into Rule Studio, deploy the rules to a Rule Execution Server (RES)
, and then connect your Decision service to the RES using a JRules
Decision Service component.
Procedure
To export rules for use in Rule Studio and the Rule Execution
server, complete these steps:
- Export the BAL rules from your Decision service.
- Make sure that you are editing the NotificationRulesService
Decision service and the AlertRules BAL Rule component.
- In the AlertRules component panel, click the Decisions tab
to open the rule editor.
- In the menu bar above the rule editor window, click
the Export
icon.
- In the Save As window, navigate
to the location where you want to save the exported rule file.
- Enter a name for the export file, then click Save to
specify the location.
You can find more information about exporting rules in the
related topic about exporting rules for use in Rule Studio.
- Import the rules into Rule Studio.
- Using IBM WebSphere ILOG Rule Studio, import the project .zip file
to create a new Rule Studio project.
- Click .
- Click Select archive file. Click Browse to
navigate to the location where you saved the exported rule project
file and select the file.
- Select an existing project where the rules will be imported,
or create a new Rule Studio project, then click Finish.
You can find more information about importing rules in the
related topic about configuring a remote decision service.
- Deploy the rules to the rule execution server (RES).
- In Rule Studio, select the RuleApp which contains the
AlertRules and click Deploy a RuleApp to one
or more Rule Execution Servers.
- Select an existing Rule Execution Servicer and deploy
the RuleApp to the server.
For more information, see the related topic about deploying
from Rule Studio in the IBM WebSphere ILOG JRules BRMS Information Center.
- Add a JRules Decision Service component the Decision service
and connect it to the RES.
- Configure your Decision service to include a JRules
Decision Service component. When you specify the correct
rule execution server and port settings, the JRules Decision component
establishes a connection between Process Designer and
the Rule Execution Server that contains the imported rule project.
- Make sure that you are editing the NotificationRulesService
Decision service.
- Remove the AlertRules BAL Rule component that contains
the rules you exported.
- Replace the BAL Rule component with a JRules Decision
Service component. Drag a JRules Decision Service component from the
palette to the service diagram, and place it in the same location
as the deleted BAL Rule component. Reconnect any sequence lines to
other activities or services.
- Select the new JRules Decision Service component, then
click Implementation in the Properties tab.
- In the Discovery section, enter
the following information to connect to the Rule Execution Server
that contains the rules that you want to use.
- Server: Select the Rule Execution Server (RES).
- SOAP Port: Specify a port for the SOAP connection if the Rule
Execution Server is running on WebSphere Application
Server.
- User name: Enter a user name if the JRules server requires a secure
connection.
- Password: Enter the password if the JRules server requires a secure
connection.
- Click Connect.
- In the Rule section, select the
Rule App that you want from the menu, then select the version that
you want to use.
- Click Generate Types.
You can find more information about adding a JRules Decision
Service component in the related topic about configuring a remote
Decision service.
- Map the variables to make sure that the variables used
in the rules on the Rule Execution Server correspond to variables
defined in Process Designer.
- Click the Properties tab in the
JRules Decision Service panel.
- In the Properties section, click Data
Mapping.
- Click the auto-map icon in upper right corner of the Input
Mapping section.
- In the Create variables for auto-mapping window,
click to select each variable that you want to create in your Decision
service and then click OK.
- Click the auto-map icon in upper right corner of the Output
Mapping section.
- In the Create variables for auto-mapping window,
click to select each variable that you want to create in your Decision
service and then click OK.
- Save the updated Decision service.
What to do next
After completing the scenario, test and debug the Decision
service and the JRule Decision service component to make sure the
rules from the Rule Execution Server are producing the results you
expect. For more information about testing and debugging a Decision
service, see the related topic about testing a Decision service.