{"record":{"id":"61c70644451b3286","repo":"flowable/flowable-engine","slug":"hitpolicy-s-violated-no-output-values-present-61c706","errorCode":null,"errorMessage":"HitPolicy %s violated; no output values present.","messagePattern":"HitPolicy (.+?) violated; no output values present\\.","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/hitpolicy/HitPolicyPriority.java","lineNumber":64,"sourceCode":"            @SuppressWarnings(\"unchecked\")\n            @Override\n            public int compare(Object o1, Object o2) {\n                CompareToBuilder compareToBuilder = new CompareToBuilder();\n                for (Map.Entry<String, List<Object>> entry : executionContext.getOutputValues().entrySet()) {\n                    List<Object> outputValues = entry.getValue();\n                    if (outputValues != null && !outputValues.isEmpty()) {\n                        noOutputValuesPresent = false;\n                        compareToBuilder.append(((Map<String, Object>) o1).get(entry.getKey()),\n                                ((Map<String, Object>) o2).get(entry.getKey()),\n                                new OutputOrderComparator<>(outputValues.toArray(new Comparable[outputValues.size()])));\n                    }\n                }\n\n                if (!noOutputValuesPresent) {\n                    return compareToBuilder.toComparison();\n                } else {\n                    if (CommandContextUtil.getDmnEngineConfiguration().isStrictMode()) {\n                        throw new FlowableException(String.format(\"HitPolicy %s violated; no output values present.\", getHitPolicyName()));\n                    } else {\n                        executionContext.getAuditContainer().setValidationMessage(\n                                String.format(\"HitPolicy %s violated; no output values present. Setting first valid result as final result.\",\n                                        getHitPolicyName()));\n                    }\n\n                    return 0;\n                }\n            }\n        });\n\n        if (!ruleResults.isEmpty()) {\n            executionContext.getAuditContainer().addDecisionResultObject(ruleResults.get(0));\n        }\n\n    }\n}\n","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/hitpolicy/HitPolicyPriority.java#L46-L82","documentation":"HitPolicyPriority.compare implements the comparator for PRIORITY hit policy, comparing rule results by their ranked output values. When neither result exposes comparable output values, strict mode throws FlowableException('HitPolicy PRIORITY violated; no output values present.') and lenient mode records a validation message and falls back to the first valid result.","triggerScenarios":"Comparing two rule executions under hit policy PRIORITY whose output values list is empty (no output values produced), so the priority ordering cannot be computed.","commonSituations":"Priority strings/outputs missing from the decision table or not listed in the ordered priority values; output expressions evaluating to null; DMN model exported without priority output configuration.","solutions":["Configure the priority output column and its ordered value list so outputs can be ranked","Ensure matched rules actually emit a priority-ranked output value","Check the audit container message identifying which comparisons lacked output values and fix those rows","Consider hit policy FIRST if ranking is not actually needed"],"exampleFix":"// before (priority output not declared in table)\n<hitPolicy>PRIORITY</hitPolicy> <!-- no priority output column -->\n// after\n<hitPolicy>PRIORITY</hitPolicy>\n<output id=\"priorityOutput\" name=\"priority\"/> <!-- with ordered values configured -->","handlingStrategy":"validation","validationCode":"// ensure priority output column exists and matched rules produce ranked values\nif (table.getOutputs().stream().noneMatch(o -> o.isPriority())) throw new IllegalStateException(\"PRIORITY hit policy requires a priority output\");","typeGuard":null,"tryCatchPattern":"try { decisionTable.execute(input); } catch (FlowableException e) { if (e.getMessage().contains(\"no output values present\")) { /* lenient mode already falls back; otherwise fix outputs */ } throw e; }","preventionTips":["Always configure the ordered priority value list for PRIORITY tables","Ensure output expressions cannot evaluate to null","Test tables with inputs that match multiple rules"],"tags":["dmn","hit-policy","priority","decision-table"],"backgroundTag":"schema-validation-failed","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}