<mxfile host="Electron" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/26.0.15 Chrome/132.0.6834.196 Electron/34.2.0 Safari/537.36" version="26.0.15" pages="5">
  <diagram id="tab1-spot" name="1. Spot Order + Payment + Assign">
    <mxGraphModel dx="823" dy="568" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1850" pageHeight="960" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="p1_lDriver" value="Driver (Mobile)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="40" y="40" width="140" height="880" as="geometry" />
        </mxCell>
        <mxCell id="p1_lPic" value="PIC / WarehousePIC (web-field)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="270" y="40" width="140" height="880" as="geometry" />
        </mxCell>
        <mxCell id="p1_lShipper" value="Shipper" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#ffe6cc;strokeColor=#d79b00;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="500" y="40" width="140" height="880" as="geometry" />
        </mxCell>
        <mxCell id="p1_lAtm" value="Transporter / Admin (ATM)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#ffe6cc;strokeColor=#d79b00;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="730" y="40" width="150" height="880" as="geometry" />
        </mxCell>
        <mxCell id="p1_lBe" value="Karlo Backend (System)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#f8cecc;strokeColor=#b85450;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="960" y="40" width="150" height="880" as="geometry" />
        </mxCell>
        <mxCell id="p1_lWa" value="WA Gateway" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#e1d5e7;strokeColor=#9673a6;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="1190" y="40" width="140" height="880" as="geometry" />
        </mxCell>
        <mxCell id="p1_lXendit" value="Xendit (Payment)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#e1d5e7;strokeColor=#9673a6;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="1410" y="40" width="140" height="880" as="geometry" />
        </mxCell>
        <mxCell id="p1_lCron" value="Cron / Scheduler" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#fff2cc;strokeColor=#d6b656;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="1630" y="40" width="140" height="880" as="geometry" />
        </mxCell>
        <mxCell id="p1_band" value="TAB 1 — SPOT ORDER (ex-OTO): create =&gt; negosiasi =&gt; deal/confirm =&gt; bayar =&gt; assign driver" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;align=left;spacingLeft=10;fontStyle=1;fontSize=12;opacity=80;" parent="1" vertex="1">
          <mxGeometry x="40" y="92" width="1730" height="24" as="geometry" />
        </mxCell>
        <mxCell id="p1_note" value="Loop negosiasi 2 arah — maks 3 ronde/sisi (MAX_NEGO_ROUND=3).&#xa;Order.statusCode TETAP otoNegotiation selama nego; kode&#xa;otoShipperUpdate/otoTransporterUpdate/dll hanya ke metadata&#xa;Notification. Order pindah status hanya di saveSpotOrder /&#xa;submitNegotiation / confirmOrder." style="shape=note;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;align=left;" parent="1" vertex="1">
          <mxGeometry x="1560" y="250" width="280" height="120" as="geometry" />
        </mxCell>
        <mxCell id="p1_1" value="POST /spot-order  {tujuan, tipe truk}  [SHIPPER]&#xa;=&gt; draft / otoCreated  (find-or-create warehouse/PIC/itemType)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="570" y="132" as="sourcePoint" />
            <mxPoint x="1035" y="132" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_2" value="POST /spot-order/:id/negotiate  (pilih &lt;=3 transporter)  [SHIPPER]&#xa;=&gt; otoNegotiation  (createNegotiations: 1 NegotiationOto/transporter)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="570" y="166" as="sourcePoint" />
            <mxPoint x="1035" y="166" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_3" value="notif spotNegotiation ke tiap transporter" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="200" as="sourcePoint" />
            <mxPoint x="805" y="200" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_4" value="[opsional] PUT /spot-order/negotiation/:id/seen  [ATM]" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;fontColor=#666666;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="805" y="234" as="sourcePoint" />
            <mxPoint x="1035" y="234" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_5" value="PUT /negotiation/:id/transporter-offer  [ATM]  (Order tetap otoNegotiation)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="805" y="268" as="sourcePoint" />
            <mxPoint x="1035" y="268" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_6" value="notif ke shipper (meta: otoTransporterUpdate)" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="302" as="sourcePoint" />
            <mxPoint x="570" y="302" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_7" value="PUT /negotiation/:id/counter  [SHIPPER]" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="570" y="336" as="sourcePoint" />
            <mxPoint x="1035" y="336" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_8" value="notif ke transporter (meta: otoShipperUpdate)" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="370" as="sourcePoint" />
            <mxPoint x="805" y="370" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_9" value="[opsional] PUT /negotiation/:id/accept  [SHIPPER]  (soft-accept, tak lock)" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;fontColor=#666666;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="570" y="404" as="sourcePoint" />
            <mxPoint x="1035" y="404" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_10" value="[opsional] PUT /negotiation/:id/transporter-accept  [ATM]  =&gt; entry.status deal" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;fontColor=#666666;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="805" y="438" as="sourcePoint" />
            <mxPoint x="1035" y="438" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_11" value="[opsional] transporter-reject [ATM] / reject [SHIPPER]  =&gt; entry.status reject" style="html=1;verticalAlign=bottom;endArrow=open;dashed=1;fontSize=11;strokeColor=#b85450;fontColor=#b85450;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="805" y="472" as="sourcePoint" />
            <mxPoint x="1035" y="472" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_12" value="PUT /spot-order/:id/confirm  {negotiationId, truckType}  [SHIPPER]" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;strokeColor=#d79b00;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="570" y="506" as="sourcePoint" />
            <mxPoint x="1035" y="506" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_13" value="entry=&gt;deal, Order.transporter di-set, buat Agreement, sibling nego=&gt;cancel, calculateFees, buat Invoice =&gt; otoWaitingPayment" style="html=1;verticalAlign=bottom;endArrow=block;rounded=0;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="540" as="sourcePoint" />
            <mxPoint x="1035" y="566" as="targetPoint" />
            <Array as="points">
              <mxPoint x="1140" y="540" />
              <mxPoint x="1140" y="566" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_14" value="notif menang &#39;Penawaran Dipilih&#39; + notif sibling &#39;Negosiasi Ditutup&#39;" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="600" as="sourcePoint" />
            <mxPoint x="805" y="600" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_15" value="POST /spot-order/:id/payment  [SHIPPER]&#xa;prepareSpotOrderPayment =&gt; PaymentController.createVirtualAccount" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="570" y="634" as="sourcePoint" />
            <mxPoint x="1035" y="634" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_16" value="POST callback_virtual_accounts (buat VA)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="668" as="sourcePoint" />
            <mxPoint x="1480" y="668" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_17" value="webhook POST /callback/update  (callBackUpdateVa)  =&gt; otoPaymentInProgress" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1480" y="702" as="sourcePoint" />
            <mxPoint x="1035" y="702" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_18" value="Shipper bayar VA" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="570" y="736" as="sourcePoint" />
            <mxPoint x="1480" y="736" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_19" value="webhook POST /callback/paid  (callBackVa)  =&amp;gt; history otoPaymentSuccess,&lt;br&gt;live status requestAssignmentDriver, Agreement aktif" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;strokeColor=#b85450;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1480" y="772" as="sourcePoint" />
            <mxPoint x="1035" y="772" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_20" value="PUT /order/:id/assign-driver  {driver_id, isUsePlanner}  [TRANSPORTER]&#xa;=&gt; assignDriver  (assign truck, createInvoiceByOrder)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;strokeColor=#d79b00;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="805" y="812" as="sourcePoint" />
            <mxPoint x="1035" y="812" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_21" value="[opsional] PUT /order/:id/unassign-driver =&gt; balik requestAssignmentDriver" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;fontColor=#666666;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="805" y="846" as="sourcePoint" />
            <mxPoint x="1035" y="846" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p1_22" value="notif order ke driver  =&gt; lanjut TAB 2 (startToLoadingPoint)" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="880" as="sourcePoint" />
            <mxPoint x="110" y="880" as="targetPoint" />
          </mxGeometry>
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="tab2-muat" name="2. POD Muat (Loading)">
    <mxGraphModel dx="1400" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1850" pageHeight="620" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="p2_lDriver" value="Driver (Mobile)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="40" y="40" width="140" height="540" as="geometry" />
        </mxCell>
        <mxCell id="p2_lPic" value="PIC / WarehousePIC (web-field)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="270" y="40" width="140" height="540" as="geometry" />
        </mxCell>
        <mxCell id="p2_lShipper" value="Shipper" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#ffe6cc;strokeColor=#d79b00;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="500" y="40" width="140" height="540" as="geometry" />
        </mxCell>
        <mxCell id="p2_lAtm" value="Transporter / Admin (ATM)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#ffe6cc;strokeColor=#d79b00;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="730" y="40" width="150" height="540" as="geometry" />
        </mxCell>
        <mxCell id="p2_lBe" value="Karlo Backend (System)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#f8cecc;strokeColor=#b85450;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="960" y="40" width="150" height="540" as="geometry" />
        </mxCell>
        <mxCell id="p2_lWa" value="WA Gateway" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#e1d5e7;strokeColor=#9673a6;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="1190" y="40" width="140" height="540" as="geometry" />
        </mxCell>
        <mxCell id="p2_lXendit" value="Xendit" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#e1d5e7;strokeColor=#9673a6;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="1410" y="40" width="140" height="540" as="geometry" />
        </mxCell>
        <mxCell id="p2_lCron" value="Cron / Scheduler" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#fff2cc;strokeColor=#d6b656;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="1630" y="40" width="140" height="540" as="geometry" />
        </mxCell>
        <mxCell id="p2_band" value="TAB 2 — POD MUAT (Loading), per shipment ##n" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;align=left;spacingLeft=10;fontStyle=1;fontSize=12;opacity=80;" vertex="1" parent="1">
          <mxGeometry x="40" y="92" width="1730" height="24" as="geometry" />
        </mxCell>
        <mxCell id="p2_note" value="Endpoint *-using-code = kembar publik (tanpa login, auth kfieldCode)&#xa;dari versi WAREHOUSEPIC. arrive-at-loading-point &amp; start-loading&#xa;di-comment di stepStatusReguler (aktif hanya flow ktrip-enhance)." style="shape=note;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;align=left;" vertex="1" parent="1">
          <mxGeometry x="1560" y="150" width="280" height="90" as="geometry" />
        </mxCell>
        <mxCell id="p2_1" value="PUT /order/:id/shipment/start-to-loading-point {currentLocation} [DRIVER]&#xa;=&gt; startToLoadingPoint  (&#39;Driver menerima Order&#39;)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="110" y="132" as="sourcePoint" />
            <mxPoint x="1035" y="132" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p2_2" value="[opsional] PUT .../arrive-at-loading-point [DRIVER] =&gt; arriveAtLoadingPoint" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;fontColor=#666666;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="110" y="166" as="sourcePoint" />
            <mxPoint x="1035" y="166" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p2_3" value="PUT .../scan-code-loading [WAREHOUSEPIC] | .../scan-code-loading-using-code [web-field]&#xa;=&gt; scanCodeLoading#&lt;shipmentId&gt;#&lt;seq&gt;" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="340" y="204" as="sourcePoint" />
            <mxPoint x="1035" y="204" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p2_4" value="PUT .../approval-loading {statusApproval:accept} [WPIC/web-field]&#xa;=&gt; approvalLoadingAccepted  (cancel/reschedule = cabang lain)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="340" y="242" as="sourcePoint" />
            <mxPoint x="1035" y="242" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p2_5" value="[opsional] PUT .../start-loading [DRIVER] =&gt; startLoading (ktrip-enhance)" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;fontColor=#666666;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="110" y="276" as="sourcePoint" />
            <mxPoint x="1035" y="276" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p2_6" value="PUT .../checklist-loading {checklist,amount,weight,volume,fotopic} [WPIC/web-field]&#xa;=&gt; checklistCargoLoading" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="340" y="314" as="sourcePoint" />
            <mxPoint x="1035" y="314" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p2_7" value="PUT .../finish-loading-verification {fotoPod, fotoCargo, isApproveItemVerification} [DRIVER]&#xa;(legacy: .../finish-loading = versi lama tanpa verifikasi)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="110" y="352" as="sourcePoint" />
            <mxPoint x="1035" y="352" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p2_8" value="statusHistory: verifyCargoLoading##n =&gt; cargoLoadingVerified##n =&gt; finishLoading##n" style="html=1;verticalAlign=bottom;endArrow=block;rounded=0;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="386" as="sourcePoint" />
            <mxPoint x="1035" y="412" as="targetPoint" />
            <Array as="points">
              <mxPoint x="1140" y="386" />
              <mxPoint x="1140" y="412" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="p2_9" value="status =&gt; verifyPodLoading##n  (menunggu verifikasi POD)" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="446" as="sourcePoint" />
            <mxPoint x="110" y="446" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p2_10" value="PUT /pod/:id/verify {type:&#39;loading&#39;, approval, shipmentId} [ATM] (approvalVerifyPod)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="805" y="480" as="sourcePoint" />
            <mxPoint x="1035" y="480" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p2_11" value="approve =&gt; podLoadingVerified##n  |  tolak =&gt; podLoadingRejected##n (skip-status)" style="html=1;verticalAlign=bottom;endArrow=block;rounded=0;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="514" as="sourcePoint" />
            <mxPoint x="1035" y="540" as="targetPoint" />
            <Array as="points">
              <mxPoint x="1140" y="514" />
              <mxPoint x="1140" y="540" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="p2_12" value="[jika ditolak] PUT /upload-pod/:id {fotoPod} [DRIVER] (reuploadPod) =&gt; balik verifyPodLoading##n" style="html=1;verticalAlign=bottom;endArrow=open;dashed=1;fontSize=11;strokeColor=#b85450;fontColor=#b85450;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="110" y="574" as="sourcePoint" />
            <mxPoint x="1035" y="574" as="targetPoint" />
          </mxGeometry>
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="tab3-bongkar" name="3. POD Bongkar OTP (Unloading)">
    <mxGraphModel dx="1400" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1850" pageHeight="880" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="p3_lDriver" value="Driver (Mobile)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="40" y="40" width="140" height="800" as="geometry" />
        </mxCell>
        <mxCell id="p3_lPic" value="PIC / WarehousePIC (web-field)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="270" y="40" width="140" height="800" as="geometry" />
        </mxCell>
        <mxCell id="p3_lShipper" value="Shipper" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#ffe6cc;strokeColor=#d79b00;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="500" y="40" width="140" height="800" as="geometry" />
        </mxCell>
        <mxCell id="p3_lAtm" value="Transporter / Admin (ATM)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#ffe6cc;strokeColor=#d79b00;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="730" y="40" width="150" height="800" as="geometry" />
        </mxCell>
        <mxCell id="p3_lBe" value="Karlo Backend (System)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#f8cecc;strokeColor=#b85450;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="960" y="40" width="150" height="800" as="geometry" />
        </mxCell>
        <mxCell id="p3_lWa" value="WA Gateway" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#e1d5e7;strokeColor=#9673a6;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="1190" y="40" width="140" height="800" as="geometry" />
        </mxCell>
        <mxCell id="p3_lXendit" value="Xendit" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#e1d5e7;strokeColor=#9673a6;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="1410" y="40" width="140" height="800" as="geometry" />
        </mxCell>
        <mxCell id="p3_lCron" value="Cron / Scheduler" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#fff2cc;strokeColor=#d6b656;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="1630" y="40" width="140" height="800" as="geometry" />
        </mxCell>
        <mxCell id="p3_band" value="TAB 3 — POD BONGKAR OTP (Unloading), hanya order isUsingOtpBongkar: true" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;spacingLeft=10;fontStyle=1;fontSize=12;opacity=80;" vertex="1" parent="1">
          <mxGeometry x="40" y="92" width="1730" height="24" as="geometry" />
        </mxCell>
        <mxCell id="p3_1" value="POST /order/:id/shipment/send-otp-pic-unloading {name,phone,shipmentIndex} [token, no-role]  (throttle 30s)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="110" y="132" as="sourcePoint" />
            <mxPoint x="1035" y="132" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_2" value="kirim OTP (otp_code_id) + info order + link web-field" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="166" as="sourcePoint" />
            <mxPoint x="1260" y="166" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_3" value="OTP + link web-field (magic login) ke PIC" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1260" y="200" as="sourcePoint" />
            <mxPoint x="340" y="200" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_4" value="[opsional] GET .../pic-list [DRIVER] (dropdown PIC gudang)" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;fontColor=#666666;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="110" y="234" as="sourcePoint" />
            <mxPoint x="1035" y="234" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_5" value="[opsional] POST .../change-pic {picId | name,phone} [DRIVER] (A: instan / B: butuh approval, OTP ditahan)" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;fontColor=#666666;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="110" y="268" as="sourcePoint" />
            <mxPoint x="1035" y="268" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_6" value="[opsional] notif approval PIC (OTP DITAHAN)" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;fontColor=#666666;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="302" as="sourcePoint" />
            <mxPoint x="570" y="302" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_7" value="[opsional] PUT .../change-pic/approval {approve} [ASTM] =&gt; OTP dikirim" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;fontColor=#666666;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="570" y="336" as="sourcePoint" />
            <mxPoint x="1035" y="336" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_8" value="[opsional] GET .../new-pic-status [DRIVER] (polling + eksekutor auto-approve 45m)" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;fontColor=#666666;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="110" y="370" as="sourcePoint" />
            <mxPoint x="1035" y="370" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_9" value="beri kode OTP ke driver (lisan)" style="html=1;verticalAlign=bottom;endArrow=open;dashed=1;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="340" y="404" as="sourcePoint" />
            <mxPoint x="110" y="404" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_10" value="PUT .../start-unloading {otp, currentLocation} [DRIVER]  (cek OTP, expire 5m)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="110" y="438" as="sourcePoint" />
            <mxPoint x="1035" y="438" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_11" value="statusHistory: startUnloading##n + verifyCargoUnloading##n" style="html=1;verticalAlign=bottom;endArrow=block;rounded=0;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="472" as="sourcePoint" />
            <mxPoint x="1035" y="498" as="targetPoint" />
            <Array as="points">
              <mxPoint x="1140" y="472" />
              <mxPoint x="1140" y="498" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_12" value="PUT .../pic-verify-hold-using-code {kfieldCode, isApproveItemVerification} [web-field]  (hasil DI-HOLD)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="340" y="532" as="sourcePoint" />
            <mxPoint x="1035" y="532" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_13" value="hold =&gt; cargoUnloadingVerified##n (history)" style="html=1;verticalAlign=bottom;endArrow=block;rounded=0;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="566" as="sourcePoint" />
            <mxPoint x="1035" y="592" as="targetPoint" />
            <Array as="points">
              <mxPoint x="1140" y="566" />
              <mxPoint x="1140" y="592" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_14" value="[opsional] POST .../report-pic-inactive {shipmentIndex} [DRIVER] (notif transporter+shipper, tanpa tulis DB)" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;fontColor=#666666;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="110" y="626" as="sourcePoint" />
            <mxPoint x="1035" y="626" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_15" value="[opsional] PUT /order/:id/bypass-verifikasi-bongkar {shipmentIndex} [ASTM]  (lewati checklist PIC, OTP tetap wajib)" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;fontColor=#666666;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="805" y="660" as="sourcePoint" />
            <mxPoint x="1035" y="660" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_16" value="PUT .../finish-unloading [DRIVER]  (guard pic_hold_incomplete, merge foto+hold, submittedToPlannerAt)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="110" y="694" as="sourcePoint" />
            <mxPoint x="1035" y="694" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_17" value="=&gt; verifyPodUnloading##n + notif transporter (menunggu verifikasi)" style="html=1;verticalAlign=bottom;endArrow=block;rounded=0;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="728" as="sourcePoint" />
            <mxPoint x="1035" y="754" as="targetPoint" />
            <Array as="points">
              <mxPoint x="1140" y="728" />
              <mxPoint x="1140" y="754" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_18" value="PUT /pod/:id/verify {type:&#39;unloading&#39;, approval} [ATM] (approvalVerifyPod)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="805" y="788" as="sourcePoint" />
            <mxPoint x="1035" y="788" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p3_19" value="approve =&gt; podUnloadingVerified##n =&gt; shipment berikutnya (ulang TAB 2/3) / done" style="html=1;verticalAlign=bottom;endArrow=block;rounded=0;fontSize=11;strokeColor=#b85450;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="822" as="sourcePoint" />
            <mxPoint x="1035" y="838" as="targetPoint" />
            <Array as="points">
              <mxPoint x="1140" y="822" />
              <mxPoint x="1140" y="838" />
            </Array>
          </mxGeometry>
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="tab4-settle" name="4. Settlement (orderFinal + Disbursement)">
    <mxGraphModel dx="1194" dy="824" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1850" pageHeight="520" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="p4_lDriver" value="Driver (Mobile)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="40" y="40" width="140" height="440" as="geometry" />
        </mxCell>
        <mxCell id="p4_lPic" value="PIC / WarehousePIC (web-field)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="270" y="40" width="140" height="440" as="geometry" />
        </mxCell>
        <mxCell id="p4_lShipper" value="Shipper" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#ffe6cc;strokeColor=#d79b00;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="500" y="40" width="140" height="440" as="geometry" />
        </mxCell>
        <mxCell id="p4_lAtm" value="Transporter / Admin (ATM)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#ffe6cc;strokeColor=#d79b00;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="730" y="40" width="150" height="440" as="geometry" />
        </mxCell>
        <mxCell id="p4_lBe" value="Karlo Backend (System)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#f8cecc;strokeColor=#b85450;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="960" y="40" width="150" height="440" as="geometry" />
        </mxCell>
        <mxCell id="p4_lWa" value="WA Gateway" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#e1d5e7;strokeColor=#9673a6;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="1190" y="40" width="140" height="440" as="geometry" />
        </mxCell>
        <mxCell id="p4_lXendit" value="Xendit (Disbursement)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#e1d5e7;strokeColor=#9673a6;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="1410" y="40" width="140" height="440" as="geometry" />
        </mxCell>
        <mxCell id="p4_lCron" value="Cron / Scheduler" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#fff2cc;strokeColor=#d6b656;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="1630" y="40" width="140" height="440" as="geometry" />
        </mxCell>
        <mxCell id="p4_band" value="TAB 4 — SETTLEMENT: done =&gt; orderFinal =&gt; disbursement" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;align=left;spacingLeft=10;fontStyle=1;fontSize=12;opacity=80;" parent="1" vertex="1">
          <mxGeometry x="40" y="92" width="1730" height="24" as="geometry" />
        </mxCell>
        <mxCell id="p4_note" value="disbursementSuccess statusCode literal = &#39;otoTranspoterUpdate&#39;.&#xa;Komentar cron autoOtoFinal tertulis &#39;24 jam&#39; tapi kode pakai 3 hari&#xa;(THREE_DAYS_IN_MS). [opsional] GET /disbursement/available &amp;&#xa;POST /disbursement/check-status = read-only (tak ubah status)." style="shape=note;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;align=left;" parent="1" vertex="1">
          <mxGeometry x="470" y="150" width="290" height="100" as="geometry" />
        </mxCell>
        <mxCell id="p4_1" value="shipment TERAKHIR verified (approvalVerifyPod via findNextStatus) =&gt; done##&#xa;+ beres-beres: free truck (updateStatusTruck/removeTruckSiba), billing (updateAmount), toll (getTollHistory)" style="html=1;verticalAlign=bottom;endArrow=block;rounded=0;fontSize=11;strokeColor=#b85450;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="134" as="sourcePoint" />
            <mxPoint x="1035" y="160" as="targetPoint" />
            <Array as="points">
              <mxPoint x="1140" y="134" />
              <mxPoint x="1140" y="160" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="p4_2" value="Cron autoOtoFinal (0 0 * * * WIB, order done## &gt; 3 hari) =&gt; orderFinal" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;strokeColor=#d6b656;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1700" y="200" as="sourcePoint" />
            <mxPoint x="1035" y="200" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p4_3" value="[alternatif manual] PUT /quick-order/:id/finish-order [ASTM] (otoFinal; butuh done##, belum orderFinal) =&gt; orderFinal" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;fontColor=#666666;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="805" y="266" as="sourcePoint" />
            <mxPoint x="1035" y="266" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p4_4" value="POST /disbursement/create [token] (createDisbursement; butuh status == orderFinal)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="805" y="300" as="sourcePoint" />
            <mxPoint x="1035" y="300" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p4_5" value="POST disbursements (request ke Xendit)" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="334" as="sourcePoint" />
            <mxPoint x="1480" y="334" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p4_6" value="PENDING =&gt; orderDisbursement  |  immediate non-PENDING =&gt; fallback orderFinal" style="html=1;verticalAlign=bottom;endArrow=block;rounded=0;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="368" as="sourcePoint" />
            <mxPoint x="1035" y="394" as="targetPoint" />
            <Array as="points">
              <mxPoint x="1140" y="368" />
              <mxPoint x="1140" y="394" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="p4_7" value="webhook POST /callback/disbursement (callBackDisbursement)" style="html=1;verticalAlign=bottom;endArrow=block;dashed=1;fontSize=11;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1480" y="428" as="sourcePoint" />
            <mxPoint x="1035" y="428" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p4_8" value="COMPLETED =&gt; otoTranspoterUpdate (disbursementSuccess)  |  else orderDisbursement" style="html=1;verticalAlign=bottom;endArrow=block;rounded=0;fontSize=11;strokeColor=#b85450;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1035" y="462" as="sourcePoint" />
            <mxPoint x="1035" y="478" as="targetPoint" />
            <Array as="points">
              <mxPoint x="1140" y="462" />
              <mxPoint x="1140" y="478" />
            </Array>
          </mxGeometry>
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
  <diagram id="tab5-cancel" name="5. Cancel Order">
    <mxGraphModel dx="1050" dy="700" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1050" pageHeight="560" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="p5_lShipper" value="Shipper" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#ffe6cc;strokeColor=#d79b00;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="40" y="40" width="140" height="480" as="geometry" />
        </mxCell>
        <mxCell id="p5_lAtm" value="Transporter / Admin (ATM)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#ffe6cc;strokeColor=#d79b00;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="270" y="40" width="150" height="480" as="geometry" />
        </mxCell>
        <mxCell id="p5_lBe" value="Karlo Backend (System)" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;collapsible=0;outlineConnect=0;fillColor=#f8cecc;strokeColor=#b85450;fontStyle=1;" parent="1" vertex="1">
          <mxGeometry x="500" y="40" width="150" height="480" as="geometry" />
        </mxCell>
        <mxCell id="p5_band" value="TAB 5 - CANCEL ORDER (isOneTimeOrder only)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;align=left;spacingLeft=10;fontStyle=1;fontSize=12;opacity=80;" parent="1" vertex="1">
          <mxGeometry x="40" y="92" width="610" height="24" as="geometry" />
        </mxCell>
        <mxCell id="p5_note_role" value="Role resolution: admin diperlakukan sebagai transporter.&#xa;manager di-resolve ke shipper atau transporter&#xa;tergantung getTopLevelUserId(user) == order.shipper&#xa;vs == order.transporter." style="shape=note;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;align=left;" parent="1" vertex="1">
          <mxGeometry x="680" y="130" width="300" height="100" as="geometry" />
        </mxCell>
        <mxCell id="p5_note_xref" value="Beda jalur dari auto-cancel saat negosiasi&#xa;(cancelOrderIfAllNegotiationsRejected, lihat catatan&#xa;Tab 1): itu terjadi kalau SEMUA transporter reject&#xa;semua armada, tanpa endpoint ini. Tab ini khusus&#xa;untuk cancel eksplisit oleh user." style="shape=note;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;align=left;" parent="1" vertex="1">
          <mxGeometry x="680" y="250" width="300" height="110" as="geometry" />
        </mxCell>
        <mxCell id="p5_1" value="PUT /order/:id/cancel-order {reasonCanceled} [ASTM]" style="html=1;verticalAlign=bottom;endArrow=block;fontSize=11;strokeColor=#d79b00;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="345" y="155" as="sourcePoint" />
            <mxPoint x="575" y="155" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="p5_note_rule" value="ATURAN BISNIS (dikonfirmasi langsung dengan backend):&#xa;cancel HANYA diperbolehkan saat status assignDriver&#xa;(&#34;Driver Ditugaskan&#34;).&#xa;&#xa;Kode saat ini (OrderControllerV2.cancelOrder, branch&#xa;isOneTimeOrder) sebenarnya lebih longgar: shipper hanya&#xa;bisa cancel di requestAssignmentDriver / assignDriver /&#xa;startToLoadingPoint; transporter atau manager bisa&#xa;cancel di hampir semua status kecuali status &#34;terminal&#34;&#xa;(done##, cancel, draft, expired, + beberapa kode OTO&#xa;negosiasi/pembayaran/pencairan). Ini diskrepansi yang&#xa;sudah diketahui backend, bukan sesuatu yang perlu&#xa;di-workaround di FE." style="shape=note;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;fontSize=10;align=left;" parent="1" vertex="1">
          <mxGeometry x="170" y="190" width="370" height="190" as="geometry" />
        </mxCell>
        <mxCell id="p5_2" value="Sukses =&gt; statusCode = cancel.&#xa;Truck dilepas ke idle (Truck.updateOne). Invoice terkait&#xa;dibatalkan via cancelOrderAndChild jika ada." style="html=1;verticalAlign=bottom;endArrow=block;rounded=0;fontSize=11;strokeColor=#b85450;" parent="1" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="575" y="400" as="sourcePoint" />
            <mxPoint x="575" y="430" as="targetPoint" />
            <Array as="points">
              <mxPoint x="680" y="400" />
              <mxPoint x="680" y="430" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="p5_note_fe" value="FE transporter (spot-order-continuation) hanya&#xa;menampilkan tombol Cancel Order saat status&#xa;assignDriver, sesuai persis dengan aturan bisnis&#xa;di atas, bukan pembatasan sepihak FE." style="shape=note;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=10;align=left;" parent="1" vertex="1">
          <mxGeometry x="170" y="400" width="370" height="90" as="geometry" />
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
