zoukankan      html  css  js  c++  java
  • Activiti初学问题,求解

     <userTask id="writeReportTask" name="Write monthly financial report" >
    <documentation>
    Write monthly financial report for publication to shareholders.
    </documentation>

    <potentialOwner>
    <resourceAssignmentExpression>
    <formalExpression>accountancy</formalExpression>
    什么意思?用户组?
    </resourceAssignmentExpression>
    </potentialOwner>

    </userTask>
    
    

    Task lists

    问:??这里用用户kermit去查找他所有的任务,但在xml文件中只定义了一个会计(accountancy),但最后却用会计组也能得到和kermit相同的任务,为什么?这里也没有定义kermit在accountancy组中,如果要定义又在何处定义,具体怎么写呢?

    We can now retrieve this task through the TaskService by adding the following logic:
    List<Task> tasks = taskService.createTaskQuery().taskCandidateUser("kermit").list();

    Note that the user we pass to this operation needs to be a member of the accountancy group, since that was declared in the process definition:
    <potentialOwner>
    <resourceAssignmentExpression>
    <formalExpression>accountancy</formalExpression>
    </resourceAssignmentExpression>
    </potentialOwner>

    We could also use the task query API to get the same results using the name of the group. We can now add the following logic to our code:
    TaskService taskService = processEngine.getTaskService();
    List<Task> tasks = taskService.createTaskQuery().taskCandidateGroup("accountancy").list();
    Since we've configured our ProcessEngine to use the same database as the demo setup is using, we can now log intoActiviti Explorer. By default, no user is in the accountancy group. Login with kermit/kermit, click Groups and then "Create group". Then click Users and add the group to fozzie. Now login with fozzie/fozzie, and we will find that we can start our business process after selecting the Processes page and and clicking on the 'Start Process' link in the 'Actions' column corresponding to the 'Monthly financial report' process.(这里的创建组,怎么在XML中体现……)
  • 相关阅读:
    javascript的字段值,私有变量,静态方法声明
    取得序列中某个点的范围边界
    使用wubi安装ubuntu11.04后无线网卡被禁用无法打开解决办法
    WEB前端性能优化
    jQuery的arrayLike
    在手机上安装BT5系统,没错就是破解无线密码的那个
    PHP在子类方法B调用父类的方法A时,不传参数时仍能得到方法B的名称
    讨厌的文本选区
    PHP遍历解析XML为一个数组
    “软工厂代码生成工具”的学习笔记
  • 原文地址:https://www.cnblogs.com/freemrz/p/3994570.html
Copyright © 2011-2022 走看看