private void handleModifyExecutionRequest(
      Map<String, Object> respMap, int execId, String user, HttpServletRequest req)
      throws ServletException {
    if (!hasParam(req, MODIFY_EXECUTION_ACTION_TYPE)) {
      respMap.put(RESPONSE_ERROR, "Modification type not set.");
    }
    String modificationType = getParam(req, MODIFY_EXECUTION_ACTION_TYPE);
    String modifiedJobList = getParam(req, MODIFY_JOBS_LIST);
    String[] jobIds = modifiedJobList.split("\\s*,\\s*");

    try {
      if (MODIFY_RETRY_JOBS.equals(modificationType)) {
        flowRunnerManager.retryJobs(execId, user, jobIds);
      } else if (MODIFY_CANCEL_JOBS.equals(modificationType)) {

      } else if (MODIFY_DISABLE_JOBS.equals(modificationType)) {

      } else if (MODIFY_ENABLE_JOBS.equals(modificationType)) {

      } else if (MODIFY_PAUSE_JOBS.equals(modificationType)) {

      } else if (MODIFY_RESUME_JOBS.equals(modificationType)) {

      }
    } catch (ExecutorManagerException e) {
      logger.error(e);
      respMap.put("error", e.getMessage());
    }
  }
 private void handleAjaxExecute(HttpServletRequest req, Map<String, Object> respMap, int execId)
     throws ServletException {
   try {
     flowRunnerManager.submitFlow(execId);
   } catch (ExecutorManagerException e) {
     e.printStackTrace();
     logger.error(e);
     respMap.put(RESPONSE_ERROR, e.getMessage());
   }
 }
Exemple #3
0
  private void closeLogger() {
    if (logger != null) {
      logger.removeAppender(flowAppender);
      flowAppender.close();

      try {
        executorLoader.uploadLogFile(execId, "", 0, logFile);
      } catch (ExecutorManagerException e) {
        e.printStackTrace();
      }
    }
  }
  private void handleAjaxCancel(Map<String, Object> respMap, int execid, String user)
      throws ServletException {
    if (user == null) {
      respMap.put(RESPONSE_ERROR, "user has not been set");
      return;
    }

    try {
      flowRunnerManager.cancelFlow(execid, user);
      respMap.put(STATUS_PARAM, RESPONSE_SUCCESS);
    } catch (ExecutorManagerException e) {
      logger.error(e);
      respMap.put(RESPONSE_ERROR, e.getMessage());
    }
  }