flowable/flowable-engine · error · FlowableException

HitPolicy: %s has aggregation: %s and multiple outputs. This

Error message

HitPolicy: %s has aggregation: %s and multiple outputs. This is not supported

What it means

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.

Source

Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/RuleEngineExecutorImpl.java:326

    protected AbstractHitPolicy getHitPolicyBehavior(HitPolicy hitPolicy) {
        AbstractHitPolicy hitPolicyBehavior = hitPolicyBehaviors.get(hitPolicy.getValue());

        if (hitPolicyBehavior == null) {
            String hitPolicyBehaviorNotFoundMessage = String.format("HitPolicy behavior: %s not configured", hitPolicy.getValue());

            LOGGER.error(hitPolicyBehaviorNotFoundMessage);

            throw new FlowableException(hitPolicyBehaviorNotFoundMessage);
        }

        return hitPolicyBehavior;
    }

    protected void sanityCheckDecisionTable(DecisionTable decisionTable) {
        if (decisionTable.getHitPolicy() == HitPolicy.COLLECT && decisionTable.getAggregation() != null && decisionTable.getOutputs() != null) {
            if (decisionTable.getOutputs().size() > 1) {
                throw new FlowableException(String.format("HitPolicy: %s has aggregation: %s and multiple outputs. This is not supported", decisionTable.getHitPolicy(), decisionTable.getAggregation()));
            }
            if (!"number".equals(decisionTable.getOutputs().get(0).getTypeRef())) {
                throw new FlowableException(String.format("HitPolicy: %s has aggregation: %s needs output type number", decisionTable.getHitPolicy(), decisionTable.getAggregation()));
            }
        }
    }

    @Override
    public Map<String, AbstractHitPolicy> getHitPolicyBehaviors() {
        return hitPolicyBehaviors;
    }

    @Override
    public void setHitPolicyBehaviors(Map<String, AbstractHitPolicy> hitPolicyBehaviors) {
        this.hitPolicyBehaviors = hitPolicyBehaviors;
    }

    @Override

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Remove the extra output columns so only one output remains
  2. Split the decision table into multiple tables, one per aggregated output
  3. Change the hit policy (e.g. plain COLLECT without aggregation, or RULE ORDER/OUTPUT ORDER) if multiple outputs are needed
  4. Validate the DMN XML against Flowable's supported feature set before deployment

Example fix

// before
<hitPolicy>COLLECT</hitPolicy>
<aggregation>SUM</aggregation>
<!-- two outputs -->
// after
<hitPolicy>COLLECT</hitPolicy>
<aggregation>SUM</aggregation>
<!-- single output column only -->
Defensive patterns

Strategy: validation

Validate before calling

if (dt.getHitPolicy() == HitPolicy.COLLECT && dt.getAggregation() != null && dt.getOutputs() != null && dt.getOutputs().size() > 1) {
  throw new IllegalArgumentException("COLLECT+aggregation supports only one output");
}

Prevention

When it happens

Trigger: execute -> sanityCheckDecisionTable finds decisionTable.getHitPolicy() == COLLECT, aggregation != null, and outputs.size() > 1.

Common situations: DMN tables exported from other DMN tools (Camunda, Trisotech, editors) that permit aggregated COLLECT with multiple outputs, then deployed to Flowable.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/2a707b6ffc2b3842. Report an issue: GitHub.