Unable to execute decisions using dmnRuleService


This is my DB entry for ACT_DMN_DEPLOYMENT_RESOURCE which has a deployed decision with id : decisionnew2.

But when I try to execute it using dmnRuleService, it is unable to find the decision.
Code I have written:
DmnRuleService dmnRuleService = dmnEngine.getDmnRuleService();
Map<String, Object> inputVariables = new HashMap<>();
inputVariables.put(“date1”, new Date());
inputVariables.put(“date2”, new Date());
Map<String, Object> result = dmnRuleService.createExecuteDecisionBuilder()

It is giving the following exception
org.flowable.common.engine.api.FlowableObjectNotFoundException: no decisions deployed with key ‘decisionnew2’ for tenant identifier ‘abcd’

Does the dmnRuleService look in some other table to execute the result ?
Please have a look and help.

Programmatically create decisions tables and run cases against it


The lookup of the key and tenant is done via ACT_DMN_DECISION_TABLE. The actual DMN XML is fetched from the ACT_DMN_DEPLOYMENT_RESOURCE using the deploymentId and resourceName.

I would advice you to use the Java / REST APIs to find info like this first.

F.e. dmnRepositoryService.createDecisionTableQuery().list() to see what decision tables (with what key and tenant id) are deployed.




Closing this topic as you suggested. Please reply on that one.