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:
- 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.
- 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:
- Excel:
- Creating the Ant Build file
- Add the project tag with a name, basedir and a default target attributes.
- 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.
- 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.
- Finally, we add the targets.
- Remember to change the values according to your environment and also review the excel file extension.
- Running the Ant build file targets
Results:
Now you can refresh and open your Decision Table and visualize all the values!
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!
Hello ANGELLO MANRIQUE VIGIL,
Thanks for the detailed explanation. Can I use excel sheet as an artifact?
For instance, I have thousands of records and need to use them for decision making and those records can be in CSV format or Excel sheet. how to implement this in ODM?
Please advice me
Thanks!!
Hi Pramod, yes you can. Just add a separator for each row and use the guide to load them in the decision tables in ODM. After that you can create the BOM objects to use them in any rule.