123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <?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:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
- <process id="leave-countersign" name="请假流程-会签" isExecutable="true">
- <documentation>请假流程演示-会签</documentation>
- <startEvent id="startevent1" name="Start" activiti:initiator="applyUserId">
- <extensionElements>
- <activiti:formProperty id="startDate" name="请假开始日期" type="date" datePattern="yyyy-MM-dd" required="true"></activiti:formProperty>
- <activiti:formProperty id="endDate" name="请假结束日期" type="date" datePattern="yyyy-MM-dd" required="true"></activiti:formProperty>
- <activiti:formProperty id="reason" name="请假原因" type="string" required="true"></activiti:formProperty>
- <activiti:formProperty id="users" name="审批参与人" type="users" required="true"></activiti:formProperty>
- <activiti:formProperty id="validScript" type="javascript" default="alert('表单已经加载完毕');"></activiti:formProperty>
- </extensionElements>
- </startEvent>
- <userTask id="countersign" name="[部门/人事]联合会签" activiti:assignee="${user}">
- <extensionElements>
- <activiti:formProperty id="startDate" name="请假开始日期" type="date" datePattern="yyyy-MM-dd" writable="false"></activiti:formProperty>
- <activiti:formProperty id="endDate" name="请假结束日期" type="date" datePattern="yyyy-MM-dd" writable="false"></activiti:formProperty>
- <activiti:formProperty id="reason" name="请假原因" type="string" writable="false"></activiti:formProperty>
- <activiti:formProperty id="approved" name="审批意见" type="enum" required="true">
- <activiti:value id="true" name="同意"></activiti:value>
- <activiti:value id="false" name="拒绝"></activiti:value>
- </activiti:formProperty>
- <activiti:taskListener event="complete" delegateExpression="${leaveCounterSignCompleteListener}"></activiti:taskListener>
- </extensionElements>
- <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="users" activiti:elementVariable="user"></multiInstanceLoopCharacteristics>
- </userTask>
- <userTask id="reportBack" name="销假" activiti:assignee="${applyUserId}">
- <extensionElements>
- <activiti:formProperty id="startDate" name="请假开始日期" type="date" datePattern="yyyy-MM-dd" writable="false"></activiti:formProperty>
- <activiti:formProperty id="endDate" name="请假结束日期" type="date" datePattern="yyyy-MM-dd" writable="false"></activiti:formProperty>
- <activiti:formProperty id="reason" name="请假原因" type="string" writable="false"></activiti:formProperty>
- <activiti:formProperty id="reportBackDate" name="销假日期" type="date" default="${endDate}" datePattern="yyyy-MM-dd" required="true"></activiti:formProperty>
- </extensionElements>
- </userTask>
- <endEvent id="endevent1" name="End"></endEvent>
- <sequenceFlow id="flow2" sourceRef="startevent1" targetRef="countersign">
- <extensionElements>
- <activiti:executionListener event="take" expression="${execution.setVariable('approvedCounter', 0)}"></activiti:executionListener>
- </extensionElements>
- </sequenceFlow>
- <sequenceFlow id="flow8" name="销假" sourceRef="reportBack" targetRef="endevent1">
- <extensionElements>
- <activiti:executionListener event="take" expression="${execution.setVariable('result', 'ok')}"></activiti:executionListener>
- </extensionElements>
- </sequenceFlow>
- <sequenceFlow id="flow13" name="全部通过" sourceRef="exclusivegateway1" targetRef="reportBack">
- <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approvedCounter == users.size()}]]></conditionExpression>
- </sequenceFlow>
- <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
- <sequenceFlow id="flow14" sourceRef="countersign" targetRef="exclusivegateway1"></sequenceFlow>
- <userTask id="modifyApply" name="调整申请" activiti:assignee="${applyUserId}">
- <extensionElements>
- <activiti:formProperty id="startDate" name="请假开始日期" type="date" datePattern="yyyy-MM-dd" required="true"></activiti:formProperty>
- <activiti:formProperty id="endDate" name="请假结束日期" type="date" datePattern="yyyy-MM-dd" required="true"></activiti:formProperty>
- <activiti:formProperty id="reason" name="请假原因" type="string" required="true"></activiti:formProperty>
- <activiti:formProperty id="reApply" name="重新申请" type="enum" required="true">
- <activiti:value id="true" name="重新申请"></activiti:value>
- <activiti:value id="false" name="取消申请"></activiti:value>
- </activiti:formProperty>
- </extensionElements>
- </userTask>
- <sequenceFlow id="flow15" name="部分通过" sourceRef="exclusivegateway1" targetRef="modifyApply">
- <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approvedCounter < users.size()}]]></conditionExpression>
- </sequenceFlow>
- <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
- <sequenceFlow id="flow16" sourceRef="modifyApply" targetRef="exclusivegateway2"></sequenceFlow>
- <sequenceFlow id="flow17" sourceRef="exclusivegateway2" targetRef="endevent1">
- <conditionExpression xsi:type="tFormalExpression"><![CDATA[${reApply == 'false'}]]></conditionExpression>
- </sequenceFlow>
- <sequenceFlow id="flow18" name="重新申请" sourceRef="exclusivegateway2" targetRef="countersign">
- <extensionElements>
- <activiti:executionListener event="take" expression="${execution.setVariable('approvedCounter', 0)}"></activiti:executionListener>
- </extensionElements>
- <conditionExpression xsi:type="tFormalExpression"><![CDATA[${reApply == 'true'}]]></conditionExpression>
- </sequenceFlow>
- </process>
- <bpmndi:BPMNDiagram id="BPMNDiagram_leave-countersign">
- <bpmndi:BPMNPlane bpmnElement="leave-countersign" id="BPMNPlane_leave-countersign">
- <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
- <omgdc:Bounds height="35.0" width="35.0" x="10.0" y="30.0"></omgdc:Bounds>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape bpmnElement="countersign" id="BPMNShape_countersign">
- <omgdc:Bounds height="55.0" width="105.0" x="90.0" y="20.0"></omgdc:Bounds>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape bpmnElement="reportBack" id="BPMNShape_reportBack">
- <omgdc:Bounds height="55.0" width="105.0" x="340.0" y="20.0"></omgdc:Bounds>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
- <omgdc:Bounds height="35.0" width="35.0" x="375.0" y="203.0"></omgdc:Bounds>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
- <omgdc:Bounds height="40.0" width="40.0" x="220.0" y="27.0"></omgdc:Bounds>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape bpmnElement="modifyApply" id="BPMNShape_modifyApply">
- <omgdc:Bounds height="55.0" width="105.0" x="188.0" y="110.0"></omgdc:Bounds>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
- <omgdc:Bounds height="40.0" width="40.0" x="220.0" y="200.0"></omgdc:Bounds>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
- <omgdi:waypoint x="45.0" y="47.0"></omgdi:waypoint>
- <omgdi:waypoint x="90.0" y="47.0"></omgdi:waypoint>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
- <omgdi:waypoint x="392.0" y="75.0"></omgdi:waypoint>
- <omgdi:waypoint x="392.0" y="203.0"></omgdi:waypoint>
- <bpmndi:BPMNLabel>
- <omgdc:Bounds height="11.0" width="22.0" x="400.0" y="131.0"></omgdc:Bounds>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">
- <omgdi:waypoint x="260.0" y="47.0"></omgdi:waypoint>
- <omgdi:waypoint x="340.0" y="47.0"></omgdi:waypoint>
- <bpmndi:BPMNLabel>
- <omgdc:Bounds height="11.0" width="44.0" x="270.0" y="30.0"></omgdc:Bounds>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">
- <omgdi:waypoint x="195.0" y="47.0"></omgdi:waypoint>
- <omgdi:waypoint x="220.0" y="47.0"></omgdi:waypoint>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15">
- <omgdi:waypoint x="240.0" y="67.0"></omgdi:waypoint>
- <omgdi:waypoint x="240.0" y="110.0"></omgdi:waypoint>
- <bpmndi:BPMNLabel>
- <omgdc:Bounds height="11.0" width="44.0" x="250.0" y="67.0"></omgdc:Bounds>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge bpmnElement="flow16" id="BPMNEdge_flow16">
- <omgdi:waypoint x="240.0" y="165.0"></omgdi:waypoint>
- <omgdi:waypoint x="240.0" y="200.0"></omgdi:waypoint>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge bpmnElement="flow17" id="BPMNEdge_flow17">
- <omgdi:waypoint x="260.0" y="220.0"></omgdi:waypoint>
- <omgdi:waypoint x="375.0" y="220.0"></omgdi:waypoint>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge bpmnElement="flow18" id="BPMNEdge_flow18">
- <omgdi:waypoint x="220.0" y="220.0"></omgdi:waypoint>
- <omgdi:waypoint x="142.0" y="220.0"></omgdi:waypoint>
- <omgdi:waypoint x="142.0" y="75.0"></omgdi:waypoint>
- <bpmndi:BPMNLabel>
- <omgdc:Bounds height="11.0" width="44.0" x="163.0" y="203.0"></omgdc:Bounds>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
- </definitions>
|