code: @Service
      public void updateTaskDef(TaskDef taskDefinition) {
          TaskDef existing = metadataDAO.getTaskDef(taskDefinition.getName());
          if (existing == null) {
              throw new ApplicationException(Code.NOT_FOUND, "No such task by name " + taskDefinition.getName());
          }
          taskDefinition.setUpdatedBy(WorkflowContext.get().getClientApp());
          taskDefinition.setUpdateTime(System.currentTimeMillis());
          metadataDAO.updateTaskDef(taskDefinition);
      }
docs: /*
  @param taskDefinition Task Definition to be updated