Client API to manipulate Guvnor Decision Table

The BRMS tool of drools, called Guvnor, proposes a REst API to read/delete/update all artefacts from Guvnor.

The native Guvnor REst API gives access to the internal data model of all artefacts, including the definition part. For example, in decision table, there is a first part that describes how to generate the rules and the second part is the data part.

Our API offers a simple model to manipulate this data part and only this part. It completely hides the other part to make sure the Decision Table artifact cannot be broken.

here is a small example how it works :

 

Example
guvnorRepositoryConnector = new GuvnorRepositoryConnector("localhost", "drools-guvnor", "demo", "admin","admin");
DecisionTable catDecisionTable = guvnorRepositoryConnector.getGuidedDecisionTable("ADecisionTable");
catDecisionTable.clearAllData();
for (String value : catMap.keySet()) {
	Row newRow = catDecisionTable.createEmptyRow(i);
	newRow.getRowElements().get(3).setValue(value);
	newRow.getRowElements().get(5).setValue(catMap.get(value).toString());
}
guvnorRepositoryConnector.commitChanges(catDecisionTable);

You just

Here is a description on the data model used in our API :

 

We need a lot of Junit Test DROOLS-11 - Getting issue details... STATUS