Skip to Content
0
Apr 30, 2018 at 05:15 AM

BRMS Rules Edit API decision table queries

165 Views

Hi all,

I was using the BRMS Rules Edit API . and was able to query the decision table but rather confused while obtaining the cell values

below is decision table columns

with query on decision table as below

IProject project = api.getProject(projectName);
IRuleset ruleset = project.getRuleset(rulesetName);
IDecisionTable dt = ruleset.getDecisionTable(decisiontableName);
IDecisionTableQuery query = dt.createQuery();
query.setConditionValue("Org","Org2");
 IDecisionTableRow[] dtRow = dt.getRows(query);

I was able to get the Org2 row using query

ArrayList<String> arrli = new ArrayList<String>();
          for ( IDecisionTableRow brmRow : dtRow){
          ICell[] cell =  brmRow.getCells();
         for (ICell cellvalues : cell)
         arrli.add(cellvalues.getValue().toString());
          }
return (arrli.toString());
};

i was able to get the cellvalues using cellvalues.getValue().toString . and its returning as string seperated by comma.

My question is

  • How to get the value of each header in cell row for the given query of Condition
  • whats the significance of ActionHeaderName as below query.setActionValue("ActionHeaderName","ActionValue");

What is the difference between setActionValue and SetConditonValue for the above decision table .

Thanks in advance

Prasad

Attachments

dtbrms.png (9.3 kB)