class ManualHandlingTasks {

    public void setPauseTaskVariables(DelegateTask task) {

        DelegateExecution execution = task.getExecution();

        try {
            String taskId = task.getId();
            logger.debug("taskId is: " + taskId);
            String type = TASK_TYPE_PAUSE;

            String nfRole = (String) execution.getVariable(VNF_TYPE);
            String subscriptionServiceType = (String) execution.getVariable(SERVICE_TYPE);
            String originalRequestId = (String) execution.getVariable(MSO_REQUEST_ID);
            String originalRequestorId = (String) execution.getVariable(REQUESTOR_ID);
            String description = (String) execution.getVariable(DESCRIPTION);
            String timeout = "";
            String errorSource = ASTERISK;
            String errorCode = ASTERISK;
            String errorMessage = ASTERISK;
            String buildingBlockName = ASTERISK;
            String buildingBlockStep = ASTERISK;
            String validResponses = (String) execution.getVariable(VALID_RESPONSES);

            Map<String, String> taskVariables = new HashMap<>();
            taskVariables.put(TASK_VARIABLE_TYPE, type);
            taskVariables.put(TASK_VARIABLE_NFROLE, nfRole);
            taskVariables.put(TASK_VARIABLE_DESCRIPTION, description);
            taskVariables.put(TASK_VARIABLE_TIMEOUT, timeout);
            taskVariables.put(TASK_VARIABLE_SUBSCRIPTION_SERVICE_TYPE, subscriptionServiceType);
            taskVariables.put(TASK_VARIABLE_ORIGINAL_REQUEST_ID, originalRequestId);
            taskVariables.put(TASK_VARIABLE_ORIGINAL_REQUESTOR_ID, originalRequestorId);
            taskVariables.put(TASK_VARIABLE_ERROR_SOURCE, errorSource);
            taskVariables.put(TASK_VARIABLE_ERROR_CODE, errorCode);
            taskVariables.put(TASK_VARIABLE_ERROR_MESSAGE, errorMessage);
            taskVariables.put(TASK_VARIABLE_BUILDING_BLOCK_NAME, buildingBlockName);
            taskVariables.put(TASK_VARIABLE_BUILDING_BLOCK_STEP, buildingBlockStep);
            taskVariables.put(TASK_VARIABLE_VALID_RESPONSES, validResponses);
            TaskService taskService = execution.getProcessEngineServices().getTaskService();

            taskService.setVariablesLocal(taskId, taskVariables);
            logger.debug("successfully created pause task: " + taskId);
        } catch (BpmnError e) {
            logger.debug(BPMN_EXCEPTION + e.getMessage());
            throw e;
        } catch (Exception ex) {
            String msg = "Exception in setPauseTaskVariables " + ex.getMessage();
            logger.debug(msg);
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
        }

    }

}