<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" 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" xmlns:tns="http://www.activiti.org/test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.w3.org/1999/XPath" id="m1525931452735" name="" targetNamespace="http://www.activiti.org/test" typeLanguage="http://www.w3.org/2001/XMLSchema">
  <collaboration id="COLLABORATION_1" isClosed="false">
    <participant id="_2" name="销售开单" processRef="salerKd">
      <participantMultiplicity maximum="1" minimum="0"/>
    </participant>
  </collaboration>
  <process id="salerKd" isClosed="false" isExecutable="true" processType="None" name="开单流程">
    <laneSet>
      <lane id="_3" name="销售">
        <flowNodeRef>startSalerKd</flowNodeRef>
        <flowNodeRef>buildRecord</flowNodeRef>
        <flowNodeRef>custComeEg</flowNodeRef>
        <flowNodeRef>endNotCome</flowNodeRef>
        <flowNodeRef>studentNeedClass</flowNodeRef>
        <flowNodeRef>selectProduct</flowNodeRef>
        <flowNodeRef>signContract</flowNodeRef>
        <flowNodeRef>payment</flowNodeRef>
        <flowNodeRef>submitOrder</flowNodeRef>
        <flowNodeRef>endSalerKd</flowNodeRef>
      </lane>
      <lane id="_4" name="教务">
        <flowNodeRef>studentNeedClassConfirm</flowNodeRef>
      </lane>
    </laneSet>
    <startEvent id="startSalerKd" name="启动开单">
      <extensionElements>
        <activiti:formProperty id="phone" name="学生手机" required="true" type="string"/>
        <activiti:formProperty id="studentName" name="学生姓名" type="string"/>
      </extensionElements>
    </startEvent>
    <userTask activiti:assignee="${saleUserId}" activiti:exclusive="true" id="buildRecord" name="上门建档">
      <extensionElements>
      <activiti:formProperty id="custComeFlag" name="是否上门" required="true" type="enum">
          <activiti:value id="true" name="上门"/>
          <activiti:value id="false" name="未上门"/>
        </activiti:formProperty>
        <activiti:formProperty id="custComeReason" name="处理意见" required="false" type="string"/>
      </extensionElements>
    </userTask>
    <exclusiveGateway gatewayDirection="Unspecified" id="custComeEg" name="是否上门"/>
    <endEvent id="endNotCome" name="未上门结束"/>
    <userTask activiti:assignee="${saleUserId}" activiti:exclusive="true" id="studentNeedClass" name="报班需求">
      <extensionElements>
        <activiti:formProperty id="saleSiteId" name="销售点" type="string"/>
      </extensionElements>
    </userTask>
    <userTask activiti:assignee="EduAdmin:saleSiteId" activiti:exclusive="true" id="studentNeedClassConfirm" name="审核需求">
      <documentation id="studentNeedClassConfirm_D_1"><![CDATA[rejectFlag]]></documentation>
    </userTask>
    <userTask activiti:assignee="${saleUserId}" activiti:exclusive="true" id="selectProduct" name="去费用管理下单"/>
    <userTask activiti:assignee="${saleUserId}" activiti:exclusive="true" id="signContract" name="签合同"/>
    <userTask activiti:assignee="${saleUserId}" activiti:exclusive="true" id="payment" name="学生付款"/>
    <userTask activiti:assignee="${saleUserId}" activiti:exclusive="true" id="submitOrder" name="提交订单">
      <documentation id="submitOrder_D_1"><![CDATA[rejectFlag]]></documentation>
      <extensionElements>
        <activiti:executionListener event="end" expression="${execution.setVariable('endType', 1)}"/>
      </extensionElements>
    </userTask>
    <endEvent id="endSalerKd" name="流程结束"/>
    <sequenceFlow id="_16" sourceRef="startSalerKd" targetRef="buildRecord"/>
    <sequenceFlow id="_17" sourceRef="buildRecord" targetRef="custComeEg"/>
    <sequenceFlow id="_18" name="已上门" sourceRef="custComeEg" targetRef="studentNeedClass">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${custComeFlag == 'true'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="_19" sourceRef="studentNeedClass" targetRef="studentNeedClassConfirm"/>
    <sequenceFlow id="_20" sourceRef="studentNeedClassConfirm" targetRef="selectProduct"/>
    <sequenceFlow id="_21" sourceRef="selectProduct" targetRef="signContract"/>
    <sequenceFlow id="_22" name="未上门" sourceRef="custComeEg" targetRef="endNotCome">
      <extensionElements>
        <activiti:executionListener event="take" expression="${execution.setVariable('endType', 2)}"/>
		<activiti:executionListener event="end" class="com.a121tongbu.bpm.executionListener.EndTypeExecutionListener"/>
      </extensionElements>
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${custComeFlag == 'false'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="_23" sourceRef="signContract" targetRef="payment"/>
    <sequenceFlow id="_24" sourceRef="payment" targetRef="submitOrder"/>
    <sequenceFlow id="_25" sourceRef="submitOrder" targetRef="endSalerKd">
<extensionElements>
<activiti:executionListener event="take" class="com.a121tongbu.bpm.executionListener.EndTypeExecutionListener"/>
</extensionElements>
</sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram documentation="background=#3C3F41;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0" id="Diagram-_1" name="New Diagram">
    <bpmndi:BPMNPlane bpmnElement="COLLABORATION_1">
      <bpmndi:BPMNShape bpmnElement="_2" id="Shape-_2" isExpanded="true" isHorizontal="true">
        <omgdc:Bounds height="350.0" width="1494.0" x="0.0" y="195.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="350.0" width="1494.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="_3" id="Shape-_3" isExpanded="true" isHorizontal="true">
        <omgdc:Bounds height="205.0" width="1469.0" x="26.0" y="195.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="205.0" width="1469.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="_4" id="Shape-_4" isExpanded="true" isHorizontal="true">
        <omgdc:Bounds height="145.0" width="1469.0" x="26.0" y="400.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="145.0" width="1469.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="startSalerKd" id="Shape-startSalerKd">
        <omgdc:Bounds height="32.0" width="32.0" x="70.0" y="236.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="buildRecord" id="Shape-buildRecord">
        <omgdc:Bounds height="55.0" width="85.0" x="160.0" y="225.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="custComeEg" id="Shape-custComeEg" isMarkerVisible="false">
        <omgdc:Bounds height="32.0" width="32.0" x="315.0" y="200.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endNotCome" id="Shape-endNotCome">
        <omgdc:Bounds height="32.0" width="32.0" x="485.0" y="235.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="studentNeedClass" id="Shape-studentNeedClass">
        <omgdc:Bounds height="55.0" width="85.0" x="290.0" y="325.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="selectProduct" id="Shape-selectProduct">
        <omgdc:Bounds height="55.0" width="85.0" x="535.0" y="330.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="signContract" id="Shape-signContract">
        <omgdc:Bounds height="55.0" width="85.0" x="690.0" y="330.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="payment" id="Shape-payment">
        <omgdc:Bounds height="55.0" width="85.0" x="855.0" y="330.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="submitOrder" id="Shape-submitOrder">
        <omgdc:Bounds height="55.0" width="85.0" x="1005.0" y="330.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endSalerKd" id="Shape-endSalerKd">
        <omgdc:Bounds height="32.0" width="32.0" x="1025.0" y="230.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="studentNeedClassConfirm" id="Shape-studentNeedClassConfirm">
        <omgdc:Bounds height="55.0" width="85.0" x="405.0" y="460.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="_17" id="BPMNEdge__17" sourceElement="buildRecord" targetElement="custComeEg">
        <omgdi:waypoint x="245.0" y="252.5"/>
        <omgdi:waypoint x="315.0" y="216.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_16" id="BPMNEdge__16" sourceElement="startSalerKd" targetElement="buildRecord">
        <omgdi:waypoint x="102.0" y="252.0"/>
        <omgdi:waypoint x="160.0" y="252.5"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_19" id="BPMNEdge__19" sourceElement="studentNeedClass" targetElement="studentNeedClassConfirm">
        <omgdi:waypoint x="375.0" y="352.5"/>
        <omgdi:waypoint x="405.0" y="487.5"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_18" id="BPMNEdge__18" sourceElement="custComeEg" targetElement="studentNeedClass">
        <omgdi:waypoint x="331.0" y="232.0"/>
        <omgdi:waypoint x="331.0" y="325.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_20" id="BPMNEdge__20" sourceElement="studentNeedClassConfirm" targetElement="selectProduct">
        <omgdi:waypoint x="490.0" y="487.5"/>
        <omgdi:waypoint x="535.0" y="357.5"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_22" id="BPMNEdge__22" sourceElement="custComeEg" targetElement="endNotCome">
        <omgdi:waypoint x="347.0" y="216.0"/>
        <omgdi:waypoint x="485.0" y="251.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_21" id="BPMNEdge__21" sourceElement="selectProduct" targetElement="signContract">
        <omgdi:waypoint x="620.0" y="357.5"/>
        <omgdi:waypoint x="690.0" y="357.5"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_24" id="BPMNEdge__24" sourceElement="payment" targetElement="submitOrder">
        <omgdi:waypoint x="940.0" y="357.5"/>
        <omgdi:waypoint x="1005.0" y="357.5"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_23" id="BPMNEdge__23" sourceElement="signContract" targetElement="payment">
        <omgdi:waypoint x="775.0" y="357.5"/>
        <omgdi:waypoint x="855.0" y="357.5"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_25" id="BPMNEdge__25" sourceElement="submitOrder" targetElement="endSalerKd">
        <omgdi:waypoint x="1041.0" y="330.0"/>
        <omgdi:waypoint x="1041.0" y="262.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
