IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Modeling processes > Building services > Building a Decision service

Adding a JRules Decision Service component to a service

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

IBM BPM 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 a WebSphere Operational Decision Management (WODM) 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 or WODM 7.5 or higher 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 an ILOG JRules Rule Execution 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:


Procedure

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

  1. Create a Decision service as described in the related topic "Adding a Decision service to a process."

  2. Drag a JRules Decision Service component from the palette to the service diagram.
  3. With the JRules Decision Service component selected, click the Implementation option in the Properties tab.

  4. 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.

    Input required to connect to the Rule Execution Server
    Field Action
    Server Select the server that you want from the list of ILOG Rules Server variables. (See the related topic "Setting environment variables" for more information.)
    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 necessary, for a secure connection.

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

  5. Click Connect.

  6. 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.

  7. Click Generate Types.

  8. In the Generating Types window, make sure the Generate request/response wrapper types option is not selected. Click Next.

  9. Click Finish when type generation is complete.

  10. In the Properties section, click Data Mapping.

  11. 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.

  12. Click to select each variable to create in your Decision service and then click OK.

  13. 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.

  14. Click to select each variable to create in your Decision service and then click OK.

  15. Use sequence lines to connect the JRules Decision Service component to the Start and End Events.
  16. 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.

Building a Decision service


Related concepts:
Declaring and passing variables


Related tasks:
Adding a Decision service to a process
Adding a server configuration