public void logAndFailPartiallySubmittedTaskOfCommand(final AsyncTask task, String message) {
   log.info(
       "Failing partially submitted task AsyncTaskType '{}': Task '{}' Parent Command '{}'",
       task.getTaskType(),
       task.getTaskId(),
       task.getActionType());
   task.getTaskParameters().setTaskGroupSuccess(false);
   if (task.getActionType() == VdcActionType.Unknown) {
     removeTaskFromDbByTaskId(task.getTaskId());
     log.info(
         "Not calling endAction for partially submitted task and AsyncTaskType '{}': Task '{}' Parent Command '{}'",
         task.getTaskType(),
         task.getTaskId(),
         task.getActionType());
     return;
   }
   log.info(
       "Calling updateTask for partially submitted task and AsyncTaskType '{}': Task '{}' Parent Command"
           + " '{}' Parameters class '{}'",
       task.getTaskType(),
       task.getTaskId(),
       task.getActionType());
   AsyncTaskCreationInfo creationInfo =
       new AsyncTaskCreationInfo(Guid.Empty, task.getTaskType(), task.getStoragePoolId());
   SPMTask spmTask = coco.construct(creationInfo, task);
   AsyncTaskStatus failureStatus = new AsyncTaskStatus();
   failureStatus.setStatus(AsyncTaskStatusEnum.finished);
   failureStatus.setResult(AsyncTaskResultEnum.failure);
   failureStatus.setMessage(message);
   spmTask.setState(AsyncTaskState.Ended);
   spmTask.setLastTaskStatus(failureStatus);
   spmTask.updateTask(failureStatus);
 }