【问题标题】:Alfresco Community edition-5.1.x in workflow Move Document on Workflow Approve or Reject工作流程中的 Alfresco Community edition-5.1.x 在工作流程上移动文档批准或拒绝
【发布时间】:2016-06-10 15:42:55
【问题描述】:

我是 alfresco community edition-5.1.x 的新手,我通过 eclipse 使用 kickstart 创建了工作流 activiti,我部署到 alfresco 共享其工作正常,在该用户使用自定义工作流 activiti 表单用户分配给另一个用户进行批准后,一旦批准如果拒绝将文档活动到站点文档库中的拒绝文件夹,则将文档移动到站点文档库中的已批准文件夹,这可能吗,请帮忙。

【问题讨论】:

  • 您的问题不清楚且不完整。阅读如何提出问题并重新编写。

标签: java alfresco alfresco-share


【解决方案1】:

您必须使用工作流 starttasklistener ,并使用它来移动文件

为你添加监听器 bpmn20:

<userTask id="mytask" name="mytask" activiti:assignee="${mymodel.myassoc.properties.userName}" >

<activiti:taskListener event="create"  class="com.mycomp.StartTasklistener"/>
</userTask

com.mycomp.StartTasklistener 中的代码如下所示:

public class StartTasklistener extends TaskCreateListener 
public void notify(DelegateTask task) throws Exception {
   if (execution.getVariable("mymodel_myfiletomove") == null ){
      ActivitiScriptNode fileScriptNode= (ActivitiScriptNode) execution.getVariable("mymodel_myfiletomove");
      NodeRer newparent = ....
      serviceRegistry.getFileFolderService().move(newparent , fileScriptNode.getNodeRef())
   }
 }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-09-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-09-29
    相关资源
    最近更新 更多