jrulesibm-odm

Retrieve the decision table in readable format from ODM Decision Center using Java code/API


I need to extract the contents of a decision table in a readable/tabular format from the IBM ODM Decision Center Business Console using Java and ODM APIs provided.

This has to be an automated process and hence I cannot use the existing Import/Export feature provided by ODM.

Does anyone have any sample code or have implemented such a requirement?

Version: ODM 8.10.1


Solution

  • Step 1: Query the decision center for the decision table (see here for instructions)

    Step 2:

                    if (rule.getType().equals("brm.DecisionTable")) {
                            IlrDecisionTable dTable = (IlrDecisionTable) rule;
                            IlrDTController controller = IlrSessionHelper.getDTController(session, dTable, new Locale(dTable.getLocale()));
                            String tableHtml = IlrDTHelper.getHTMLTable(controller, false, false);//getHTMLTable(IlrDTController controller, boolean showEmptyRow, boolean includeCSS)
                            ...
                        }