Esempio n. 1
0
  public void handledManuallyTask() {
    task.setStatus(TaskStatus.HANDLED_MANUALLY);
    taskManager.updateTask(task);

    facesMessages.add(
        "Successfully set task status as 'handled manually' for task Id: #0", task.getTaskId());
  }
Esempio n. 2
0
 public void executeTask() {
   if (task.isInProcess()) {
     facesMessages.add(
         FacesMessage.SEVERITY_WARN,
         "Cannot execute task ID '" + task.getTaskId() + "', task is locked!");
   } else {
     taskManager.sendTaskToJmsQueue(task);
     facesMessages.add("Requested task execution for task ID '" + task.getTaskId() + "'");
   }
 }
Esempio n. 3
0
  public void reQueueTask() {
    log.debug("Re-queuing task ID: " + task.getTaskId());

    try {
      taskManager.reQueueTask(task);
    } catch (CannotRequeueTaskException crte) {
      facesMessages.add(crte.getMessage());
    }
  }
Esempio n. 4
0
 public void resetRunningTask() {
   taskManager.resetRunningTask(task);
   facesMessages.add("Reset running task ID '#0' to PENDING status.", task.getTaskId());
 }
Esempio n. 5
0
  public void cancelTask() {
    task.setStatus(TaskStatus.CANCELLED);
    taskManager.updateTask(task);

    facesMessages.add("Successfully cancelled task Id: #0", task.getTaskId());
  }