code: @VisibleForTesting
      String getEvaluatedCaseValue(WorkflowTask taskToSchedule, Map<String, Object> taskInput) {
          String expression = taskToSchedule.getCaseExpression();
          String caseValue;
          if (expression != null) {
              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 = taskToSchedule.getCaseValueParam();
              caseValue = "" + taskInput.get(paramName);
          }
          return caseValue;
      }
docs: This method evaluates the case expression of a decision task and returns a string representation of the evaluated result.
  
  @param taskToSchedule: 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