<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_Preparation" targetNamespace="http://bpmn.io/schema/bpmn">
  <bpmn:collaboration id="Collaboration_Preparation">
    <bpmn:participant id="Participant_Platform" name="測試準備｜已確認分工與案例維護" processRef="Process_Preparation" />
  </bpmn:collaboration>
  <bpmn:process id="Process_Preparation" name="測試準備｜已確認分工與案例維護" isExecutable="false">
    <bpmn:laneSet id="LaneSet_Preparation">
      <bpmn:lane id="Lane_Developer" name="系統開發人員">
        <bpmn:flowNodeRef>Event_Start</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_Design</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_Data</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_Revise</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_Owner" name="平台維護者">
        <bpmn:flowNodeRef>Activity_Review</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_Ready</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_Available</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_Edit</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_Check</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Event_Pending</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_Plan</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_Trigger</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Event_End</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_MergeReview</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_Crystal" name="Crystal 管理平台">
        <bpmn:flowNodeRef>Activity_Save</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_Saved</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="Event_Start" name="案例或資料需調整">
      <bpmn:outgoing>Flow_StartToDesign</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:sequenceFlow id="Flow_StartToDesign" sourceRef="Event_Start" targetRef="Activity_Design" />
    <bpmn:userTask id="Activity_Design" name="準備步驟與預期結果">
      <bpmn:incoming>Flow_StartToDesign</bpmn:incoming>
      <bpmn:outgoing>Flow_DesignToData</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_DesignToData" sourceRef="Activity_Design" targetRef="Activity_Data" />
    <bpmn:userTask id="Activity_Data" name="備妥資料與準備說明">
      <bpmn:incoming>Flow_DesignToData</bpmn:incoming>
      <bpmn:outgoing>Flow_DataToMergeReview</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_DataToMergeReview" sourceRef="Activity_Data" targetRef="Gateway_MergeReview" />
    <bpmn:userTask id="Activity_Review" name="核對案例與資料一致">
      <bpmn:incoming>Flow_MergeReviewToReview</bpmn:incoming>
      <bpmn:outgoing>Flow_ReviewToReady</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_ReviewToReady" sourceRef="Activity_Review" targetRef="Gateway_Ready" />
    <bpmn:exclusiveGateway id="Gateway_Ready" name="內容是否一致?" default="Flow_ReadyToRevise">
      <bpmn:incoming>Flow_ReviewToReady</bpmn:incoming>
      <bpmn:outgoing>Flow_ReadyToAvailable</bpmn:outgoing>
      <bpmn:outgoing>Flow_ReadyToRevise</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:sequenceFlow id="Flow_ReadyToAvailable" name="一致" sourceRef="Gateway_Ready" targetRef="Activity_Available">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">reviewConfirmed</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="Flow_ReadyToRevise" name="不一致" sourceRef="Gateway_Ready" targetRef="Activity_Revise" />
    <bpmn:userTask id="Activity_Revise" name="修正案例或資料">
      <bpmn:incoming>Flow_ReadyToRevise</bpmn:incoming>
      <bpmn:outgoing>Flow_ReviseToMergeReview</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_ReviseToMergeReview" sourceRef="Activity_Revise" targetRef="Gateway_MergeReview" />
    <bpmn:userTask id="Activity_Available" name="確認共用資料未被使用">
      <bpmn:incoming>Flow_ReadyToAvailable</bpmn:incoming>
      <bpmn:outgoing>Flow_AvailableToEdit</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_AvailableToEdit" sourceRef="Activity_Available" targetRef="Activity_Edit" />
    <bpmn:userTask id="Activity_Edit" name="編輯案例與完整步驟">
      <bpmn:incoming>Flow_AvailableToEdit</bpmn:incoming>
      <bpmn:outgoing>Flow_EditToSave</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_EditToSave" sourceRef="Activity_Edit" targetRef="Activity_Save" />
    <bpmn:serviceTask id="Activity_Save" name="保存定義並回傳結果">
      <bpmn:incoming>Flow_EditToSave</bpmn:incoming>
      <bpmn:outgoing>Flow_SaveToSaved</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:sequenceFlow id="Flow_SaveToSaved" sourceRef="Activity_Save" targetRef="Gateway_Saved" />
    <bpmn:exclusiveGateway id="Gateway_Saved" name="案例儲存成功?" default="Flow_SavedToCheck">
      <bpmn:incoming>Flow_SaveToSaved</bpmn:incoming>
      <bpmn:outgoing>Flow_SavedToPlan</bpmn:outgoing>
      <bpmn:outgoing>Flow_SavedToCheck</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:sequenceFlow id="Flow_SavedToPlan" name="已成功" sourceRef="Gateway_Saved" targetRef="Activity_Plan">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">saveConfirmed</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="Flow_SavedToCheck" name="失敗或逾時" sourceRef="Gateway_Saved" targetRef="Activity_Check" />
    <bpmn:userTask id="Activity_Check" name="保留輸入並核對結果">
      <bpmn:incoming>Flow_SavedToCheck</bpmn:incoming>
      <bpmn:outgoing>Flow_CheckToPending</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_CheckToPending" sourceRef="Activity_Check" targetRef="Event_Pending" />
    <bpmn:endEvent id="Event_Pending" name="儲存結果待確認">
      <bpmn:incoming>Flow_CheckToPending</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:userTask id="Activity_Plan" name="更新計畫的完整選案">
      <bpmn:incoming>Flow_SavedToPlan</bpmn:incoming>
      <bpmn:outgoing>Flow_PlanToTrigger</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_PlanToTrigger" sourceRef="Activity_Plan" targetRef="Activity_Trigger" />
    <bpmn:userTask id="Activity_Trigger" name="設定環境與觸發器">
      <bpmn:incoming>Flow_PlanToTrigger</bpmn:incoming>
      <bpmn:outgoing>Flow_TriggerToEnd</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_TriggerToEnd" sourceRef="Activity_Trigger" targetRef="Event_End" />
    <bpmn:endEvent id="Event_End" name="定義已備妥待執行">
      <bpmn:incoming>Flow_TriggerToEnd</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:exclusiveGateway id="Gateway_MergeReview">
      <bpmn:incoming>Flow_DataToMergeReview</bpmn:incoming>
      <bpmn:incoming>Flow_ReviseToMergeReview</bpmn:incoming>
      <bpmn:outgoing>Flow_MergeReviewToReview</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:sequenceFlow id="Flow_MergeReviewToReview" sourceRef="Gateway_MergeReview" targetRef="Activity_Review" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_Collaboration_Preparation">
    <bpmndi:BPMNPlane id="BPMNPlane_Collaboration_Preparation" bpmnElement="Collaboration_Preparation">
      <bpmndi:BPMNShape id="BPMNShape_Participant_Platform" bpmnElement="Participant_Platform" isHorizontal="true">
        <dc:Bounds x="80" y="80" width="2137" height="700" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Lane_Developer" bpmnElement="Lane_Developer" isHorizontal="true">
        <dc:Bounds x="110" y="80" width="2107" height="280" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Lane_Owner" bpmnElement="Lane_Owner" isHorizontal="true">
        <dc:Bounds x="110" y="360" width="2107" height="280" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Lane_Crystal" bpmnElement="Lane_Crystal" isHorizontal="true">
        <dc:Bounds x="110" y="640" width="2107" height="140" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Event_Start" bpmnElement="Event_Start">
        <dc:Bounds x="170" y="132" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="154" y="174" width="68" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Activity_Design" bpmnElement="Activity_Design">
        <dc:Bounds x="266" y="110" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Activity_Data" bpmnElement="Activity_Data">
        <dc:Bounds x="426" y="110" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Activity_Review" bpmnElement="Activity_Review">
        <dc:Bounds x="696" y="390" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Gateway_Ready" bpmnElement="Gateway_Ready" isMarkerVisible="true">
        <dc:Bounds x="856" y="405" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="812" y="389" width="61" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Activity_Revise" bpmnElement="Activity_Revise">
        <dc:Bounds x="966" y="250" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Activity_Available" bpmnElement="Activity_Available">
        <dc:Bounds x="966" y="390" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Activity_Edit" bpmnElement="Activity_Edit">
        <dc:Bounds x="1126" y="390" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Activity_Save" bpmnElement="Activity_Save">
        <dc:Bounds x="1286" y="670" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Gateway_Saved" bpmnElement="Gateway_Saved" isMarkerVisible="true">
        <dc:Bounds x="1446" y="685" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1441" y="665" width="61" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Activity_Check" bpmnElement="Activity_Check">
        <dc:Bounds x="1559" y="530" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Event_Pending" bpmnElement="Event_Pending">
        <dc:Bounds x="1719" y="552" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1707" y="594" width="61" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Activity_Plan" bpmnElement="Activity_Plan">
        <dc:Bounds x="1815" y="390" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Activity_Trigger" bpmnElement="Activity_Trigger">
        <dc:Bounds x="1975" y="390" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Event_End" bpmnElement="Event_End">
        <dc:Bounds x="2135" y="412" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="2119" y="454" width="68" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_Gateway_MergeReview" bpmnElement="Gateway_MergeReview" isMarkerVisible="true">
        <dc:Bounds x="586" y="405" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_StartToDesign" bpmnElement="Flow_StartToDesign">
        <di:waypoint x="206" y="150" />
        <di:waypoint x="266" y="150" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_DesignToData" bpmnElement="Flow_DesignToData">
        <di:waypoint x="366" y="150" />
        <di:waypoint x="426" y="150" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_DataToMergeReview" bpmnElement="Flow_DataToMergeReview">
        <di:waypoint x="476" y="190" />
        <di:waypoint x="476" y="430" />
        <di:waypoint x="586" y="430" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_ReviewToReady" bpmnElement="Flow_ReviewToReady">
        <di:waypoint x="796" y="430" />
        <di:waypoint x="856" y="430" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_ReadyToAvailable" bpmnElement="Flow_ReadyToAvailable">
        <di:waypoint x="906" y="430" />
        <di:waypoint x="966" y="430" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="914" y="412" width="26" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_ReadyToRevise" bpmnElement="Flow_ReadyToRevise">
        <di:waypoint x="881" y="405" />
        <di:waypoint x="881" y="290" />
        <di:waypoint x="966" y="290" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="889" y="272" width="33" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_ReviseToMergeReview" bpmnElement="Flow_ReviseToMergeReview">
        <di:waypoint x="966" y="290" />
        <di:waypoint x="611" y="290" />
        <di:waypoint x="611" y="405" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_AvailableToEdit" bpmnElement="Flow_AvailableToEdit">
        <di:waypoint x="1066" y="430" />
        <di:waypoint x="1126" y="430" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_EditToSave" bpmnElement="Flow_EditToSave">
        <di:waypoint x="1176" y="470" />
        <di:waypoint x="1176" y="710" />
        <di:waypoint x="1286" y="710" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_SaveToSaved" bpmnElement="Flow_SaveToSaved">
        <di:waypoint x="1386" y="710" />
        <di:waypoint x="1446" y="710" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_SavedToPlan" bpmnElement="Flow_SavedToPlan">
        <di:waypoint x="1496" y="710" />
        <di:waypoint x="1865" y="710" />
        <di:waypoint x="1865" y="470" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1504" y="692" width="33" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_SavedToCheck" bpmnElement="Flow_SavedToCheck">
        <di:waypoint x="1496" y="710" />
        <di:waypoint x="1609" y="710" />
        <di:waypoint x="1609" y="610" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1529" y="714" width="47" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_CheckToPending" bpmnElement="Flow_CheckToPending">
        <di:waypoint x="1659" y="570" />
        <di:waypoint x="1719" y="570" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_PlanToTrigger" bpmnElement="Flow_PlanToTrigger">
        <di:waypoint x="1915" y="430" />
        <di:waypoint x="1975" y="430" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_TriggerToEnd" bpmnElement="Flow_TriggerToEnd">
        <di:waypoint x="2075" y="430" />
        <di:waypoint x="2135" y="430" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_Flow_MergeReviewToReview" bpmnElement="Flow_MergeReviewToReview">
        <di:waypoint x="636" y="430" />
        <di:waypoint x="696" y="430" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
