• No results found

Adding a JRules Decision Service component to a service

In document IBM BPM V8.5.5.pdf (Page 177-180)

When building a Decision service in Process Designer, you can include decision services available on an ILOG JRules Rule Execution Server in your

implementation.

Before you begin

To perform this task, you must be in the IBM® Process Designer desktop editor.

About this task

IBM Business Process Manager integrates with IBM WebSphere ILOG JRules by providing a JRules Decision Service component. This rule component enables you to use rule applications available on a JRules Rule Execution Server for your IBM BPM implementations.

Why should you choose using a JRules Decision Service component over creating a standard web service when connecting to an IBM Operational Decision

Management (ODM) server, which is IBM’s recently renamed ILOG JRules Rule Execution Server? The JRules Decision Service component is specifically designed for calling a JRules decision service. It has a closer conceptual mapping to the JRules decision service called and, therefore, is a more efficient representation of it in your business process model. A JRules Decision Service component can handle decision services hosted on either a WebSphere ILOG JRules BRMS 7.1,

WebSphere Operational Decision Management 7.5, or IBM Operational Decision Management server.

Conversely, the web service will treat the service called as it would any other generic service; that is, the web service has no corresponding model representing the JRules decision service called. Each time a JRules server version changes, you will need to modify the web service.

The following procedure describes how to use the JRules Decision component to connect to a WODM server and invoke the rule applications and rule sets available on that server as decision services.

Before using the JRules Decision Service component in your Rules service, review the following requirements:

For a secure connection to a Rule Execution Server running on WebSphere® Application Server, you must provide the SOAP port and, if necessary, the user name and password for the Rule Execution Server. This secure connection

enables you to choose the applications and rule sets that you want to use from the Rule Execution Server.

If you connect to a Rule Execution Server that is running on WebSphere

Application Server, but the Rule Execution Server is not properly configured for security or you are not able to provide the SOAP port, user name, and password, then you cannot list the rule applications and rule sets available on that Rule Execution Server. In this case, you can manually enter the names of the rule applications and rule sets that you want to use. If the names that you provide are accurate, you can successfully generate types as described in the following

- 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. procedure.

If you connect to a Rule Execution Server that is running on an application server other than WebSphere, you cannot list the rule applications and rule sets available on that Rule Execution Server. In this case, you can manually enter the names of the rule applications and rule sets that you want to use. If the names that you provide are accurate, you can successfully generate types as described in the following procedure.

Procedure

To build a Decision service that includes an JRules Decision Service component, complete these steps:

Open the Process Designer desktop editor.

Open a process application in the Designer view. Create a Decision service.

Drag a JRules Decision Service component from the palette to the service diagram.

With the JRules Decision Service component selected, click the

Implementation option in the Properties tab.

In the Discovery section, enter the following information to connect to a Rule Execution Server that contains deployed rule applications (Rule Apps) that you

want to use.Table 1. Input required to connect to the Rule Execution Server

The SOAP port, user name, and password fields accept embedded JavaScript expressions, so variables can be used to provide those values.

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. If a secure connection to the Rule Execution Server has not been established, the menu is not populated. In this case, manually enter the name and version of the Rule App and Rule Set that you want to use. The names must be accurate for the next step to work.

Click Generate Types.

In the Generating Types window, make sure the Generate request/response

wrapper types option is not selected. Click Next.

Click Finish when type generation is complete.

Field Action

Server Select the server that you want from

the list.

SOAP Port Specify a port for the SOAP connection

if the Rule Execution Server is running on WebSphere Application Server.

User name Enter the user name to use, if

necessary, for a secure connection.

Password Enter the password to use, if

13. 14. 15. 16. 17. 18.

Click the auto-map icon in upper right corner of the Input Mapping section. The Create variables for auto-mapping window opens, listing the private variables needed for input parameters from the selected Rule App.

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. The Create variables for auto-mapping window opens, listing the private variables needed for output parameters from the selected Rule App.

Click to select each variable that you want to create in your Decision service and then click OK.

Use sequence lines to connect the JRules Decision Service component to the Start and End Events.

Save the new Decision service.

What to do next

You can nest this Decision service in any other service within your process application that requires the same logic. Be sure to adjust the input and output variables as required for each implementation. Refer to the related topic "Declaring and passing variables" for more information.

Parent topic:Building a Decision service

Related information:

Adding a server configuration

Adding a Decision service to a process Declaring and passing variables

- - - 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13.

In document IBM BPM V8.5.5.pdf (Page 177-180)