Using IBM ODM business rules
You can define an IBM® Operational Decision
Manager business
rule, deploy it as a decision service, and use it as an external service
in an IBM Business
Automation Workflow service
flow. If you have exported a set of rules from a decision task, you
can import them to use them in IBM ODM.
For
more information about exporting a set of rules, see Exporting rules and decision tables for use in Rule Designer.
What you do in IBM ODM
Restriction: IBM ODM cannot
generate an OpenAPI specification for a rule set that uses XSD for
its XOM. In that case, you must use a web service WSDL specification
that is available in IBM ODM, and
call it from Business Automation Workflow as
a web service.
To deploy a rule set (that
uses Java for its XOM) as a decision service, and download the OpenAPI
specification for the service:
- Use the Rule Designer to create a business rule.
- Use the Decision Center to deploy your decision service project to the Rule Execution Server.
- In the Rule Execution Server console:
- Navigate to the Ruleset View of the project that you want to use in your Business Automation Workflow process.
- Click Retrieve HTDS Description File.
- For the service protocol type, select REST.
- For the format, select OpenAPI-JSON.
- Click Download to save the file locally or click
View and copy the URL. You must specify this file or the URL later in
Business Automation Workflow
Process Designer to discover the IBM ODM decision service as an external REST
service.Note: If your rule-set is secured you must add the
security=basic
option to the URL so that the OpenAPI specification contains a security definition and Business Automation Workflow sends the security credentials. The options are described in the IBM ODM Knowledge Center topic Endpoint URIs.
What you do in Business Automation Workflow to discover the IBM ODM decision service
In Process Designer:
- From the library, click to create a new External Service.
- In the New External Service page, select Java, REST or Web service and click Next.
- Select Browse local files (Swagger) and browse to select the OpenAPI specification file that you downloaded from IBM ODM then click Next.
- If you see a list of operations that require JavaScript to invoke them, click Next.
- You see a list of discovered operations. Select the operations that you want to include in the external service then click Next.
- Select Create a new server and click Finish. You will configure the server in a later step. An external service is created.
- To explore the generated artifacts:
- To display the business objects that were discovered in the OpenAPI specification, in the library, click Data .
- To display an operation with its input and output parameters, in the library, click Services, then select the external service that you created.
- To configure the server:
- Under Process App Settings click Server.
- For the server type, select REST Server.
- For Host name, specify the hostname of the IBM ODM server.
- Make sure that Secure server is selected and that SSL configuration is specified.
- Select Authentication machanism and specify values for User name and Password.
What you do in Business Automation Workflow to use the IBM ODM decision service in a service flow
In Process Designer:
- Create a service flow.
- Use a service task to invoke an operation of the external service.
- For Implementation, specify the external service.
- For Operation, select the operation to use.
- Specify data mappings as required by the operation.