The amazing world of IBM ODM and more

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

Populating Decision Tables with external data sources

Thursday, 21 September 2017 by Angello Manrique Vigil

One of the most used artifacts in IBM ODM is the decision table. In this post I will show how to populate your Decision Table in the Rule Designer with external data sources like a .txt file or an excel spreadsheet. Business users can have their logic in multiple sources (mostly in Excel files), that they need to dump in a decision table to create rules and business logic behavior in IBM ODM. We are going to achieve this by using a combination of Java, Ant builds and ilog rule designer-plug ins embedded in our suite. This is a very technical tutorial and it might be a little difficult to get it done quickly but feel free to contact me with any problems or if you get stuck at some point.


Steps:

  1. Setting up environment
    • Create a new folder (in my case “dt-populate”) in your Rule project with a “data” subfolder and with an Ant Build file.ant file creation sampleibm odm populate decision table folder structure sample
    • Tip: You can also create and manage the ant and data configuration in a new external Java project.
    • Create an environment variable ECLIPSE_HOME with the location of your IBM ODM installation.
    • Insert the txt or the excel file with the data you want to import in the data folder. In my example I am using both, please have this considerations:
      • Txt:
        • Separate each cell of the decision table by the semicolon “;”.
        • Separate each row of the decision table with a space.txt decision table structure sample
      • Excel:
        • Separate each cell of the decision table in each excel cell starting in A1.
        • Separate each row of the decision table in each excel row.decision table excel file sample
        • Tip: Remember the version of Excel and the file extension because you will need it later on.
  2. Creating the Ant Build file
    • Add the project tag with a name, basedir and a default target attributes.ant build sample ibm odm rule designer
    • Tip: For more about Ant Tasks review my previous post here.
    • Inside the project tag we are going to add the properties, conditions, echo messages, definitions and our targets. For each of you will be different depending in your environment and ODM installation.ant build file properties sample
    • Tip: Remember to change the values according to your workspace and installation folders.
    • Now let’s add the definitions the includes the properties and connection parameters.ant build macrodef sampleant build macrodef sample 2
    • Finally, we add the targets.ant build target sample
    • Remember to change the values according to your environment and also review the excel file extension.
  3. Running the Ant build file targets
    • Right click the build.xml file and select Run As –> Ant build…ant build running as sample
    • Select the target you want, in this sample I will run the Excel file target, and click Run.ant build running ant samples
    • You will see the console messages and at the end BUILD SUCCESSFUL.

Results:

Now you can refresh and open your Decision Table and visualize all the values!decision table ant populated sample

I hope you enjoy this tutorial, 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!

AntTasksDecisionTableJavaRuleDesigner
Read more
  • Published in Ant Tasks, Decision Table, Java, Rule Authoring, Rule Designer
2 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

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