<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="Electron" agent="Standing Order Agent" version="24.7.17">
  <diagram name="Scheduling and Jobs Module" id="standing-order-scheduling-and-jobs-module">
    <mxGraphModel dx="1400" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1750" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <mxCell id="s1" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9AB8AD;strokeWidth=2;dashed=0;endArrow=block;endFill=1;fontColor=#547067;fontFamily=Helvetica;fontSize=12;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="cron" target="dispatch"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="s2" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9AB8AD;strokeWidth=2;dashed=0;endArrow=block;endFill=1;fontColor=#547067;fontFamily=Helvetica;fontSize=12;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="schedules" target="dispatch"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="s3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9AB8AD;strokeWidth=2;dashed=0;endArrow=block;endFill=1;fontColor=#547067;fontFamily=Helvetica;fontSize=12;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="dispatch" target="lock"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="s4" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9AB8AD;strokeWidth=2;dashed=0;endArrow=block;endFill=1;fontColor=#547067;fontFamily=Helvetica;fontSize=12;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="lock" target="occurrence"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="s5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9AB8AD;strokeWidth=2;dashed=0;endArrow=block;endFill=1;fontColor=#547067;fontFamily=Helvetica;fontSize=12;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="occurrence" target="advance"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="s6" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9AB8AD;strokeWidth=2;dashed=0;endArrow=block;endFill=1;fontColor=#547067;fontFamily=Helvetica;fontSize=12;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="advance" target="outbox"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="s7" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9AB8AD;strokeWidth=2;dashed=0;endArrow=block;endFill=1;fontColor=#547067;fontFamily=Helvetica;fontSize=12;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="outbox" target="queue"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="s8" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9AB8AD;strokeWidth=2;dashed=0;endArrow=block;endFill=1;fontColor=#547067;fontFamily=Helvetica;fontSize=12;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="queue" target="worker"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="s9" value="transient failure" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9AB8AD;strokeWidth=2;dashed=0;endArrow=block;endFill=1;fontColor=#547067;fontFamily=Helvetica;fontSize=12;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="worker" target="retry"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="s10" value="safe retry" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9AB8AD;strokeWidth=2;dashed=1;endArrow=block;endFill=1;fontColor=#547067;fontFamily=Helvetica;fontSize=12;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="retry" target="queue"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="cron" value="Static cron trigger&#xa;every minute" style="rounded=1;whiteSpace=wrap;html=1;arcSize=18;fillColor=#FFF1D6;strokeColor=#C58A2C;fontColor=#17352B;fontFamily=Helvetica;fontSize=14;fontStyle=1;spacing=10;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="50" y="330" width="210" height="100" as="geometry"/></mxCell>
        <mxCell id="dispatch" value="Dispatch due schedules&#xa;Postgres transaction" style="rounded=1;whiteSpace=wrap;html=1;arcSize=18;fillColor=#DDF4E6;strokeColor=#4F8B6B;fontColor=#17352B;fontFamily=Helvetica;fontSize=14;fontStyle=1;spacing=10;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="350" y="300" width="260" height="150" as="geometry"/></mxCell>
        <mxCell id="schedules" value="Standing-order schedules&#xa;IANA timezone · recurrence" style="rounded=1;whiteSpace=wrap;html=1;arcSize=18;fillColor=#F2F5F3;strokeColor=#80928B;fontColor=#17352B;fontFamily=Helvetica;fontSize=14;fontStyle=1;spacing=10;strokeWidth=1.5;shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=14;" vertex="1" parent="1"><mxGeometry x="380" y="70" width="220" height="100" as="geometry"/></mxCell>
        <mxCell id="lock" value="Lock due rows&#xa;FOR UPDATE SKIP LOCKED" style="rounded=1;whiteSpace=wrap;html=1;arcSize=18;fillColor=#E4EFFB;strokeColor=#5F88B5;fontColor=#17352B;fontFamily=Helvetica;fontSize=14;fontStyle=1;spacing=10;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="710" y="100" width="240" height="100" as="geometry"/></mxCell>
        <mxCell id="occurrence" value="Create occurrence&#xa;unique schedule + timestamp" style="rounded=1;whiteSpace=wrap;html=1;arcSize=18;fillColor=#DDF4E6;strokeColor=#4F8B6B;fontColor=#17352B;fontFamily=Helvetica;fontSize=14;fontStyle=1;spacing=10;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="710" y="280" width="240" height="110" as="geometry"/></mxCell>
        <mxCell id="advance" value="Advance next occurrence&#xa;DST-aware calculation" style="rounded=1;whiteSpace=wrap;html=1;arcSize=18;fillColor=#E4EFFB;strokeColor=#5F88B5;fontColor=#17352B;fontFamily=Helvetica;fontSize=14;fontStyle=1;spacing=10;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="710" y="470" width="240" height="110" as="geometry"/></mxCell>
        <mxCell id="outbox" value="Write job outbox&#xa;same transaction" style="rounded=1;whiteSpace=wrap;html=1;arcSize=18;fillColor=#F2F5F3;strokeColor=#80928B;fontColor=#17352B;fontFamily=Helvetica;fontSize=14;fontStyle=1;spacing=10;strokeWidth=1.5;shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=14;" vertex="1" parent="1"><mxGeometry x="710" y="660" width="240" height="100" as="geometry"/></mxCell>
        <mxCell id="queue" value="Graphile Worker&#xa;durable job + bounded retry" style="rounded=1;whiteSpace=wrap;html=1;arcSize=18;fillColor=#FFF1D6;strokeColor=#C58A2C;fontColor=#17352B;fontFamily=Helvetica;fontSize=14;fontStyle=1;spacing=10;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="1070" y="300" width="250" height="140" as="geometry"/></mxCell>
        <mxCell id="worker" value="Prepare order cycle&#xa;idempotent workflow step" style="rounded=1;whiteSpace=wrap;html=1;arcSize=18;fillColor=#DDF4E6;strokeColor=#4F8B6B;fontColor=#17352B;fontFamily=Helvetica;fontSize=14;fontStyle=1;spacing=10;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="1420" y="300" width="250" height="140" as="geometry"/></mxCell>
        <mxCell id="retry" value="Reconcile before retry&#xa;never retry ambiguous checkout" style="rounded=1;whiteSpace=wrap;html=1;arcSize=18;fillColor=#FDE7E0;strokeColor=#C8755E;fontColor=#17352B;fontFamily=Helvetica;fontSize=14;fontStyle=1;spacing=10;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="1080" y="600" width="250" height="110" as="geometry"/></mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
