Search in sources :

Example 1 with HitPolicy

use of org.camunda.bpm.model.dmn.HitPolicy in project camunda-engine-dmn by camunda.

the class DmnDecisionTableTransformHandler method getHitPolicyHandler.

protected DmnHitPolicyHandler getHitPolicyHandler(DmnElementTransformContext context, DecisionTable decisionTable, DmnDecisionTableImpl dmnDecisionTable) {
    HitPolicy hitPolicy = decisionTable.getHitPolicy();
    if (hitPolicy == null) {
        // use default hit policy
        hitPolicy = HitPolicy.UNIQUE;
    }
    BuiltinAggregator aggregation = decisionTable.getAggregation();
    DmnHitPolicyHandler hitPolicyHandler = context.getHitPolicyHandlerRegistry().getHandler(hitPolicy, aggregation);
    if (hitPolicyHandler != null) {
        return hitPolicyHandler;
    } else {
        throw LOG.hitPolicyNotSupported(dmnDecisionTable, hitPolicy, aggregation);
    }
}
Also used : HitPolicy(org.camunda.bpm.model.dmn.HitPolicy) DmnHitPolicyHandler(org.camunda.bpm.dmn.engine.impl.spi.hitpolicy.DmnHitPolicyHandler) BuiltinAggregator(org.camunda.bpm.model.dmn.BuiltinAggregator)

Aggregations

DmnHitPolicyHandler (org.camunda.bpm.dmn.engine.impl.spi.hitpolicy.DmnHitPolicyHandler)1 BuiltinAggregator (org.camunda.bpm.model.dmn.BuiltinAggregator)1 HitPolicy (org.camunda.bpm.model.dmn.HitPolicy)1