flowable工作流会签的基本配置

1、看了网络上很多资料,搞清关系后其实配置起来很简单的,也不需要配置任务监听器,flowable内置参数基本都处理了,先上代码

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:bioc="http://bpmn.io/schema/bpmn/biocolor/1.0" xmlns:flowable="http://flowable.org/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.flowable.org/processdef">
  <process id="process_jg7j958b" name="name_az4bc4q1">
    <startEvent id="startNode1" name="开始">
      <outgoing>Flow_04v8k6f</outgoing>
    </startEvent>
    <sequenceFlow id="Flow_04v8k6f" sourceRef="startNode1" targetRef="Activity_1wrqb23" />
    <sequenceFlow id="Flow_19funy9" sourceRef="Activity_1wrqb23" targetRef="Activity_1fswrej" />
    <endEvent id="Event_06xiwei">
      <incoming>Flow_0d4k09g</incoming>
    </endEvent>
    <sequenceFlow id="Flow_0d4k09g" sourceRef="Activity_1fswrej" targetRef="Event_06xiwei" />
    <userTask id="Activity_1wrqb23" name="会签1" flowable:assignee="${user}">
      <documentation>会签1</documentation>
      <incoming>Flow_04v8k6f</incoming>
      <outgoing>Flow_19funy9</outgoing>
      <multiInstanceLoopCharacteristics flowable:collection="${users}" flowable:elementVariable="user">
        <completionCondition>${nrOfCompletedInstances/nrOfInstances &gt;= 0.5}</completionCondition>
      </multiInstanceLoopCharacteristics>
    </userTask>
    <userTask id="Activity_1fswrej" name="若依" flowable:assignee="1">
      <documentation>若依</documentation>
      <incoming>Flow_19funy9</incoming>
      <outgoing>Flow_0d4k09g</outgoing>
    </userTask>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_flow">
    <bpmndi:BPMNPlane id="BPMNPlane_flow" bpmnElement="process_jg7j958b">
      <bpmndi:BPMNEdge id="Flow_0d4k09g_di" bpmnElement="Flow_0d4k09g">
        <di:waypoint x="480" y="160" />
        <di:waypoint x="542" y="160" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_19funy9_di" bpmnElement="Flow_19funy9">
        <di:waypoint x="320" y="160" />
        <di:waypoint x="380" y="160" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_04v8k6f_di" bpmnElement="Flow_04v8k6f">
        <di:waypoint x="165" y="160" />
        <di:waypoint x="220" y="160" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="BPMNShape_startNode1" bpmnElement="startNode1" bioc:stroke="">
        <omgdc:Bounds x="135" y="145" width="30" height="30" />
        <bpmndi:BPMNLabel>
          <omgdc:Bounds x="138" y="182" width="22" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_06xiwei_di" bpmnElement="Event_06xiwei">
        <omgdc:Bounds x="542" y="142" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0wfi80e_di" bpmnElement="Activity_1wrqb23">
        <omgdc:Bounds x="220" y="120" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1r2hujl_di" bpmnElement="Activity_1fswrej">
        <omgdc:Bounds x="380" y="120" width="100" height="80" />
      </bpmndi:BPMNShape>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

2、上面是一个基本的简单的会签流程,上面的比较复杂,请着重看这一块

3、无论通过什么样的模型编辑器,最终得到的xml一定要是这个关系才行

说明:${users}是系统传入的会签候选人的集合,user是循环过程中的每一个人员变量,而最终分配审批任务指定人员的是${user},如果这个不设置,在分配任务的时候,是没有人员信息的,这点很重要 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值