jbpmkie-serverdmn

Unable to locate DMN Decision to evaluate


If I add decision-id and decision-name to post request for /server/containers/{containerId}/dmn, I get error "Unable to locate DMN Decision to evaluate". When these parameters are set to null, it works with all decisions returning response. I want to filter the response to the main decision rule only. Is there a way to get response only for a single decision-id

 "model-namespace": "https://kiegroup.org/dmn/_E565A249-313F-4A19-AF60-D25F1A7AFCEB",
  "model-name": "Test Rules",
  "decision-id": "_DFF31A1C-BC85-4B48-BB23-EEB0E55FD27D",
  "decision-name": "Test All Rules",

Solution

  • When you evaluate a DMN model by means of REST APIs, such as Kie-Server but also on Kogito, usually a full relevant DMN Context is returned, containing the original inputs but also the outcome Decision nodes.

    Usually, consuming client applications filters on the result either by means of the dmnresults object, or either on the returned context directly.

    If you use the Kie Server Client (Java API) this is provided out of the box for you as described in this document.

    Alternatively, you may use the "next-gen" Decision Service coercion capabilities of the new REST APIs, for which case you would need to define the Decision Service accordingly to your requirements.

    When using Kogito you should refer to this document.

    When using Kie-Server, Drools, Kie v7, you should refer to this document.

    In either cases, reference to the example for /{decisionServiceName}.