<?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:flowable="http://flowable.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.flowable.org/processdef">
  <process id="Manage_Work_Order_Complete" name="Manage_Work_Order_Complete" isExecutable="true">
    <startEvent id="startEvent1" flowable:formFieldValidation="true"></startEvent>
    <serviceTask id="sid-CF61AD8B-9E11-4F1B-B40F-DC90E53168A7" name="Manage work order service" flowable:class="com.mobinets.nep.client.workflow.soap.SoapDelegate">
      <extensionElements>
        <flowable:field name="service">
          <flowable:string><![CDATA[ManageWorkOrderService]]></flowable:string>
        </flowable:field>
        <flowable:field name="operation">
          <flowable:string><![CDATA[ManageWorkOrder]]></flowable:string>
        </flowable:field>
        <flowable:field name="requestHeader.functionId">
          <flowable:string><![CDATA[13004158]]></flowable:string>
        </flowable:field>
        <flowable:field name="requestHeader.transactionId">
          <flowable:string><![CDATA[0]]></flowable:string>
        </flowable:field>
        <flowable:field name="requestHeader.requestId">
          <flowable:expression><![CDATA[${requestId}]]></flowable:expression>
        </flowable:field>
        <flowable:field name="requestHeader.requestorId">
          <flowable:string><![CDATA[BSD]]></flowable:string>
        </flowable:field>
        <flowable:field name="requestHeader.requestorChannelId">
          <flowable:string><![CDATA[BSDREST]]></flowable:string>
        </flowable:field>
        <flowable:field name="requestHeader.requestorUserId">
          <flowable:string><![CDATA[BSD]]></flowable:string>
        </flowable:field>
        <flowable:field name="requestBody.workOrder[0].task[0].taskId">
          <flowable:expression><![CDATA[${fWOID}]]></flowable:expression>
        </flowable:field>
        <flowable:field name="requestBody.workOrder[0].task[0].taskType">
          <flowable:string><![CDATA[Success]]></flowable:string>
        </flowable:field>
        <flowable:field name="requestBody.workOrder[0].task[0].taskAction">
          <flowable:string><![CDATA[Completed]]></flowable:string>
        </flowable:field>
        <flowable:field name="requestBody.workOrder[0].user.userId">
          <flowable:string><![CDATA[NEP]]></flowable:string>
        </flowable:field>
      </extensionElements>
    </serviceTask>
    <sequenceFlow id="sid-A0C581DB-361F-4CB3-83CC-DDCE1F584F53" sourceRef="startEvent1" targetRef="sid-B1D59B2A-532A-4965-9C47-E79813C0FCB5"></sequenceFlow>
    <boundaryEvent id="sid-A2010821-15F0-4242-806C-A5FBF808899F" attachedToRef="sid-CF61AD8B-9E11-4F1B-B40F-DC90E53168A7">
      <errorEventDefinition></errorEventDefinition>
    </boundaryEvent>
    <sequenceFlow id="sid-84757068-2B9A-48C4-86E5-33CEC88747B5" sourceRef="sid-A2010821-15F0-4242-806C-A5FBF808899F" targetRef="sid-C5DF5A40-A9F4-45EF-B0A8-6676D46B4854"></sequenceFlow>
    <endEvent id="sid-0CFE83CB-91DA-4F63-AA22-E73FEA100A0A"></endEvent>
    <callActivity id="sid-C5DF5A40-A9F4-45EF-B0A8-6676D46B4854" name="Interrupt WO" calledElement="Interrupt_WO" flowable:calledElementType="key" flowable:processInstanceName="InterruptWO" flowable:businessKey="InterruptWO" flowable:fallbackToDefaultTenant="false">
      <extensionElements>
        <flowable:in sourceExpression="${fWOID}" target="fWOID"></flowable:in>
        <flowable:in sourceExpression="Connection with Manage Work Order Failed" target="errorRemarks"></flowable:in>
        <flowable:in sourceExpression="In Progress" target="status"></flowable:in>
      </extensionElements>
    </callActivity>
    <exclusiveGateway id="sid-D5CAF237-67D8-4B26-B693-AB985C5EC860"></exclusiveGateway>
    <sequenceFlow id="sid-31FC4580-7350-471B-8ADB-E062D772FB5A" sourceRef="sid-C5DF5A40-A9F4-45EF-B0A8-6676D46B4854" targetRef="sid-D5CAF237-67D8-4B26-B693-AB985C5EC860"></sequenceFlow>
    <sequenceFlow id="sid-5A5F1D38-6BF2-464F-A465-F4D6F8B30FBF" sourceRef="sid-CF61AD8B-9E11-4F1B-B40F-DC90E53168A7" targetRef="sid-E23DDD76-81F7-4D68-928C-111E35A3B125"></sequenceFlow>
    <exclusiveGateway id="sid-E23DDD76-81F7-4D68-928C-111E35A3B125" default="sid-99C492B9-8FDE-47C4-B363-0AC1AC11E58F"></exclusiveGateway>
    <callActivity id="sid-48E4ACC3-C51B-4C6E-9912-C9AB6B818CE3" name="Interrupt WO" calledElement="Interrupt_WO" flowable:calledElementType="key" flowable:processInstanceName="InterruptWO" flowable:businessKey="InterruptWO" flowable:fallbackToDefaultTenant="false">
      <extensionElements>
        <flowable:in sourceExpression="${fWOID}" target="fWOID"></flowable:in>
        <flowable:in sourceExpression="Connection with iLink Failed" target="errorRemarks"></flowable:in>
        <flowable:in sourceExpression="In Progress" target="status"></flowable:in>
      </extensionElements>
    </callActivity>
    <scriptTask id="sid-B1D59B2A-532A-4965-9C47-E79813C0FCB5" name="set variable" scriptFormat="groovy" flowable:autoStoreVariables="false">
      <script><![CDATA[def requestId= ArboRefNo;


execution.setVariable("requestId",requestId);]]></script>
    </scriptTask>
    <sequenceFlow id="sid-01EBA5A3-CB91-4944-AA13-18E491BA970E" sourceRef="sid-B1D59B2A-532A-4965-9C47-E79813C0FCB5" targetRef="sid-CF61AD8B-9E11-4F1B-B40F-DC90E53168A7"></sequenceFlow>
    <sequenceFlow id="sid-820547A2-8CFE-40C2-A856-82EAD9CB32B2" sourceRef="sid-48E4ACC3-C51B-4C6E-9912-C9AB6B818CE3" targetRef="sid-D5CAF237-67D8-4B26-B693-AB985C5EC860"></sequenceFlow>
    <sequenceFlow id="sid-99C492B9-8FDE-47C4-B363-0AC1AC11E58F" sourceRef="sid-E23DDD76-81F7-4D68-928C-111E35A3B125" targetRef="sid-0CFE83CB-91DA-4F63-AA22-E73FEA100A0A"></sequenceFlow>
    <sequenceFlow id="sid-DF317245-D27D-455B-8898-9E520B317F16" sourceRef="sid-E23DDD76-81F7-4D68-928C-111E35A3B125" targetRef="sid-48E4ACC3-C51B-4C6E-9912-C9AB6B818CE3">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${!execution.getVariable("ManageWorkOrderRs").getResponseHeader().getReturnCode().equals("0")}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-E9863B88-EDCF-4C35-8505-18ACA9C83320" name="continue" sourceRef="sid-D5CAF237-67D8-4B26-B693-AB985C5EC860" targetRef="sid-0CFE83CB-91DA-4F63-AA22-E73FEA100A0A">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${actionToDo=='continue'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-3473DFC9-9512-4B1E-90F2-B2B971B1AAAF" name="Retry" sourceRef="sid-D5CAF237-67D8-4B26-B693-AB985C5EC860" targetRef="sid-CF61AD8B-9E11-4F1B-B40F-DC90E53168A7">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${actionToDo=='retry'}]]></conditionExpression>
    </sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_Manage_Work_Order_Complete">
    <bpmndi:BPMNPlane bpmnElement="Manage_Work_Order_Complete" id="BPMNPlane_Manage_Work_Order_Complete">
      <bpmndi:BPMNShape bpmnElement="startEvent1" id="BPMNShape_startEvent1">
        <omgdc:Bounds height="30.0" width="30.0" x="164.99999508261695" y="162.9999951422216"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-CF61AD8B-9E11-4F1B-B40F-DC90E53168A7" id="BPMNShape_sid-CF61AD8B-9E11-4F1B-B40F-DC90E53168A7">
        <omgdc:Bounds height="80.0" width="100.0" x="434.999992400408" y="137.99999102950136"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-A2010821-15F0-4242-806C-A5FBF808899F" id="BPMNShape_sid-A2010821-15F0-4242-806C-A5FBF808899F">
        <omgdc:Bounds height="30.0" width="30.000000000000057" x="508.46285981622685" y="203.633048915438"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-0CFE83CB-91DA-4F63-AA22-E73FEA100A0A" id="BPMNShape_sid-0CFE83CB-91DA-4F63-AA22-E73FEA100A0A">
        <omgdc:Bounds height="28.0" width="28.0" x="914.9999780952937" y="163.999990254641"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-C5DF5A40-A9F4-45EF-B0A8-6676D46B4854" id="BPMNShape_sid-C5DF5A40-A9F4-45EF-B0A8-6676D46B4854">
        <omgdc:Bounds height="80.0" width="100.0" x="554.9999767541896" y="299.9999642372158"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-D5CAF237-67D8-4B26-B693-AB985C5EC860" id="BPMNShape_sid-D5CAF237-67D8-4B26-B693-AB985C5EC860">
        <omgdc:Bounds height="40.0" width="40.0" x="584.9999879300598" y="430.015585957563"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-E23DDD76-81F7-4D68-928C-111E35A3B125" id="BPMNShape_sid-E23DDD76-81F7-4D68-928C-111E35A3B125">
        <omgdc:Bounds height="40.0" width="40.0" x="734.9999834597115" y="157.99997672438826"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-48E4ACC3-C51B-4C6E-9912-C9AB6B818CE3" id="BPMNShape_sid-48E4ACC3-C51B-4C6E-9912-C9AB6B818CE3">
        <omgdc:Bounds height="80.0" width="100.0" x="704.9999678134932" y="299.9999552965204"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-B1D59B2A-532A-4965-9C47-E79813C0FCB5" id="BPMNShape_sid-B1D59B2A-532A-4965-9C47-E79813C0FCB5">
        <omgdc:Bounds height="80.0" width="100.0" x="268.2499825209387" y="137.99999102950136"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sid-3473DFC9-9512-4B1E-90F2-B2B971B1AAAF" id="BPMNEdge_sid-3473DFC9-9512-4B1E-90F2-B2B971B1AAAF">
        <omgdi:waypoint x="585.4999879300598" y="450.515585957563"></omgdi:waypoint>
        <omgdi:waypoint x="484.999992400408" y="450.515585957563"></omgdi:waypoint>
        <omgdi:waypoint x="484.999992400408" y="217.94999102950138"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-A0C581DB-361F-4CB3-83CC-DDCE1F584F53" id="BPMNEdge_sid-A0C581DB-361F-4CB3-83CC-DDCE1F584F53">
        <omgdi:waypoint x="194.949994126623" y="177.99999469599513"></omgdi:waypoint>
        <omgdi:waypoint x="268.2499820848939" y="177.9999925154355"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-820547A2-8CFE-40C2-A856-82EAD9CB32B2" id="BPMNEdge_sid-820547A2-8CFE-40C2-A856-82EAD9CB32B2">
        <omgdi:waypoint x="704.9999678134932" y="376.6351652198119"></omgdi:waypoint>
        <omgdi:waypoint x="616.508910768993" y="441.553353214639"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-99C492B9-8FDE-47C4-B363-0AC1AC11E58F" id="BPMNEdge_sid-99C492B9-8FDE-47C4-B363-0AC1AC11E58F">
        <omgdi:waypoint x="774.4992454077058" y="178.445064918164"></omgdi:waypoint>
        <omgdi:waypoint x="915.0000330570958" y="178.04019084010883"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-31FC4580-7350-471B-8ADB-E062D772FB5A" id="BPMNEdge_sid-31FC4580-7350-471B-8ADB-E062D772FB5A">
        <omgdi:waypoint x="604.9999808124861" y="379.9499642372158"></omgdi:waypoint>
        <omgdi:waypoint x="604.9999858983721" y="430.015585957563"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-5A5F1D38-6BF2-464F-A465-F4D6F8B30FBF" id="BPMNEdge_sid-5A5F1D38-6BF2-464F-A465-F4D6F8B30FBF">
        <omgdi:waypoint x="534.9499924003999" y="178.09231741133152"></omgdi:waypoint>
        <omgdi:waypoint x="735.4629474830483" y="178.46294074772507"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-DF317245-D27D-455B-8898-9E520B317F16" id="BPMNEdge_sid-DF317245-D27D-455B-8898-9E520B317F16">
        <omgdi:waypoint x="755.4409753884953" y="197.50291153791"></omgdi:waypoint>
        <omgdi:waypoint x="755.1236559108108" y="299.9999552965204"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-84757068-2B9A-48C4-86E5-33CEC88747B5" id="BPMNEdge_sid-84757068-2B9A-48C4-86E5-33CEC88747B5">
        <omgdi:waypoint x="531.8007318502921" y="231.0430832921248"></omgdi:waypoint>
        <omgdi:waypoint x="578.1270462782736" y="299.9999642372158"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-E9863B88-EDCF-4C35-8505-18ACA9C83320" id="BPMNEdge_sid-E9863B88-EDCF-4C35-8505-18ACA9C83320">
        <omgdi:waypoint x="624.4470599323153" y="450.515585957563"></omgdi:waypoint>
        <omgdi:waypoint x="928.9999780952937" y="450.515585957563"></omgdi:waypoint>
        <omgdi:waypoint x="928.9999780952937" y="191.9499112690853"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-01EBA5A3-CB91-4944-AA13-18E491BA970E" id="BPMNEdge_sid-01EBA5A3-CB91-4944-AA13-18E491BA970E">
        <omgdi:waypoint x="368.19998252092864" y="177.99999102950136"></omgdi:waypoint>
        <omgdi:waypoint x="434.99999240034856" y="177.99999102950136"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>