use of org.camunda.bpm.engine.impl.dmn.invocation.DecisionInvocation in project camunda-bpm-platform by camunda.
the class DecisionEvaluationUtil method evaluateDecision.
public static DmnDecisionResult evaluateDecision(DecisionDefinition decisionDefinition, VariableMap variables) throws Exception {
DecisionInvocation invocation = createInvocation(decisionDefinition, variables);
invoke(invocation);
return invocation.getInvocationResult();
}
use of org.camunda.bpm.engine.impl.dmn.invocation.DecisionInvocation in project camunda-bpm-platform by camunda.
the class DecisionEvaluationUtil method evaluateDecision.
public static void evaluateDecision(AbstractVariableScope execution, BaseCallableElement callableElement, String resultVariable, DecisionResultMapper decisionResultMapper) throws Exception {
DecisionDefinition decisionDefinition = resolveDecisionDefinition(callableElement, execution);
DecisionInvocation invocation = createInvocation(decisionDefinition, execution);
invoke(invocation);
DmnDecisionResult result = invocation.getInvocationResult();
if (result != null) {
execution.setVariableLocalTransient(DECISION_RESULT_VARIABLE, result);
if (resultVariable != null && decisionResultMapper != null) {
Object mappedDecisionResult = decisionResultMapper.mapDecisionResult(result);
execution.setVariable(resultVariable, mappedDecisionResult);
}
}
}
Aggregations