// currently we allow editing of:
// task name
// task schedule (even to another type)
// task params
ScheduledTask<?> task = getNexusScheduler().getTaskById(getScheduledServiceId(request));
TaskState state = task.getTaskState();
if (TaskState.RUNNING.equals(state) || TaskState.CANCELLING.equals(state)
|| TaskState.SLEEPING.equals(state)) {
throw new ResourceException(Status.CLIENT_ERROR_CONFLICT,
"Task can't be edited while it is being executed or it is in line to be executed");
}