@Override
    public void updateWorkflowTask(WorkflowTask workflowTask) {

        if (useJavascript) {
            workflowTask.setEvaluatorType(JAVASCRIPT_NAME);
            workflowTask.setExpression(caseExpression);

        } else {
            workflowTask.setEvaluatorType(VALUE_PARAM_NAME);
            workflowTask.getInputParameters().put("switchCaseValue", caseExpression);
            workflowTask.setExpression("switchCaseValue");
        }

        Map<String, List<WorkflowTask>> decisionCases = new HashMap<>();
        branches.entrySet()
                .forEach(
                        entry -> {
                            String decisionCase = entry.getKey();
                            List<Task<?>> decisionTasks = entry.getValue();
                            List<WorkflowTask> decionTaskDefs =
                                    new ArrayList<>(decisionTasks.size());
                            for (Task<?> decisionTask : decisionTasks) {
                                decionTaskDefs.addAll(decisionTask.getWorkflowDefTasks());
                            }
                            decisionCases.put(decisionCase, decionTaskDefs);
                        });

        workflowTask.setDecisionCases(decisionCases);
        List<WorkflowTask> defaultCaseTaskDefs = new ArrayList<>(defaultTasks.size());
        for (Task<?> defaultTask : defaultTasks) {
            defaultCaseTaskDefs.addAll(defaultTask.getWorkflowDefTasks());
        }
        workflowTask.setDefaultCase(defaultCaseTaskDefs);
    }
Switch case (similar to if...then...else or switch in java language)

@param taskReferenceName
@param caseExpression
java-sdk/src/main/java/com/netflix/conductor/sdk/workflow/def/tasks/Switch.java