public virtual IDmnDecisionResult EvaluateDecision(IDmnDecision decision, IVariableContext variableContext) { EnsureUtil.EnsureNotNull("decision", decision); EnsureUtil.EnsureNotNull("variableContext", variableContext); if (decision is DmnDecisionImpl) { var decisionContext = new DefaultDmnDecisionContext(dmnEngineConfiguration); return(decisionContext.evaluateDecision(decision, variableContext)); } throw LOG.decisionTypeNotSupported(decision); }
public virtual IDmnDecisionTableResult EvaluateDecisionTable(IDmnDecision decision, IVariableContext variableContext) { EnsureUtil.EnsureNotNull("decision", decision); EnsureUtil.EnsureNotNull("variableContext", variableContext); if (decision is DmnDecisionImpl && decision.DecisionTable) { var decisionContext = new DefaultDmnDecisionContext(dmnEngineConfiguration); var decisionResult = decisionContext.evaluateDecision(decision, variableContext); return(DmnDecisionTableResultImpl.Wrap(decisionResult)); } throw LOG.decisionIsNotADecisionTable(decision); }