@VisibleForTesting
    String getEvaluatedCaseValue(WorkflowTask workflowTask, Map<String, Object> taskInput) {
        String expression = workflowTask.getCaseExpression();
        String caseValue;
        if (StringUtils.isNotBlank(expression)) {
            LOGGER.debug("Case being evaluated using decision expression: {}", expression);
            try {
                // Evaluate the expression by using the Nashhorn based script evaluator
                Object returnValue = ScriptEvaluator.eval(expression, taskInput);
                caseValue = (returnValue == null) ? "null" : returnValue.toString();
            } catch (ScriptException e) {
                String errorMsg = String.format("Error while evaluating script: %s", expression);
                LOGGER.error(errorMsg, e);
                throw new TerminateWorkflowException(errorMsg);
            }

        } else { // In case of no case expression, get the caseValueParam and treat it as a string
            // representation of caseValue
            LOGGER.debug(
                    "No Expression available on the decision task, case value being assigned as param name");
            String paramName = workflowTask.getCaseValueParam();
            caseValue = "" + taskInput.get(paramName);
        }
        return caseValue;
    }
This method evaluates the case expression of a decision task and returns a string
representation of the evaluated result.

@param workflowTask: The decision task that has the case expression to be evaluated.
@param taskInput: the input which has the values that will be used in evaluating the case
    expression.
@return A String representation of the evaluated result
core/src/main/java/com/netflix/conductor/core/execution/mapper/DecisionTaskMapper.java