Java Code Examples for org.camunda.bpm.model.dmn.instance.DecisionTable#getHitPolicy()

The following examples show how to use org.camunda.bpm.model.dmn.instance.DecisionTable#getHitPolicy() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DmnDecisionTableTransformHandler.java    From camunda-engine-dmn with Apache License 2.0 5 votes vote down vote up
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);
  }
}
 
Example 2
Source File: DmnDecisionTableTransformHandler.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
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);
  }
}