snippets/dmn-decision-chaining/dmn-decision-chaining-plugin/src/main/java/com/camunda/consulting/DecisionTableEvaluator.java
public static DmnDecisionTableResult evaluate(String decisionKey, VariableContext variables) {
//		ProcessEngineImpl processEngine = Context.getProcessEngineConfiguration().getProcessEngine();
		// Do it "the internal way" to be able to use VariableContext directly
		final DmnEngine dmnEngine = Context.getProcessEngineConfiguration().getDmnEngine();
		DeploymentCache deploymentCache = Context.getProcessEngineConfiguration().getDeploymentCache();
		DmnDecision decisionDefinition = (DmnDecision) deploymentCache.findDeployedLatestDecisionDefinitionByKey(decisionKey);
		LOG.info("Evaluate chained decision: {} ", decisionDefinition);
		return dmnEngine.evaluateDecisionTable(decisionDefinition, variables);
	}
public static DmnDecisionTableResult evaluate(String decisionKey, VariableContext variables) {
//		ProcessEngineImpl processEngine = Context.getProcessEngineConfiguration().getProcessEngine();
		// Do it "the internal way" to be able to use VariableContext directly
		final DmnEngine dmnEngine = Context.getProcessEngineConfiguration().getDmnEngine();
		DeploymentCache deploymentCache = Context.getProcessEngineConfiguration().getDeploymentCache();
		DmnDecision decisionDefinition = (DmnDecision) deploymentCache.findDeployedLatestDecisionDefinitionByKey(decisionKey);
		LOG.info("Evaluate chained decision: {} ", decisionDefinition);
		return dmnEngine.evaluateDecisionTable(decisionDefinition, variables);
	}
public static DmnDecisionTableResult evaluate ( String decisionKey , VariableContext variables ) { //		ProcessEngineImpl processEngine = Context.getProcessEngineConfiguration().getProcessEngine(); // Do it "the internal way" to be able to use VariableContext directly final DmnEngine dmnEngine = Context . getProcessEngineConfiguration ( ) . getDmnEngine ( ) ; DeploymentCache deploymentCache = Context . getProcessEngineConfiguration ( ) . getDeploymentCache ( ) ; DmnDecision decisionDefinition = ( DmnDecision ) deploymentCache . findDeployedLatestDecisionDefinitionByKey ( decisionKey ) ; LOG . info ( "Evaluate chained decision: {} " , decisionDefinition ) ; return dmnEngine . evaluateDecisionTable ( decisionDefinition , variables ) ; }
${evaluateDecision(decisionKey, variableContext).getFirstResult().get(resultVariableName)}
$ { evaluateDecision ( decisionKey variableContext ) . getFirstResult () . get ( resultVariableName ) }