{"record":{"id":"2a707b6ffc2b3842","repo":"flowable/flowable-engine","slug":"hitpolicy-s-has-aggregation-s-and-multiple-out","errorCode":null,"errorMessage":"HitPolicy: %s has aggregation: %s and multiple outputs. This is not supported","messagePattern":"HitPolicy: (.+?) has aggregation: (.+?) and multiple outputs\\. This is not supported","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/RuleEngineExecutorImpl.java","lineNumber":326,"sourceCode":"\n    protected AbstractHitPolicy getHitPolicyBehavior(HitPolicy hitPolicy) {\n        AbstractHitPolicy hitPolicyBehavior = hitPolicyBehaviors.get(hitPolicy.getValue());\n\n        if (hitPolicyBehavior == null) {\n            String hitPolicyBehaviorNotFoundMessage = String.format(\"HitPolicy behavior: %s not configured\", hitPolicy.getValue());\n\n            LOGGER.error(hitPolicyBehaviorNotFoundMessage);\n\n            throw new FlowableException(hitPolicyBehaviorNotFoundMessage);\n        }\n\n        return hitPolicyBehavior;\n    }\n\n    protected void sanityCheckDecisionTable(DecisionTable decisionTable) {\n        if (decisionTable.getHitPolicy() == HitPolicy.COLLECT && decisionTable.getAggregation() != null && decisionTable.getOutputs() != null) {\n            if (decisionTable.getOutputs().size() > 1) {\n                throw new FlowableException(String.format(\"HitPolicy: %s has aggregation: %s and multiple outputs. This is not supported\", decisionTable.getHitPolicy(), decisionTable.getAggregation()));\n            }\n            if (!\"number\".equals(decisionTable.getOutputs().get(0).getTypeRef())) {\n                throw new FlowableException(String.format(\"HitPolicy: %s has aggregation: %s needs output type number\", decisionTable.getHitPolicy(), decisionTable.getAggregation()));\n            }\n        }\n    }\n\n    @Override\n    public Map<String, AbstractHitPolicy> getHitPolicyBehaviors() {\n        return hitPolicyBehaviors;\n    }\n\n    @Override\n    public void setHitPolicyBehaviors(Map<String, AbstractHitPolicy> hitPolicyBehaviors) {\n        this.hitPolicyBehaviors = hitPolicyBehaviors;\n    }\n\n    @Override","sourceCodeStart":308,"sourceCodeEnd":344,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/RuleEngineExecutorImpl.java#L308-L344","documentation":"A COLLECT hit policy with an aggregator (SUM/MIN/MAX/COUNT) combined with multiple output columns is not supported by Flowable DMN; the aggregation can only apply to a single numeric output. The engine performs this sanity check before executing the decision table.","triggerScenarios":"execute -> sanityCheckDecisionTable finds decisionTable.getHitPolicy() == COLLECT, aggregation != null, and outputs.size() > 1.","commonSituations":"DMN tables exported from other DMN tools (Camunda, Trisotech, editors) that permit aggregated COLLECT with multiple outputs, then deployed to Flowable.","solutions":["Remove the extra output columns so only one output remains","Split the decision table into multiple tables, one per aggregated output","Change the hit policy (e.g. plain COLLECT without aggregation, or RULE ORDER/OUTPUT ORDER) if multiple outputs are needed","Validate the DMN XML against Flowable's supported feature set before deployment"],"exampleFix":"// before\n<hitPolicy>COLLECT</hitPolicy>\n<aggregation>SUM</aggregation>\n<!-- two outputs -->\n// after\n<hitPolicy>COLLECT</hitPolicy>\n<aggregation>SUM</aggregation>\n<!-- single output column only -->","handlingStrategy":"validation","validationCode":"if (dt.getHitPolicy() == HitPolicy.COLLECT && dt.getAggregation() != null && dt.getOutputs() != null && dt.getOutputs().size() > 1) {\n  throw new IllegalArgumentException(\"COLLECT+aggregation supports only one output\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Enforce single-output COLLECT tables in your modeling guidelines","Re-export tables from other DMN tools and review unsupported combos","Add a schema/feature check in the deployment pipeline"],"tags":["dmn","hit-policy","unsupported","flowable"],"backgroundTag":"unsupported-operation","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}