<?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="SalesContract" name="销售合同管理流程" isExecutable="true">
    <startEvent id="startevent1" name="业务创建完成"></startEvent>
    <userTask id="sales_contract_create" name="销售合同创建" activiti:assignee="${sales_contract_create_assignee}"></userTask>
    <userTask id="template_first_approval" name="模板初审" activiti:candidateUsers="${template_first_approval_candidate}"></userTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="sales_contract_create"></sequenceFlow>
    <sequenceFlow id="flow2" sourceRef="sales_contract_create" targetRef="template_first_approval"></sequenceFlow>
    <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow5" name="驳回" sourceRef="exclusivegateway1" targetRef="sales_contract_create">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='驳回'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow7" sourceRef="template_first_approval" targetRef="exclusivegateway1"></sequenceFlow>
    <userTask id="template_again_approval" name="模板复审" activiti:candidateUsers="${template_again_approval_candidate}"></userTask>
    <sequenceFlow id="flow8" name="复审" sourceRef="exclusivegateway1" targetRef="template_again_approval">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='复审'}]]></conditionExpression>
    </sequenceFlow>
    <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow9" sourceRef="template_again_approval" targetRef="exclusivegateway2"></sequenceFlow>
    <userTask id="sales_contract_basic" name="销售合同录入" activiti:assignee="${sales_contract_basic_assignee}"></userTask>
    <sequenceFlow id="flow10" name="通过" sourceRef="exclusivegateway2" targetRef="sales_contract_basic">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='通过'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow11" name="驳回" sourceRef="exclusivegateway2" targetRef="sales_contract_create">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='驳回'}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="sales_contract_approval" name="信息审核" activiti:candidateUsers="${sales_contract_approval_candidate}"></userTask>
    <sequenceFlow id="flow12" sourceRef="sales_contract_basic" targetRef="sales_contract_approval"></sequenceFlow>
    <exclusiveGateway id="exclusivegateway3" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow13" sourceRef="sales_contract_approval" targetRef="exclusivegateway3"></sequenceFlow>
    <userTask id="sales_sign_confirmation" name="签署确认" activiti:assignee="${sales_sign_confirmation_assignee}"></userTask>
    <sequenceFlow id="flow14" name="签署" sourceRef="exclusivegateway3" targetRef="sales_sign_confirmation">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='签署'}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="sign_confirmation_approval" name="签署审核" activiti:candidateUsers="${sign_confirmation_approval_candidate}"></userTask>
    <sequenceFlow id="flow16" sourceRef="sales_sign_confirmation" targetRef="sign_confirmation_approval"></sequenceFlow>
    <endEvent id="endevent2" name="End"></endEvent>
    <sequenceFlow id="flow17" sourceRef="sign_confirmation_approval" targetRef="endevent2"></sequenceFlow>
    <sequenceFlow id="flow21" name="驳回" sourceRef="exclusivegateway3" targetRef="sales_contract_basic">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='驳回'}]]></conditionExpression>
    </sequenceFlow>
    <endEvent id="endevent3" name="End"></endEvent>
    <sequenceFlow id="flow22" name="不签署" sourceRef="exclusivegateway3" targetRef="endevent3">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='不签署'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow23" name="信息录入" sourceRef="exclusivegateway1" targetRef="sales_contract_basic">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='信息录入'}]]></conditionExpression>
    </sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_SalesContract">
    <bpmndi:BPMNPlane bpmnElement="SalesContract" id="BPMNPlane_SalesContract">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="170.0" y="180.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sales_contract_create" id="BPMNShape_sales_contract_create">
        <omgdc:Bounds height="55.0" width="105.0" x="347.0" y="170.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="template_first_approval" id="BPMNShape_template_first_approval">
        <omgdc:Bounds height="55.0" width="105.0" x="567.0" y="170.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
        <omgdc:Bounds height="40.0" width="40.0" x="740.0" y="177.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="template_again_approval" id="BPMNShape_template_again_approval">
        <omgdc:Bounds height="55.0" width="105.0" x="860.0" y="170.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
        <omgdc:Bounds height="40.0" width="40.0" x="1015.0" y="178.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sales_contract_basic" id="BPMNShape_sales_contract_basic">
        <omgdc:Bounds height="55.0" width="105.0" x="1100.0" y="171.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sales_contract_approval" id="BPMNShape_sales_contract_approval">
        <omgdc:Bounds height="55.0" width="105.0" x="1250.0" y="171.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway3" id="BPMNShape_exclusivegateway3">
        <omgdc:Bounds height="40.0" width="40.0" x="1400.0" y="179.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sales_sign_confirmation" id="BPMNShape_sales_sign_confirmation">
        <omgdc:Bounds height="55.0" width="105.0" x="1485.0" y="172.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sign_confirmation_approval" id="BPMNShape_sign_confirmation_approval">
        <omgdc:Bounds height="55.0" width="105.0" x="1635.0" y="172.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">
        <omgdc:Bounds height="35.0" width="35.0" x="1785.0" y="182.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent3" id="BPMNShape_endevent3">
        <omgdc:Bounds height="35.0" width="35.0" x="1403.0" y="280.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="205.0" y="197.0"></omgdi:waypoint>
        <omgdi:waypoint x="347.0" y="197.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="452.0" y="197.0"></omgdi:waypoint>
        <omgdi:waypoint x="567.0" y="197.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="760.0" y="177.0"></omgdi:waypoint>
        <omgdi:waypoint x="760.0" y="114.0"></omgdi:waypoint>
        <omgdi:waypoint x="399.0" y="114.0"></omgdi:waypoint>
        <omgdi:waypoint x="399.0" y="170.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="48.0" width="22.0" x="543.0" y="91.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="672.0" y="197.0"></omgdi:waypoint>
        <omgdi:waypoint x="740.0" y="197.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
        <omgdi:waypoint x="780.0" y="197.0"></omgdi:waypoint>
        <omgdi:waypoint x="860.0" y="197.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="809.0" y="202.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
        <omgdi:waypoint x="965.0" y="197.0"></omgdi:waypoint>
        <omgdi:waypoint x="1015.0" y="198.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
        <omgdi:waypoint x="1055.0" y="198.0"></omgdi:waypoint>
        <omgdi:waypoint x="1100.0" y="198.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="1054.0" y="180.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
        <omgdi:waypoint x="1035.0" y="178.0"></omgdi:waypoint>
        <omgdi:waypoint x="1034.0" y="65.0"></omgdi:waypoint>
        <omgdi:waypoint x="399.0" y="65.0"></omgdi:waypoint>
        <omgdi:waypoint x="399.0" y="170.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="100.0" x="781.0" y="51.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
        <omgdi:waypoint x="1205.0" y="198.0"></omgdi:waypoint>
        <omgdi:waypoint x="1250.0" y="198.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">
        <omgdi:waypoint x="1355.0" y="198.0"></omgdi:waypoint>
        <omgdi:waypoint x="1400.0" y="199.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">
        <omgdi:waypoint x="1440.0" y="199.0"></omgdi:waypoint>
        <omgdi:waypoint x="1485.0" y="199.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="1440.0" y="199.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow16" id="BPMNEdge_flow16">
        <omgdi:waypoint x="1590.0" y="199.0"></omgdi:waypoint>
        <omgdi:waypoint x="1635.0" y="199.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow17" id="BPMNEdge_flow17">
        <omgdi:waypoint x="1740.0" y="199.0"></omgdi:waypoint>
        <omgdi:waypoint x="1785.0" y="199.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow21" id="BPMNEdge_flow21">
        <omgdi:waypoint x="1420.0" y="179.0"></omgdi:waypoint>
        <omgdi:waypoint x="1419.0" y="88.0"></omgdi:waypoint>
        <omgdi:waypoint x="1148.0" y="88.0"></omgdi:waypoint>
        <omgdi:waypoint x="1152.0" y="171.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="1241.0" y="66.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow22" id="BPMNEdge_flow22">
        <omgdi:waypoint x="1420.0" y="219.0"></omgdi:waypoint>
        <omgdi:waypoint x="1420.0" y="280.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="100.0" x="1420.0" y="225.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow23" id="BPMNEdge_flow23">
        <omgdi:waypoint x="760.0" y="217.0"></omgdi:waypoint>
        <omgdi:waypoint x="760.0" y="345.0"></omgdi:waypoint>
        <omgdi:waypoint x="1151.0" y="345.0"></omgdi:waypoint>
        <omgdi:waypoint x="1152.0" y="226.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="100.0" x="900.0" y="329.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>