<?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" exporter="Camunda Modeler" exporterVersion="4.12.0">
  <process id="PurchContract" name="采购合同管理流程" isExecutable="true">
    <startEvent id="startevent1" name="采购合同被创建完成"></startEvent>
    <userTask id="purch_contract_create" name="采购合同录入" activiti:assignee="${purch_contract_create_assignee}" activiti:formKey="/purchContract/add"></userTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="purch_contract_create"></sequenceFlow>
    <userTask id="purch_contract_approval" name="采购合同审核" activiti:candidateUsers="${purch_contract_approval_candidateUsers}" activiti:formKey="/purchContract/approval/add"></userTask>
    <sequenceFlow id="flow2" sourceRef="purch_contract_create" targetRef="purch_contract_approval"></sequenceFlow>
    <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
    <userTask id="purch_contract_sign_confirm" name="签署确认（线上）" activiti:assignee="${purch_contract_confirm_assignee}" activiti:formKey="/purchContract/confirm/add"></userTask>
    <sequenceFlow id="flow3" sourceRef="purch_contract_approval" targetRef="exclusivegateway1"></sequenceFlow>
    <sequenceFlow id="flow5" name="驳回" sourceRef="exclusivegateway1" targetRef="purch_contract_create">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='驳回'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow7" sourceRef="purch_contract_sign_confirm" targetRef="purch_contract_final_approval"></sequenceFlow>
    <userTask id="purch_contract_final_approval" name="签署审核" activiti:candidateUsers="${purch_contract_final_approval_candidateUsers}" activiti:formKey="/purchContract/final/approval/add"></userTask>
    <userTask id="purch_contract_sign_confirm_underline" name="签署确认（线下）" activiti:assignee="${purch_contract_confirm_underline_assignee}" activiti:formKey="/purchContract/confirm/add/underline"></userTask>
    <sequenceFlow id="flow15" name="线下" sourceRef="exclusivegateway1" targetRef="purch_contract_sign_confirm_underline">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='线下'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow16" sourceRef="purch_contract_sign_confirm_underline" targetRef="purch_contract_final_approval"></sequenceFlow>
    <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow17" sourceRef="purch_contract_final_approval" targetRef="exclusivegateway2"></sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow18" name="通过" sourceRef="exclusivegateway2" targetRef="endevent1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='通过'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow19" name="驳回" sourceRef="exclusivegateway2" targetRef="purch_contract_sign_confirm_underline">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='驳回'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow20" name="线上" sourceRef="exclusivegateway1" targetRef="purch_contract_sign_confirm">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='线上'}]]></conditionExpression>
    </sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_PurchContract">
    <bpmndi:BPMNPlane bpmnElement="PurchContract" id="BPMNPlane_PurchContract">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="35.0" y="170.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="purch_contract_create" id="BPMNShape_purch_contract_create">
        <omgdc:Bounds height="55.0" width="105.0" x="159.0" y="160.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="purch_contract_approval" id="BPMNShape_purch_contract_approval">
        <omgdc:Bounds height="55.0" width="105.0" x="370.0" y="160.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
        <omgdc:Bounds height="40.0" width="40.0" x="553.0" y="167.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="purch_contract_sign_confirm" id="BPMNShape_purch_contract_sign_confirm">
        <omgdc:Bounds height="55.0" width="105.0" x="683.0" y="160.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="purch_contract_final_approval" id="BPMNShape_purch_contract_final_approval">
        <omgdc:Bounds height="55.0" width="105.0" x="883.0" y="160.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="purch_contract_sign_confirm_underline" id="BPMNShape_purch_contract_sign_confirm_underline">
        <omgdc:Bounds height="55.0" width="105.0" x="521.0" y="310.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
        <omgdc:Bounds height="40.0" width="40.0" x="1083.0" y="167.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="1213.0" y="170.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="70.0" y="187.0"></omgdi:waypoint>
        <omgdi:waypoint x="159.0" y="187.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="264.0" y="187.0"></omgdi:waypoint>
        <omgdi:waypoint x="370.0" y="187.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="475.0" y="187.0"></omgdi:waypoint>
        <omgdi:waypoint x="553.0" y="187.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="573.0" y="167.0"></omgdi:waypoint>
        <omgdi:waypoint x="573.0" y="85.0"></omgdi:waypoint>
        <omgdi:waypoint x="211.0" y="85.0"></omgdi:waypoint>
        <omgdi:waypoint x="211.0" y="160.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="42.0" width="22.0" x="349.0" y="91.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="788.0" y="187.0"></omgdi:waypoint>
        <omgdi:waypoint x="883.0" y="187.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15">
        <omgdi:waypoint x="573.0" y="207.0"></omgdi:waypoint>
        <omgdi:waypoint x="573.0" y="310.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="578.0" y="249.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow16" id="BPMNEdge_flow16">
        <omgdi:waypoint x="626.0" y="337.0"></omgdi:waypoint>
        <omgdi:waypoint x="935.0" y="337.0"></omgdi:waypoint>
        <omgdi:waypoint x="935.0" y="215.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow17" id="BPMNEdge_flow17">
        <omgdi:waypoint x="988.0" y="187.0"></omgdi:waypoint>
        <omgdi:waypoint x="1083.0" y="187.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow18" id="BPMNEdge_flow18">
        <omgdi:waypoint x="1123.0" y="187.0"></omgdi:waypoint>
        <omgdi:waypoint x="1213.0" y="187.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="1147.0" y="170.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow19" id="BPMNEdge_flow19">
        <omgdi:waypoint x="1103.0" y="207.0"></omgdi:waypoint>
        <omgdi:waypoint x="1103.0" y="431.0"></omgdi:waypoint>
        <omgdi:waypoint x="573.0" y="431.0"></omgdi:waypoint>
        <omgdi:waypoint x="573.0" y="365.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="903.0" y="409.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow20" id="BPMNEdge_flow20">
        <omgdi:waypoint x="593.0" y="187.0"></omgdi:waypoint>
        <omgdi:waypoint x="683.0" y="187.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="100.0" x="619.0" y="170.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>