In many IBM ODM rules implementation projects we are going to have requirements that involve working with the IBM ODM API. Even though the Decision Center has a lot of powerful features to customize our rules, there are some things that can only be achieve by working with the API, this means we will have to work with java code and be familiar with the ODM API classes to accomplish our goals. In this tutorial I will show you the basics of how to establish a connection with the Decision Center from the Rule Designer and retrieve valuable project information. You can apply this for your particular requirement.
- Getting familiar with ODM API
- We first need to take a moment and review some of the most important classes in the IBM ODM API documentation (IlrSession) , it’s ok if you don’t fully understand how they work at first. It is all about practice.
- Enter here to access the documentation.
- Creating a Java project
- Establishing the decision center connection
- Create a new main class to test our remote ODM API decision center connection
- Our java class needs to implement the IlrSession class:
- Create your connection parameters, in my case:
- Now in our main class we need to create an object of the IlrSessionFactory class that implements IlrRemoteSessionFactory
- Lets call the connect method:
- Tip: be sure to work in a try/catch block to manage any connection exceptions
- Obtaining Decision Center data
We can work and obtain pretty much any data, object or method that is inside the Decision Center repository. We can also create our custom jar classes and repackage the teamserver.ear with it.
I hope you enjoy this tutorial and please let me now if you need help working with the ODM API and what do you want to see next. Thank you!