Package com.dotmarketing.portlets.workflows.model

Examples of com.dotmarketing.portlets.workflows.model.WorkflowStep


      db.addParam(action.isRoleHierarchyForAssign());
      db.addParam(action.isRequiresCheckout());
      db.addParam(action.getId());
      db.loadResult();
    }
    WorkflowStep proxy = new WorkflowStep();
    proxy.setId(action.getStepId());
    cache.removeActions(proxy);

    // update workflowScheme mod date
    WorkflowStep step = findStep(action.getStepId());
    WorkflowScheme scheme = findScheme(step.getSchemeId());
    saveScheme(scheme);

  }
View Full Code Here


    }
    // cache.remove(step);

    // update workflowScheme mod date
    WorkflowAction action = findAction(actionClass.getActionId());
    WorkflowStep step = findStep(action.getStepId());
    WorkflowScheme scheme = findScheme(step.getSchemeId());
    saveScheme(scheme);
  }
View Full Code Here

  public void saveStep(WorkflowStep step) throws DotDataException, AlreadyExistException {

    boolean isNew = true;
    if (UtilMethods.isSet(step.getId())) {
      try {
        final WorkflowStep test = this.findStep(step.getId());
        if (test != null) {
          isNew = false;
        }
      } catch (final Exception e) {
        Logger.debug(this.getClass(), e.getMessage(), e);
View Full Code Here

    }

    // update workflowScheme mod date
    WorkflowActionClass actionClass = findActionClass(param.getActionClassId());
    WorkflowAction action = findAction(actionClass.getActionId());
    WorkflowStep step = findStep(action.getStepId());
    WorkflowScheme scheme = findScheme(step.getSchemeId());
    saveScheme(scheme);
  }
View Full Code Here

        db.loadResult();
       
        // update scheme mod date
        WorkflowActionClass clazz = findActionClass(param.getActionClassId());
        WorkflowAction action = findAction(clazz.getActionId());
        WorkflowStep step = findStep(action.getStepId());
        WorkflowScheme scheme = findScheme(step.getSchemeId());
        saveScheme(scheme);
    }
View Full Code Here

    String escalationTime = request.getParameter("escalationTime");
    WorkflowAPI wapi = APILocator.getWorkflowAPI();
    boolean stepResolved = request.getParameter("stepResolved") != null;
    int order = 0;
    try {
      WorkflowStep step = wapi.findStep(stepId);
      if(step.isNew()){
        writeError(response, "Cannot-edit-step");
        return;
      }
      if(enableEscalation) {
          step.setEnableEscalation(true);
          step.setEscalationAction(escalationAction);
          step.setEscalationTime(Integer.parseInt(escalationTime));
      }
      else {
          step.setEnableEscalation(false);
          step.setEscalationAction(null);
          step.setEscalationTime(0);
      }
      step.setName(stepName);
      step.setResolved(stepResolved);
      order = step.getMyOrder();
      try{
        order = Integer.parseInt(o);
        wapi.reorderStep(step, order );
      }
      catch(Exception e1){
View Full Code Here

    WorkflowAPI wapi = APILocator.getWorkflowAPI();
   
    try {

      WorkflowStep step = wapi.findStep(stepId);
      wapi.deleteStep(step);
    } catch (DotDataException e) {
      Logger.error(this.getClass(),e.getMessage());
      writeError(response, "</br> Delete Failed : </br>"+  e.getMessage());
    }
View Full Code Here

      for(WorkflowStep step : steps){
        if(step.getMyOrder() > maxOrder){
          maxOrder = step.getMyOrder() ;
        }
      }
      WorkflowStep step = new WorkflowStep();
      if(steps.size() != 0)
        maxOrder = maxOrder + 1;
      step.setMyOrder(maxOrder);
      step.setName(stepName);
      step.setSchemeId(schemeId);
      step.setResolved(stepResolved);
      wapi.saveStep(step);
     
    } catch (DotDataException e) {
      Logger.error(this.getClass(),e.getMessage(),e);
      writeError(response, e.getMessage());
View Full Code Here

    WorkflowAPI wapi = APILocator.getWorkflowAPI();

    try {

      WorkflowAction action = wapi.findAction(actionId, APILocator.getUserAPI().getSystemUser());
      WorkflowStep step = wapi.findStep(action.getStepId());

     
     
     
      wapi.deleteAction(action);
      writeSuccess(response, step.getSchemeId() );
    } catch (Exception e) {
      Logger.error(this.getClass(), e.getMessage(), e);
      writeError(response, e.getMessage());
    }
View Full Code Here

    // clear the cache
    cache.flushGroup(STEP_GROUP);
   
  }
  protected WorkflowStep getStep(String key) {
    WorkflowStep step = null;
    try {
      step = (WorkflowStep) cache.get(key, STEP_GROUP);
    } catch (DotCacheException e) {
      Logger.debug(this, "Cache Entry not found", e);
    }
View Full Code Here

TOP

Related Classes of com.dotmarketing.portlets.workflows.model.WorkflowStep

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.