<?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="m1562653407309" 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="paike">
      <participantMultiplicity maximum="1" minimum="0"/>
    </participant>
  </collaboration>
  <process id="paike" isClosed="false" isExecutable="true" name="排课流程" processType="None">
    <laneSet>
      <lane id="_3" name="学科主任">
        <flowNodeRef>startPaike</flowNodeRef>
        <flowNodeRef>subjectDirector</flowNodeRef>
        <flowNodeRef>subjectDirectorSelTeacherEg</flowNodeRef>
      </lane>
      <lane id="_4" name="导师">
        <flowNodeRef>mentorSelTeacher</flowNodeRef>
        <flowNodeRef>mentorSelTeacherEg</flowNodeRef>
      </lane>
      <lane id="_5" name="顾问">
        <flowNodeRef>courseSchedule</flowNodeRef>
        <flowNodeRef>courseScheduleEg</flowNodeRef>
        <flowNodeRef>endPaike</flowNodeRef>
      </lane>
    </laneSet>
    <startEvent activiti:initiator="applyUserId" id="startPaike" name="开始排课">
      <extensionElements>
        <activiti:formProperty id="saleUserId" name="顾问" required="true" type="string"/>
        <activiti:formProperty id="studentId" name="学生" required="true" type="string"/>
        <activiti:formProperty id="phone" name="学生账号" required="true" type="string"/>
        <activiti:formProperty id="studentName" name="学生姓名" required="true" type="string"/>
        <activiti:formProperty id="grade" name="学生年级" required="true" type="long"/>
        <activiti:formProperty id="stage" name="学生年段" required="true" type="string"/>
        <activiti:formProperty id="classInstId" name="学生班级" required="true" type="long"/>
        <activiti:formProperty id="subject" name="学科" required="true" type="string"/>
      </extensionElements>
    </startEvent>
    <userTask activiti:assignee="SubjectDirector:subject:stage" activiti:exclusive="true" id="subjectDirector" name="学科主任处理">
      <extensionElements>
        <activiti:formProperty id="selTeacher" name="是否直接选老师" required="true" type="enum">
          <activiti:value id="true" name="是"/>
          <activiti:value id="false" name="否"/>
        </activiti:formProperty>
        <activiti:formProperty id="teacherId" name="老师" type="string"/>
        <activiti:formProperty id="mentorStaffId" name="导师" type="string"/>
      </extensionElements>
    </userTask>
    <exclusiveGateway gatewayDirection="Unspecified" id="subjectDirectorSelTeacherEg" name="是否指定老师"/>
    <userTask activiti:assignee="${mentorStaffId}" activiti:exclusive="true" id="mentorSelTeacher" name="选老师">
      <extensionElements>
        <activiti:formProperty id="mentorSelTeacher" name="是否可排" required="true" type="enum">
          <activiti:value id="true" name="是"/>
          <activiti:value id="false" name="否"/>
        </activiti:formProperty>
        <activiti:formProperty id="teacherId" name="老师" type="string"/>
      </extensionElements>
    </userTask>
    <userTask activiti:assignee="${saleUserId}" activiti:exclusive="true" id="courseSchedule" name="顾问排课">
      <extensionElements>
        <activiti:formProperty id="allNormal" name="是否正常" required="true" type="enum">
          <activiti:value id="true" name="是"/>
          <activiti:value id="false" name="否"/>
        </activiti:formProperty>
      </extensionElements>
    </userTask>
    <exclusiveGateway gatewayDirection="Unspecified" id="courseScheduleEg" name="学生时间段满足"/>
    <endEvent id="endPaike" name="结束排课"/>
    <sequenceFlow id="_16" sourceRef="subjectDirector" targetRef="subjectDirectorSelTeacherEg"/>
    <sequenceFlow id="_17" sourceRef="subjectDirectorSelTeacherEg" targetRef="mentorSelTeacher">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${selTeacher == 'false'}]]></conditionExpression>
    </sequenceFlow>
    <exclusiveGateway gatewayDirection="Unspecified" id="mentorSelTeacherEg" name="是否有可排老师"/>
    <sequenceFlow id="_20" sourceRef="mentorSelTeacher" targetRef="mentorSelTeacherEg"/>
    <sequenceFlow id="_21" sourceRef="mentorSelTeacherEg" targetRef="subjectDirector">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${mentorSelTeacher == 'false'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="_24" sourceRef="courseSchedule" targetRef="courseScheduleEg"/>
    <sequenceFlow id="_26" sourceRef="courseScheduleEg" targetRef="endPaike">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${allNormal == 'true'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="_6" sourceRef="courseScheduleEg" targetRef="subjectDirector">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${allNormal == 'false'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="_9" sourceRef="startPaike" targetRef="subjectDirector"/>
    <sequenceFlow id="_10" sourceRef="subjectDirectorSelTeacherEg" targetRef="courseSchedule">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${selTeacher == 'true'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="_11" sourceRef="mentorSelTeacherEg" targetRef="courseSchedule">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${mentorSelTeacher == 'true'}]]></conditionExpression>
    </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="600.0" width="1494.0" x="0.0" y="315.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="600.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="200.0" width="1469.0" x="26.0" y="315.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="200.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="200.0" width="1469.0" x="26.0" y="515.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="200.0" width="1469.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="_5" id="Shape-_5" isExpanded="true" isHorizontal="true">
        <omgdc:Bounds height="200.0" width="1469.0" x="26.0" y="715.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="200.0" width="1469.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="startPaike" id="Shape-startPaike">
        <omgdc:Bounds height="32.0" width="32.0" x="100.0" y="361.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="subjectDirector" id="Shape-subjectDirector">
        <omgdc:Bounds height="55.0" width="85.0" x="265.0" y="350.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="subjectDirectorSelTeacherEg" id="Shape-subjectDirectorSelTeacherEg" isMarkerVisible="false">
        <omgdc:Bounds height="32.0" width="32.0" x="440.0" y="455.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="mentorSelTeacher" id="Shape-mentorSelTeacher">
        <omgdc:Bounds height="55.0" width="85.0" x="515.0" y="565.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="mentorSelTeacherEg" id="Shape-mentorSelTeacherEg" isMarkerVisible="false">
        <omgdc:Bounds height="32.0" width="32.0" x="760.0" y="576.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="courseSchedule" id="Shape-courseSchedule">
        <omgdc:Bounds height="55.0" width="85.0" x="425.0" y="830.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="courseScheduleEg" id="Shape-courseScheduleEg" isMarkerVisible="false">
        <omgdc:Bounds height="32.0" width="32.0" x="270.0" y="745.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endPaike" id="Shape-endPaike">
        <omgdc:Bounds height="32.0" width="32.0" x="100.0" y="830.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="_24" id="BPMNEdge__24" sourceElement="courseSchedule" targetElement="courseScheduleEg">
        <omgdi:waypoint x="425.0" y="857.5"/>
        <omgdi:waypoint x="302.0" y="761.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_26" id="BPMNEdge__26" sourceElement="courseScheduleEg" targetElement="endPaike">
        <omgdi:waypoint x="270.0" y="761.0"/>
        <omgdi:waypoint x="132.0" y="846.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_17" id="BPMNEdge__17" sourceElement="subjectDirectorSelTeacherEg" targetElement="mentorSelTeacher">
        <omgdi:waypoint x="472.0" y="471.0"/>
        <omgdi:waypoint x="515.0" y="592.5"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="-2.0" width="0.0" x="0.0" y="37.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_16" id="BPMNEdge__16" sourceElement="subjectDirector" targetElement="subjectDirectorSelTeacherEg">
        <omgdi:waypoint x="345.0" y="405.0"/>
        <omgdi:waypoint x="345.0" y="435.0"/>
        <omgdi:waypoint x="440.0" y="471.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_6" id="BPMNEdge__6" sourceElement="courseScheduleEg" targetElement="subjectDirector">
        <omgdi:waypoint x="286.0" y="745.0"/>
        <omgdi:waypoint x="286.0" y="405.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_9" id="BPMNEdge__9" sourceElement="startPaike" targetElement="subjectDirector">
        <omgdi:waypoint x="132.0" y="377.0"/>
        <omgdi:waypoint x="265.0" y="377.5"/>
        <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="mentorSelTeacher" targetElement="mentorSelTeacherEg">
        <omgdi:waypoint x="600.0" y="592.5"/>
        <omgdi:waypoint x="760.0" y="592.0"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_11" id="BPMNEdge__11" sourceElement="mentorSelTeacherEg" targetElement="courseSchedule">
        <omgdi:waypoint x="775.0" y="607.0"/>
        <omgdi:waypoint x="775.0" y="735.0"/>
        <omgdi:waypoint x="510.0" y="857.5"/>
        <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="mentorSelTeacherEg" targetElement="subjectDirector">
        <omgdi:waypoint x="775.0" y="577.0"/>
        <omgdi:waypoint x="775.0" y="415.0"/>
        <omgdi:waypoint x="350.0" y="377.5"/>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_10" id="BPMNEdge__10" sourceElement="subjectDirectorSelTeacherEg" targetElement="courseSchedule">
        <omgdi:waypoint x="456.0" y="487.0"/>
        <omgdi:waypoint x="456.0" y="830.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>
