Package com.dotmarketing.portlets.workflows.model

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


    task.setWebasset(contentlet.getInode());

    //HibernateUtil.saveOrUpdate(task);

    //Save the work flow comment
    WorkflowComment taskComment = new WorkflowComment ();
    taskComment.setComment(task.getDescription());
    taskComment.setCreationDate(new Date());
    taskComment.setPostedBy(user.getUserId());
    HibernateUtil.saveOrUpdate(taskComment);
    relAPI.addRelationship(task.getInode(), taskComment.getInode(), "child");

    //Save the work flow history
    WorkflowHistory hist = new WorkflowHistory ();
    hist.setChangeDescription("Task Creation");
    hist.setCreationDate(new Date ());
View Full Code Here


    task.setDueDate(null);
    task.setWebasset(contentlet.getInode());
    //APILocator.getWorkflowAPI().saveWorkflowTask(task);

    //Save the work flow comment
    WorkflowComment taskComment = new WorkflowComment ();
    taskComment.setComment(task.getDescription());
    taskComment.setCreationDate(new Date());
    taskComment.setPostedBy(user.getUserId());
    taskComment.setWorkflowtaskId(task.getId());
    APILocator.getWorkflowAPI().saveComment(taskComment);

    //Save the work flow history
    WorkflowHistory hist = new WorkflowHistory ();
    hist.setChangeDescription("Task Creation");
View Full Code Here

          newTask.setId(null);
          newTask.setWebasset(resultContentlet.getIdentifier());
          APILocator.getWorkflowAPI().saveWorkflowTask(newTask);

          for(WorkflowComment comment : APILocator.getWorkflowAPI().findWorkFlowComments(task)) {
              WorkflowComment newComment=new WorkflowComment();
              BeanUtils.copyProperties(comment, newComment);
              newComment.setId(null);
              newComment.setWorkflowtaskId(newTask.getId());
              APILocator.getWorkflowAPI().saveComment(newComment);
          }

          for(WorkflowHistory history : APILocator.getWorkflowAPI().findWorkflowHistory(task)) {
              WorkflowHistory newHistory=new WorkflowHistory();
View Full Code Here

              }
             
              String[] to = (String[]) recipients.toArray(new String[recipients.size()]);

              WorkflowProcessor processor = new WorkflowProcessor(cont,usr);
                        WorkflowComment comment = new WorkflowComment();
             
              // Commenting on task to review
              comment.setComment(LanguageUtil.get(PublicCompanyFactory.getDefaultCompany(), "Please-review-this-content-comment"));             
              comment.setWorkflowtaskId(task.getId());
              comment.setCreationDate(new Date());
              comment.setPostedBy(systemUser.getUserId());
              wapi.saveComment(comment);
             
              // Sending Email to review the content
              WorkflowEmailUtil.sendWorkflowEmail(processor, to, LanguageUtil.get(PublicCompanyFactory.getDefaultCompany(), "Please-review-this-content-comment"), LanguageUtil.get(PublicCompanyFactory.getDefaultCompany(), "Please-review-this-content-email"), true);
                  }else{
View Full Code Here

    ActionRequestImpl reqImpl = (ActionRequestImpl) req;
    ActionResponseImpl resImpl  = (ActionResponseImpl) res;
    HttpServletRequest httpReq= reqImpl.getHttpServletRequest();
    HttpServletResponse httpRes= resImpl.getHttpServletResponse();
    String comment = req.getParameter ("comment");
    WorkflowComment taskComment = new WorkflowComment ();
    taskComment.setComment(comment);
    taskComment.setCreationDate(new Date());
    taskComment.setPostedBy(user.getUserId());
    taskComment.setWorkflowtaskId(task.getId());
    wfAPI.saveComment(taskComment);

    String changeDesc = LanguageUtil.get(user, "edit_worflow.history.comment.added") + comment;
    _logWorkflowTaskHistory(task, user, changeDesc);
View Full Code Here

     
        Status stat = twitter.updateStatus(tweatThis);
       
       

        WorkflowComment comment = new WorkflowComment();
        comment.setPostedBy(processor.getUser().getUserId());
        comment.setComment("Tweeted: " + tweatThis + " twitterId:" + stat.getId());
        comment.setWorkflowtaskId(processor.getTask().getId());
        try {
          APILocator.getWorkflowAPI().saveComment(comment);
        } catch (DotDataException e) {
          Logger.error(CommentOnWorkflowActionlet.class,e.getMessage(),e);
        }
View Full Code Here

    return "This actionlet allows you to add a comment on the workflow task.";
  }

  public void executeAction(WorkflowProcessor processor,Map<String,WorkflowActionClassParameter>  params) throws WorkflowActionFailureException {
    WorkflowActionClassParameter commentParam =  params.get("comment");
    WorkflowComment comment = new WorkflowComment();
    comment.setPostedBy(processor.getUser().getUserId());
    comment.setComment(commentParam.getValue());
    comment.setWorkflowtaskId(processor.getTask().getId());
    try {
      APILocator.getWorkflowAPI().saveComment(comment);
    } catch (DotDataException e) {
      Logger.error(CommentOnWorkflowActionlet.class,e.getMessage(),e);
    }
View Full Code Here

          task.setAssignedTo(processor.getNextAssign().getId());
        task.setStatus(processor.getNextStep().getId());

        saveWorkflowTask(task,processor);
        if(processor.getWorkflowMessage() != null){
          WorkflowComment comment = new WorkflowComment();
          comment.setComment(processor.getWorkflowMessage());

          comment.setWorkflowtaskId(task.getId());
          comment.setCreationDate(new Date());
          comment.setPostedBy(r.getId());
          saveComment(comment);
        }
      }

      List<WorkflowActionClass> actionClasses = processor.getActionClasses();
View Full Code Here

      task.setTitle(processor.getContentlet().getTitle());
    }


    if(processor.getWorkflowMessage() != null){
      WorkflowComment comment = new WorkflowComment();
      comment.setComment(processor.getWorkflowMessage());
      comment.setWorkflowtaskId(task.getId());
      saveComment(comment);
    }

  }
View Full Code Here

TOP

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

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.