<?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="invoiceManager" name="发票管理流程" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="sale_invoice_create" name="提交申请" activiti:assignee="${sale_invoice_create_assignee}" activiti:formKey="/saleInvoice/add"></userTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="sale_invoice_create"></sequenceFlow>
    <userTask id="sale_invoice_approval" name="业务审核" activiti:candidateUsers="${sale_invoice_approval_candidate}" activiti:formKey="/saleInvoice/approval/add"></userTask>
    <sequenceFlow id="flow2" sourceRef="sale_invoice_create" targetRef="sale_invoice_approval"></sequenceFlow>
    <userTask id="sale_invoice_approval1" name="财务审核" activiti:candidateUsers="${sale_invoice_financial_approval_candidate}" activiti:formKey="/saleInvoice/approval/add"></userTask>
    <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
    <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow4" sourceRef="sale_invoice_approval" targetRef="exclusivegateway1"></sequenceFlow>
    <sequenceFlow id="flow5" name="通过" sourceRef="exclusivegateway1" targetRef="sale_invoice_approval1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='通过'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow6" name="驳回" sourceRef="exclusivegateway1" targetRef="sale_invoice_create">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='驳回'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow7" sourceRef="sale_invoice_approval1" targetRef="exclusivegateway2"></sequenceFlow>
    <sequenceFlow id="flow8" name="通过" sourceRef="exclusivegateway2" targetRef="endevent1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='通过'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow9" name="驳回" sourceRef="exclusivegateway2" targetRef="sale_invoice_create">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result=='驳回'}]]></conditionExpression>
    </sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_invoiceManager">
    <bpmndi:BPMNPlane bpmnElement="invoiceManager" id="BPMNPlane_invoiceManager">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="210.0" y="299.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sale_invoice_create" id="BPMNShape_sale_invoice_create">
        <omgdc:Bounds height="55.0" width="105.0" x="320.0" y="292.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sale_invoice_approval" id="BPMNShape_sale_invoice_approval">
        <omgdc:Bounds height="55.0" width="105.0" x="523.0" y="292.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sale_invoice_approval1" id="BPMNShape_sale_invoice_approval1">
        <omgdc:Bounds height="55.0" width="105.0" x="721.0" y="295.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
        <omgdc:Bounds height="40.0" width="40.0" x="638.0" y="302.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
        <omgdc:Bounds height="40.0" width="40.0" x="860.0" y="299.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="1070.0" y="299.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sign_settlement" id="BPMNShape_sign_settlement">
        <omgdc:Bounds height="55.0" width="105.0" x="970.0" y="292.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="245.0" y="316.0"></omgdi:waypoint>
        <omgdi:waypoint x="320.0" y="319.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="425.0" y="319.0"></omgdi:waypoint>
        <omgdi:waypoint x="523.0" y="319.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="628.0" y="319.0"></omgdi:waypoint>
        <omgdi:waypoint x="638.0" y="322.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="678.0" y="322.0"></omgdi:waypoint>
        <omgdi:waypoint x="721.0" y="322.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="748.0" y="327.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="658.0" y="302.0"></omgdi:waypoint>
        <omgdi:waypoint x="658.0" y="224.0"></omgdi:waypoint>
        <omgdi:waypoint x="658.0" y="183.0"></omgdi:waypoint>
        <omgdi:waypoint x="658.0" y="148.0"></omgdi:waypoint>
        <omgdi:waypoint x="658.0" y="148.0"></omgdi:waypoint>
        <omgdi:waypoint x="611.0" y="148.0"></omgdi:waypoint>
        <omgdi:waypoint x="675.0" y="148.0"></omgdi:waypoint>
        <omgdi:waypoint x="675.0" y="148.0"></omgdi:waypoint>
        <omgdi:waypoint x="579.0" y="148.0"></omgdi:waypoint>
        <omgdi:waypoint x="372.0" y="148.0"></omgdi:waypoint>
        <omgdi:waypoint x="372.0" y="292.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="429.0" y="226.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="826.0" y="322.0"></omgdi:waypoint>
        <omgdi:waypoint x="860.0" y="319.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
        <omgdi:waypoint x="980.0" y="319.0"></omgdi:waypoint>
        <omgdi:waypoint x="1070.0" y="316.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="930.0" y="324.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
        <omgdi:waypoint x="880.0" y="299.0"></omgdi:waypoint>
        <omgdi:waypoint x="880.0" y="148.0"></omgdi:waypoint>
        <omgdi:waypoint x="579.0" y="148.0"></omgdi:waypoint>
        <omgdi:waypoint x="372.0" y="148.0"></omgdi:waypoint>
        <omgdi:waypoint x="372.0" y="292.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="651.0" y="223.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>