The amazing world of IBM ODM and more

The amazing world of IBM ODM blog - Angello Manrique Vigil
  • HOME
  • ABOUT ME
  • CONTACT ME

Rule Execution Server (RES) – Webapp ODM component

ODM on Docker!

Friday, 13 July 2018 by Angello Manrique Vigil

If you are a DevOps enthusiast like me you probably love Docker and have been using it for a while. If you are new to Docker, please check this link to learn more.

IBM released an IBM ODM Docker image designed for developers and free to use, in this tutorial we are going to set it up step by step and gain full functionality of this amazing feature. My setup for running this tutorial is:

  • Host machine: Windows 10 Pro
  • Elementary OS (Ubuntu Dist.) Virtual Box Machine with Docker (I tried using my Alpine-Docker image but I encountered some extra configurations needed for the ODM JVM, contact me for more information about this subject)
  • Eclipse Luna with Rule Designer for developers plugin

Steps:

  1. Install IBM ODM Docker image
    • Open a new terminal window and run the following command: docker pull ibmcom/odm
    • This will download all the ODM files and create the IBM ODM image. Depending on your internet conection this process could take a few minutes.
    • Now run the following command to start the docker IBM ODM container instance:
      docker run -e LICENSE=accept -p 9060:9060 -p 9443:9443 ibmcom/odm
    • Note that we are passing an environment value to accept the license and mapping the ports 9060 and 9443. If you run with JVM memory problems use -m 1g or the amount of java heap size memory you can use for this container to run smoothly and faster.
    • If everything went well you should see the beautiful IBM ODM logo printed in the terminal
    • Now you are ready to use:
    • Note that if you are using a Virtual Box VM like me you need to configure your networks and ip addresses to use the web applications in your host. In my case I use the 192.168.56.101 ip. See Host-Only adapter configurations and verify your networks by pinging the VM ip.
  2. Verify Installation
    • Open the Decision Center, you should be able to log in odmAdmin or rtsAdmin:
    • And have a clean installation:

    • Open the RES console, now use resAdmin:
    • And also see no RuleApps deployed:
  1. Install Eclipse with IBM ODM plugin
    • Download and install Eclipse.
    • Navigate to https://marketplace.eclipse.org/content/ibm-operational-decision-manager-developers-rule-designer and drag and drop the install
    • Follow the instructions and reboot Eclipse, you should now see the Rule Designer perspective:
  2. Test IBM ODM on Docker
    • Create a new project or import an existing project, I am going to use the Recruitment Service demo that I’ve using on previous posts:
    • Connect the main project to the Decision Center
    • Enter the proper URL and credentials and test the conection:
    • Navigate to the Decision Center and verify the Decision Service is uploaded correctly:
    • Now we will test the deployment to the RES console, create a new Deployment Configuration
    • Add a Decision Operation
    • Add the ODM docker RES service
    • Deploy the Ruleapp and select the recently added server
    • Verify the ruleapp deployed correctly

As you can see we setup an ODM distribution in minutes and got a project sync with Decision Center and deployed in the RES console. ODM on Docker is great, we can use all the Docker containers and images functionalities.

I hope you enjoy this tutorial and as always please feel free to contact me for any feedback or questions! Thank you!

CloudDecisionCenterDockerRESRuleDesigner
Read more
  • Published in Cloud, Decision Center, Docker, Rule Designer, Rule Execution Server (RES)
2 Comments

RPA: UiPath and ODM integration

Thursday, 07 June 2018 by Angello Manrique Vigil

In this technical tutorial we will have a look at the integration between RPA UiPath and IBM ODM. As we know ODM provides a decision server that the business can use to express rules while UiPath provides RPA to automate tasks, normally manual processes that uses repetitive tasks like data entry, making this integration a perfect collaboration.

To understand the basics of UiPath, please refer to this link.


 

  1. Testing the ODM project
    • For this tutorial, I will use the ‘Recruitment’ project I made for previous posts. Check some details about the project here.
    • Make sure your project is successfully deployed in the RES console and that the Sample Server is up and running.
    • Open the RES console and navigate to your project Ruleset view:ODM RPA UiPath RES Ruleset view
    • Click on ‘Retrieve HTDS Description File’, select ‘REST’ and click on Test:ODM RPA UiPath RES HTDS View
    • In my example I will test with 2 scenarios for the ‘Country’ value.
      • “Spain” will return that the candidate is not apt and 1 object in our Recruits list:ODM RPA UiPath RES REST Test sample 1
      • “Peru” will return that the candidate is apt and 2 objects in our Recruits list:ODM RPA UiPath RES REST Test sample 2
    • Now go back to the HTDS page and click on ‘View’. Copy the URL, we will use it later in UiPath:ODM RPA UiPath RES REST WADL URL
    • Remember you can also use JSON format for your execution requests and external tools like SoapUI or Postman (my favorite) to test your services.
  2. Creating the UiPath project
    • Now that we know our Decision Service is working properly, we will create a simple UiPath project that will call our service and print the response.
    • We will use UiPath community version (free), you can download it from here.
    • Open the UiPath studio and create a new Blank Project:ODM RPA UiPath Blank Project
  3. Calling the ODM web service 
    • This is the tricky part, UiPath community edition doesn’t come with the SOAP or HTTP request activities by default, we will need to install them.
    • Open the ‘Manage Packages’ option:ODM RPA UiPath Studio Manage Packages
    • Search for UiPath.Web.Activities and install it:ODM RPA UiPath Studio Manage Packages UiPath web activities
    • You should be able to see the 2 options in the Activities Panel:ODM RPA UiPath Studio Activities Panel
    • Now we need to decide if we want to consume the web service as a SOAP request call or as a REST API method. Let’s talk about the 2 options in UiPath:
      • SOAP: If we want to use SOAP we will encounter a problem if we are using custom objects, as of now, UiPath is not able to properly identify the methods and types for your objects in order to make the request in the correct format. You will an error like this when we test and invoke:ODM RPA UiPath Studio SOAP Method ERROR
      • There is a way to accomplish but it will require to create a custom activity, we will not cover that in this post but you can follow this guide to do it.
      • REST: This is the option we are going to choose for this tutorial. We just drag the ‘HTTP Request’ activity.
      • In the ‘End point’ field we paste our WADL url, we select the ‘POST’ method and click Ok.
      • We need to create 2 variables, one for the input body and one for the response. We just select the ‘Variables’ option and assign ‘String’ to both:ODM RPA UiPath Studio Variables
      • We need to include the XML expression for our Request in the first variable but UiPath studio will not recognize this as a proper VB Expression, so we need to adjust our ‘”‘ marks in order to obtain a valid XML, this is my value for the input variable:ODM RPA UiPath Studio Input XML
      • This will convert our XML in a proper String and UiPath will not give us any errors.
      • We assign the 2 variables in the properties of the HTTP Request activity:ODM RPA UiPath Studio HTTP properties
      • We create a Message Box or we open Notepad to show our response (variable2):ODM RPA UiPath Studio flow sample
      • We run our project:ODM RPA UiPath Studio Message BoxODM RPA UiPath Notepad

We have successfully called a ODM Service from an UiPath project and capture the response. In the next post I will show how to deserialize the XML and use the data for different purposes, stay tuned!

I hope you enjoy this tutorial and please feel free to contact me with any query or feedback, thank you!

DecisionServiceRESRPASOAPUiPath
Read more
  • Published in RPA, Rule Execution Server (RES), UiPath
No Comments

Automating deployments with Ant tasks

Monday, 12 June 2017 by Angello Manrique Vigil

To deploy RuleApps to Rule Execution Server, automate managerial tasks within Decision Center, and run many of the samples, you must have Ant installed on your computer. IBM ODM comes with Ant in the <InstallDir>/shared/tools/ant path. In this tutorial I will show how to use Ant tasks to automate RuleApp management tasks, including reading a specified RuleApp archive from the RES console, create a well-formed RuleApp archive with all its mandatory execution resources and deploy a RuleApp archive to a running Rule Execution Server instance.


Steps:

First of all we need to set up our environment to automate processes, please follow the steps in this link.

  1. Downloading RuleApp instances from RES
    • Create an Ant Build file, you can this directly in your Rule project in Eclipse:build file eclipse sample
    • Define your project and property variables values.
    • Tip: You can define properties for your common values like hostname, destfile, userid and password.
    • Please find the next sample as a demonstration of a working Ant build file:res fetch all build ant sample odm res
    • The target res-fetch command extracts a specific Ruleapp value, the res-fetch-all will generate a .war file with all the Ruleapps present in the RES
  2. Deploying into RES with Ant Tasks
    • Now that we have our jar file ready, we can automate the deployments with Ant Tasks by using the res-deploy command.
    • You will need to add a new target to your build ant file or create a new one, this command requires the login credentials, jar path and hostname.
    • Please refer to the following example:res deploy ant task command sample

Results:

After running our deploy command we see our Ruleapp deployed in the RES:

res ruleapp sample

There are many more automation and integration to be done with Ant Tasks, please let me know what you wish to see next, and as always feel free to comment or contact me with any feedback or support! Thank you!

AntTasksRuleAppRuleDesigner
Read more
  • Published in Ant Tasks, Rule Authoring, Rule Designer, Rule Execution Server (RES)
2 Comments

Monitoring ruleset execution with ODM RES Decision Warehouse

Thursday, 01 June 2017 by Angello Manrique Vigil

After we finish developing and deploying a Rule Project into the Rule Execution Server (RES), oftentimes we need to review and analyze which and when a ruleset has been executed. Luckily for us the Rule Execution Server comes with the Decision Warehouse tool for monitoring and storing ruleset execution traces in a database. We can also connect and save this data to an external Database by configuring the Datasource in the Application Server console. In this article I will explain how to easily configure the properties of the Ruleset to enable the monitoring and then read and review the decision from the Decision Warehouse.


Steps:

  1. Configuring the Ruleset
    • Login into the RES console and navigate to the Ruleapp that contains the Ruleset you wish to monitor.
    • Click the Ruleset, now you should be in the Ruleset view:IBM ODM RES Ruleset view sample
    • By default, if you didn’t add any property before the deployment, the properties list is empty. There are 3 necessary properties you need to have to enable monitoring:
      • ruleset.bom.enabled
      • monitoring.enabled
      • ruleset.sequential.trace.enabled (if the ruleset contains tasks that use the sequential or the Fastpath execution mode)
    • Instead of adding them manually, navigate and click the next option “Show Monitoring Options” and select “Enable tracing in Decision Warehouse”.
    • The following options will depend on what you need to trace:IBM ODM RES Monitoring Options sample
    • After clicking save you will notice that the properties were added automatically (you might need to refresh the webpage):IBM ODM RES Ruleset properties sample
    • Execute a call or multiple calls of this Ruleset WS from Decision Validation Services, a client application, or a hosted transparent decision service.
    • Tip: I use SoapUI software to execute and test the rulesets.
  2. Searching Rulesets executions in the Decision Warehouse
    • Login to the RES console.
    • Click on the “Decision Warehouse” tab.
    • These filters are useful when you have more projects and need to review specific Rules, Time frames, parameters, etc:IBM ODM RES Decision Warehouse search sample
    • Click search and “View Decision details” for a particular Decision ID.

Results:

All the information about the Ruleset Execution will appear:IBM ODM RES Decision Warehouse Decision Trace Sample

You can review which rules were fired, the timestamp, processing time, rules names, input/output parameters, etc. The goal is to provide business users with data from which they can generate reports and measure how well a business is running.

Tip: You can send a Decision ID tag while executing the ruleset so it is easy to find the Decision Warehouse:SoapUI Decision ID tag sample

I hope you enjoy this article about IBM ODM RES Decision Warehouse and as always feel free to contact me with any questions or feedback. Thank you!

DatabaseDecisionWarehouseRESRuleset
Read more
  • Published in Database, Decision Warehouse, Rule Execution Server (RES)
3 Comments

Deploying Rule projects into IBM Bluemix

Sunday, 28 May 2017 by Angello Manrique Vigil

IBM Bluemix is a cloud platform that helps you solve real problems and drive business value with applications, infrastructure and services. There are other powerful cloud services like AWS, Azure or Google Cloud platform but IBM Bluemix comes with pre-designed services for your IBM software solutions. In this article we will see how the Business Rules service allows us to deploy our Decision Operations from Rule Designer or Decision Center console directly to IBM Bluemix cloud. In order to test this you will need to create a IBM Bluemix account that comes with 30 days free trial.


Steps:

  1. Creating the Business Rules service
    • Login to your IBM Bluemix account.
    • Click “Catalog” and search for “Business Rules”Bluemix Business Rules service
    • Tip: This service gives you 1,000 API calls free per month that is more than enough for dev purposes, you can cancel the service at any time.
    • Click “Create” and give a proper name.
    • Navigate to the “Connection Settings” tab and you should be able to see the connection details like this:Bluemix business rules connection details
    • Tip: Click “Open Console” and navigate just like in your RES local installation.

     

  2. Configuring the Deployment
    • Now that our Business Rules service on IBM Bluemix is ready, let’s configure and deploy the Rule project.
    • Open Rule Designer and navigate to the deployment folder of the Rule project.
    • If you have a previous deployment configuration already set up you can just add the new IBM Bluemix RES server target:Deployment configuration server sample
    • Insert the Bluemix connection details and test the connection.
    • Deploy the Decision Operation Ruleapp and verify the deployment by accessing the IBM Bluemix RES console.
    • The Ruleapp should appear like this:Bluemix RES console ruleapp sample

     

  3. Testing our Rule web service in SoapUI
    • Navigate to the Ruleset view by clicking on the Ruleapp Name and then the Ruleset name in the RES console.
    • Click the “Retrieve HTDS Description File” option:RES retrieve wsdl sample
    • Download the SOAP HTDS file or click view and copy the WSDL URL.
    • Open SoapUI and create a New SOAP project.
    • Insert the wsdl URL, username and password.
    • Now you have the request ready, the only thing missing is the security authorization. Click the “Auth” option and select Basic, type the Bluemix Business Rules service username and password.SoapUI Basic auth sample

Results:

You are ready to call your Rules from anyplace, anywhere. Just share your WSDL url with the client application and give the proper authorization. Having the Rule Execution Server on the cloud is a great way to test your rules in development without depending on your local Sample Server.

SoapUI Bluemix RES sample

I hope you enjoy this tutorial and as always please feel free to contact me for any feedback or questions! Thank you!

BluemixCloudDecisionOperationDeploymentRuleDesignerSoapUI
Read more
  • Published in Bluemix, Cloud, Rule Authoring, Rule Designer, Rule Execution Server (RES)
No Comments

Working with Lists in the XOM / BOM

Wednesday, 24 May 2017 by Angello Manrique Vigil

The XOM (Execution Object Model) and BOM (Business Object Model) are key artifacts of our Rule project. The execution object model (XOM) is the model against which you run rules, it references the application objects and data, and is the base implementation of the business object model (BOM). For more information about XOM/BOM visit the IBM Knowledge Center here.

We can generate our BOM entries from a XOM (Java or XSD) and get the objects we will verbalize for our rules. A very common requirement in a project is to work with Lists and return a populated List with values from a Rule Action or Decision Table. You will notice that after you create your BOM entry from an XOM with Lists (maxOccurs=”unbounded”) you will get an object of type java.util.Vector but with no direct relationship between the elements. Please review the following problem example and a workaround on how to fix it and implement Lists correctly.


Problem:

Let’s say you have an XSD with an element like this:

<complexType name=”RecruitsList”>
         <sequence>
                  <element name=”recruits” type=”tns:Recruit” maxOccurs=”unbounded” minOccurs=”0″></element>
         </sequence>
</complexType>

List XSD Samples XOM

After you create the BOM entry, you will get an object like this:

BOM Lists ODM sample

With no proper verbalization and without a way to use it in a Rule Action, Decision Table or Decision Tree correctly. In this example we want to add objects of type Recruit to our RecruitsList and display this list in the output of our Decision Service. Follow the steps below to implement a workaround and accomplish our goal.


Steps:

  1. Creating a new Method member
    • Let’s remove this verbalization and navigate to the Class tab.
    • We are going to create a new method to add our Objects. Click “New…” in the Members section.
    • Select “Method”, give a proper Name and “void” for Type.
    • Now add Arguments according to the Object you are going to add to your list, in our example the Recruit’s attributes. At the end you should have something like this:BOM new method member sample
    • Tip: Remember that the types have to match, if you are using a virtual value assign the corresponding type like the example. For more information about dynamic domains and virtual values read my previous post here.
    • Now we need to create a proper verbalization for our new method and implement the BOM to XOM Mapping logic.
    • Navigate to the Member Verbalization section and click “Create”. Modify the Action phrase according to your Object. In this sample:BOM method verbalization sample
    • The last and most important step is to define our BOM to XOM Mapping logic. We need to map our method arguments with the attributes of our Object, in this sample with the Recruit’s age, country, name and sex:BOM to XOM mapping logic sampleTip: Don’t forget to initialize the response list variable in your ruleflow or variableSet.

Results:

Now we are ready to use our method in any Rule and return a list structure schema in our Decision Service response!

Decision Table demonstration sample:

Decision Table method sample

After we test our rules we will see this list structure in the response (Testing with SoapUI):

BOM XOM Rule Test List SoapUI

Please feel free to comment or contact me with any doubts or feedback. Thank you!

BOMBOM2XOMJavaListsRuleDesignerSoapUIXOM
Read more
  • Published in Java, Rule Authoring, Rule Designer, Rule Execution Server (RES)
No Comments

Recent Posts

  • RPA – UiPath: Working with Excel

    In this blog post we will talk about working wi...
  • ODM on Docker!

    If you are a DevOps enthusiast like me you prob...
  • RPA: UiPath and ODM integration

    In this technical tutorial we will have a look ...
  • Populating Decision Tables with external data sources

    One of the most used artifacts in IBM ODM is th...
  • Decision Composer, integration with Rule Designer

    In this post I will show a new way to start you...
  • Connecting to external Database with ODM API

    The IBM ODM Decision Center and the Rule Execut...
  • Custom log file with ODM API

    Given the positive feedback from previous post ...
  • Working with the Decision Center API

    In many IBM ODM rules implementation projects w...
  • Automating deployments with Ant tasks

    To deploy RuleApps to Rule Execution Server, au...
  • Editing business rules in Microsoft Office

    IBM ODM Decision Center Business Console provid...

Categories

  • Ant Tasks
  • Bluemix
  • Cloud
  • Database
  • Debug
  • Decision Center
  • Decision Operation
  • Decision Table
  • Decision Warehouse
  • Docker
  • Domains
  • Java
  • ODM API
  • RPA
  • Rule Authoring
  • Rule Designer
  • Rule Execution Server (RES)
  • Rule Solutions for Office
  • Ruleflow
  • UiPath

Recent Posts

  • RPA – UiPath: Working with Excel

    In this blog post we will talk about working wi...
  • ODM on Docker!

    If you are a DevOps enthusiast like me you prob...
  • RPA: UiPath and ODM integration

    In this technical tutorial we will have a look ...
  • Populating Decision Tables with external data sources

    One of the most used artifacts in IBM ODM is th...
  • Decision Composer, integration with Rule Designer

    In this post I will show a new way to start you...

Recent Comments

  • Mastan on Debugging a simple Ruleflow in Rule Designer
  • Angello Manrique Vigil on ODM on Docker!
  • brian on ODM on Docker!
  • Angello Manrique Vigil on Populating Decision Tables with external data sources
  • Pramod on Populating Decision Tables with external data sources

Subscribe

  • Register
  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

All rights reserved. Made by Angello Manrique Vigil.

TOP