Package com.dotmarketing.portlets.workflows.business

Examples of com.dotmarketing.portlets.workflows.business.DotWorkflowException


            }
    }catch(DotHibernateException e){
      if(local){
        HibernateUtil.rollbackTransaction();
      }
      throw new DotWorkflowException(e.getMessage());
 
    }
  }
View Full Code Here


          mail.setTextBody(emailText);
        }
        mail.sendMessage();
      }
    } catch (Exception e) {
      throw new DotWorkflowException("Exception ocurred trying to deliver emails for workflow " + e.getMessage());
    }

  }
View Full Code Here

      sendWorkflowEmail(processor, to, subject, emailText, true);


    } catch (Exception e) {

      throw new DotWorkflowException("Exception ocurred trying to deliver emails for workflow " + e.getMessage());
    }
  }
View Full Code Here

                    mail.setTextBody(emailText);
                }
                mail.sendMessage();
            }
        } catch (Exception e) {
            throw new DotWorkflowException("Exception ocurred trying to deliver emails for workflow " + e.getMessage());
        }

    }
View Full Code Here



      if (!UtilMethods.isSet(workflowActionId)) {
        if (scheme.isMandatory() ) {
          throw new DotWorkflowException(LanguageUtil.get(firingUser, "message.workflow.error.mandatory.action.type") + contentlet.getStructure().getName());
        }

        return;
      }


      try{
        action = getWorkflowAPI().findAction(workflowActionId, user);
      }
      catch(Exception ex){
        throw new DotWorkflowException(LanguageUtil.get(firingUser, "message.workflow.error.invalid.action") + contentlet.getStringProperty(Contentlet.WORKFLOW_ACTION_KEY));
      }


      if(action.requiresCheckout()){
        try{
          APILocator.getContentletAPI().canLock(contentlet, user);
        }
        catch(Exception ex){
          throw new DotWorkflowException(LanguageUtil.get(firingUser, "message.workflow.error.content.requires.lock") + contentlet.getStructure().getName());
        }
      }
      if (UtilMethods.isSet(contentlet.getStringProperty(Contentlet.WORKFLOW_ASSIGN_KEY))) {
        nextAssign = getRoleAPI().loadRoleById(contentlet.getStringProperty(Contentlet.WORKFLOW_ASSIGN_KEY));
      }
      if(!UtilMethods.isSet(nextAssign)){
        nextAssign = getRoleAPI().loadRoleById(action.getNextAssign());
      }


      // if the action's next assign is the "System User", we assign to the user executing the workflow
      if((!UtilMethods.isSet(nextAssign)) || getRoleAPI().loadCMSAnonymousRole().getId().equals(nextAssign.getId())){
        nextAssign = getRoleAPI().loadRoleByKey(user.getUserId());
      }



      if(UtilMethods.isSet(Contentlet.WORKFLOW_COMMENTS_KEY)){
        workflowMessage = contentlet.getStringProperty(Contentlet.WORKFLOW_COMMENTS_KEY);
      }

      nextStep = getWorkflowAPI().findStep(action.getNextStep());
      step = getWorkflowAPI().findStep(action.getStepId());
      actionClasses = getWorkflowAPI().findActionClasses(action);

      if(task != null && UtilMethods.isSet(task.getId())){
        history = getWorkflowAPI().findWorkflowHistory(task);
      }

    } catch (Exception e) {
      throw new DotWorkflowException(e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of com.dotmarketing.portlets.workflows.business.DotWorkflowException

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.