posts - 431,  comments - 344,  trackbacks - 0
JBPM4.4中提供的foreach可以实现会签功能,流程定义如下:

 

<?xml version="1.0" encoding="UTF-8"?>

<process name="DCC" xmlns="http://jbpm.org/4.4/jpdl">
   <start g="373,8,48,48" name="start1">
      <transition name="to Submit" to="Submit" g="-50,-18"/>
   </start>
   <task assignee="#{executor}" g="353,121,92,52" name="Submit">
      <transition g="-61,-18" name="to foreach1" to="foreach1"/>
   </task>
   <foreach g="374,217,48,48" in="#{executors}" name="foreach1" var="executor">
      <transition g="-94,-18" name="to Collect Approve" to="Collect Approve"/>
   </foreach>
   <task assignee="#{executor}" g="354,303,92,52" name="Collect Approve">
      <transition g="-41,-18" name="Approve" to="join1"/>
      <transition g="538,329;535,143:-34,-9" name="Reject" to="Submit"/>
   </task>
   <join g="377,405,48,48" name="join1" multiplicity="#{quorum}">
      <transition g="-59,-18" name="to Librarian Curator" to="Librarian Curator"/>
   </join>
   <task assignee="#{curator}" g="358,496,92,52" name="Librarian Curator">
      <transition g="-42,-18" name="Approve" to="end1"/>
      <transition g="231,527;224,148:-34,-18" name="Reject" to="Submit"/>
   </task>
   <end g="382,602,48,48" name="end1"/>
</process>


这里executors是多个审批人帐号名字符串用逗号链接。这里quorum就是最终根据多人中有几个人通过,则就会进入下一步,用来起到决定作用。
posted on 2011-03-29 09:32 周锐 阅读(1113) 评论(0)  编辑  收藏 所属分类: jBPM

只有注册用户登录后才能发表评论。


网站导航: