<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:nano="https://nanobpm.io/schema/shapes/1.0" id="Definitions_nano_workforce_feature" targetNamespace="http://nanobpm.io/nano-workforce">
  <bpmn:process id="feature" name="Single-issue feature run" isExecutable="true">
    <bpmn:extensionElements>
      <nano:shapes>
        <nano:shape id="RecordFeatureIn" name="Record feature result — input">
          <nano:extend name="featureKey" type="string" />
          <nano:extend name="status" type="string" optional="true" />
          <nano:extend name="pr" type="string" optional="true" />
          <nano:extend name="summary" type="string" optional="true" />
        </nano:shape>
        <nano:shape id="RecordFeatureImplementingIn" name="Record feature implementing — input">
          <nano:extend name="featureKey" type="string" optional="true" />
          <nano:extend name="subjectKey" type="string" optional="true" />
        </nano:shape>
        <nano:shape id="ConvergeFeatureIn" name="Converge feature PR — input">
          <nano:extend name="featureKey" type="string" />
          <nano:extend name="prKey" type="string" optional="true" />
          <nano:extend name="autoMerge" type="boolean" optional="true" />
        </nano:shape>
      </nano:shapes>
    </bpmn:extensionElements>
    <bpmn:startEvent id="Start" name="Issue submitted">
      <bpmn:outgoing>f_toReadinessGw</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:exclusiveGateway id="gw-readiness" name="gated (has readiness probe)?" default="f_readiness_skip">
      <bpmn:incoming>f_toReadinessGw</bpmn:incoming>
      <bpmn:outgoing>f_readiness_gate</bpmn:outgoing>
      <bpmn:outgoing>f_readiness_skip</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:subProcess id="readiness-preflight" name="Await upstream readiness (preflight)">
      <bpmn:incoming>f_readiness_gate</bpmn:incoming>
      <bpmn:outgoing>f_readiness_done</bpmn:outgoing>
      <bpmn:multiInstanceLoopCharacteristics>
        <bpmn:extensionElements>
          <zeebe:loopCharacteristics inputCollection="=readinessProbes" inputElement="probe" outputCollection="resolvedArtifacts" outputElement="=resolvedArtifact" />
        </bpmn:extensionElements>
      </bpmn:multiInstanceLoopCharacteristics>
      <bpmn:startEvent id="pf_start" name="Awaiting readiness">
        <bpmn:outgoing>pf_toProbe</bpmn:outgoing>
      </bpmn:startEvent>
      <bpmn:subProcess id="preflight-probe-loop" name="Probe readiness loop">
        <bpmn:extensionElements>
          <zeebe:ioMapping>
            <zeebe:output source="=ready" target="ready" />
            <zeebe:output source="=if (is defined(detail)) then detail else null" target="detail" />
            <zeebe:output source="=if (is defined(resolvedArtifact)) then resolvedArtifact else null" target="resolvedArtifact" />
            <zeebe:output source="=if (is defined(mergedSha)) then mergedSha else null" target="mergedSha" />
          </zeebe:ioMapping>
        </bpmn:extensionElements>
        <bpmn:incoming>pf_toProbe</bpmn:incoming>
        <bpmn:outgoing>pf_probed</bpmn:outgoing>
        <bpmn:startEvent id="pf_loop_start" name="Start probe loop">
          <bpmn:outgoing>pf_loop_toProbe</bpmn:outgoing>
        </bpmn:startEvent>
        <bpmn:serviceTask id="preflight-probe" name="Probe readiness">
          <bpmn:extensionElements>
            <zeebe:taskDefinition type="pr.readiness-probe" />
            <zeebe:properties>
              <zeebe:property name="io.nanobpm.dataEnvelope.in" value="ReadinessProbeIn" />
              <zeebe:property name="io.nanobpm.dataEnvelope.out" value="ReadinessProbeOut" />
            </zeebe:properties>
          </bpmn:extensionElements>
          <bpmn:incoming>pf_loop_toProbe</bpmn:incoming>
          <bpmn:incoming>pf_pollBack</bpmn:incoming>
          <bpmn:outgoing>pf_loop_probed</bpmn:outgoing>
        </bpmn:serviceTask>
        <bpmn:exclusiveGateway id="pf_loop_gw" name="ready?" default="pf_notReady">
          <bpmn:incoming>pf_loop_probed</bpmn:incoming>
          <bpmn:outgoing>pf_loop_ready</bpmn:outgoing>
          <bpmn:outgoing>pf_notReady</bpmn:outgoing>
        </bpmn:exclusiveGateway>
        <bpmn:intermediateCatchEvent id="pf_wait_poll" name="Wait poll interval">
          <bpmn:incoming>pf_notReady</bpmn:incoming>
          <bpmn:outgoing>pf_pollBack</bpmn:outgoing>
          <bpmn:timerEventDefinition id="ted_pf_probe_poll">
            <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">=probePollEvery</bpmn:timeDuration>
          </bpmn:timerEventDefinition>
        </bpmn:intermediateCatchEvent>
        <bpmn:endEvent id="pf_loop_end" name="Probe ready">
          <bpmn:incoming>pf_loop_ready</bpmn:incoming>
        </bpmn:endEvent>
        <bpmn:sequenceFlow id="pf_loop_toProbe" sourceRef="pf_loop_start" targetRef="preflight-probe" />
        <bpmn:sequenceFlow id="pf_loop_probed" sourceRef="preflight-probe" targetRef="pf_loop_gw" />
        <bpmn:sequenceFlow id="pf_loop_ready" name="ready" sourceRef="pf_loop_gw" targetRef="pf_loop_end">
          <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=ready = true</bpmn:conditionExpression>
        </bpmn:sequenceFlow>
        <bpmn:sequenceFlow id="pf_notReady" name="not ready" sourceRef="pf_loop_gw" targetRef="pf_wait_poll" />
        <bpmn:sequenceFlow id="pf_pollBack" sourceRef="pf_wait_poll" targetRef="preflight-probe" />
      </bpmn:subProcess>
      <bpmn:boundaryEvent id="be_pf_probe_timeout" name="Probe timed out" attachedToRef="preflight-probe-loop">
        <bpmn:outgoing>pf_probeTimedOut</bpmn:outgoing>
        <bpmn:timerEventDefinition id="ted_pf_probe_timeout">
          <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">=probeTimeout</bpmn:timeDuration>
        </bpmn:timerEventDefinition>
      </bpmn:boundaryEvent>
      <bpmn:serviceTask id="preflight-probe-last-attempt" name="Probe readiness (last attempt)">
        <bpmn:extensionElements>
          <zeebe:taskDefinition type="pr.readiness-probe" />
          <zeebe:properties>
            <zeebe:property name="io.nanobpm.dataEnvelope.in" value="ReadinessProbeIn" />
            <zeebe:property name="io.nanobpm.dataEnvelope.out" value="ReadinessProbeOut" />
          </zeebe:properties>
          <zeebe:ioMapping>
            <zeebe:input source="=true" target="lastAttempt" />
          </zeebe:ioMapping>
        </bpmn:extensionElements>
        <bpmn:incoming>pf_probeTimedOut</bpmn:incoming>
        <bpmn:outgoing>pf_lastAttemptDone</bpmn:outgoing>
      </bpmn:serviceTask>
      <bpmn:exclusiveGateway id="pf_gw" name="upstream ready?" default="pf_escalate">
        <bpmn:incoming>pf_probed</bpmn:incoming>
        <bpmn:outgoing>pf_ready</bpmn:outgoing>
        <bpmn:outgoing>pf_escalate</bpmn:outgoing>
      </bpmn:exclusiveGateway>
      <bpmn:userTask id="readiness-escalation-pf" name="Upstream readiness stalled (human)">
        <bpmn:extensionElements>
          <zeebe:formDefinition formId="readiness-escalation" />
          <zeebe:userTask />
          <zeebe:assignmentDefinition candidateGroups="operators" />
        </bpmn:extensionElements>
        <bpmn:incoming>pf_escalate</bpmn:incoming>
        <bpmn:outgoing>pf_toResolution</bpmn:outgoing>
      </bpmn:userTask>
      <bpmn:boundaryEvent id="be_pf_sla" name="SLA elapsed" attachedToRef="readiness-escalation-pf">
        <bpmn:outgoing>pf_sla</bpmn:outgoing>
        <bpmn:timerEventDefinition id="ted_pf_sla">
          <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">=escalationSlaTimeout</bpmn:timeDuration>
        </bpmn:timerEventDefinition>
      </bpmn:boundaryEvent>
      <bpmn:exclusiveGateway id="pf_gw_res" name="resolution?" default="pf_proceed">
        <bpmn:incoming>pf_toResolution</bpmn:incoming>
        <bpmn:outgoing>pf_proceed</bpmn:outgoing>
        <bpmn:outgoing>pf_abandon</bpmn:outgoing>
      </bpmn:exclusiveGateway>
      <bpmn:endEvent id="pf_end" name="Readiness settled">
        <bpmn:incoming>pf_ready</bpmn:incoming>
        <bpmn:incoming>pf_proceed</bpmn:incoming>
        <bpmn:incoming>pf_abandon</bpmn:incoming>
        <bpmn:incoming>pf_sla</bpmn:incoming>
      </bpmn:endEvent>
      <bpmn:sequenceFlow id="pf_toProbe" sourceRef="pf_start" targetRef="preflight-probe-loop" />
      <bpmn:sequenceFlow id="pf_probed" sourceRef="preflight-probe-loop" targetRef="pf_gw" />
      <bpmn:sequenceFlow id="pf_ready" name="ready" sourceRef="pf_gw" targetRef="pf_end">
        <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=ready = true</bpmn:conditionExpression>
      </bpmn:sequenceFlow>
      <bpmn:sequenceFlow id="pf_escalate" name="stalled" sourceRef="pf_gw" targetRef="readiness-escalation-pf" />
      <bpmn:sequenceFlow id="pf_probeTimedOut" name="timed out" sourceRef="be_pf_probe_timeout" targetRef="preflight-probe-last-attempt" />
      <bpmn:sequenceFlow id="pf_lastAttemptDone" sourceRef="preflight-probe-last-attempt" targetRef="pf_gw" />
      <bpmn:sequenceFlow id="pf_toResolution" sourceRef="readiness-escalation-pf" targetRef="pf_gw_res" />
      <bpmn:sequenceFlow id="pf_proceed" name="acknowledge" sourceRef="pf_gw_res" targetRef="pf_end" />
      <bpmn:sequenceFlow id="pf_abandon" name="abandon" sourceRef="pf_gw_res" targetRef="pf_end">
        <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=resolution = "abandon"</bpmn:conditionExpression>
      </bpmn:sequenceFlow>
      <bpmn:sequenceFlow id="pf_sla" name="SLA auto-abandon" sourceRef="be_pf_sla" targetRef="pf_end" />
    </bpmn:subProcess>
    <bpmn:serviceTask id="ensure-base-branch" name="Ensure base branch">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="pr.ensure-base-branch" />
        <zeebe:properties>
          <zeebe:property name="io.nanobpm.dataEnvelope.in" value="EnsureBaseBranchIn" />
        </zeebe:properties>
        <zeebe:ioMapping>
          <zeebe:input source="=repo" target="repo" />
          <zeebe:input source="=baseBranch" target="baseBranch" />
        </zeebe:ioMapping>
      </bpmn:extensionElements>
      <bpmn:incoming>f_readiness_skip</bpmn:incoming>
      <bpmn:incoming>f_readiness_done</bpmn:incoming>
      <bpmn:outgoing>f_toImplement</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:callActivity id="implement" name="Implement cell">
      <bpmn:extensionElements>
        <zeebe:calledElement processId="implement-cell" />
        <zeebe:ioMapping>
          <zeebe:input source="=task" target="task" />
          <zeebe:input source="=baseBranch" target="baseBranch" />
          <zeebe:input source="=if (is defined(baseBranchBrief)) then baseBranchBrief else null" target="baseBranchBrief" />
          <zeebe:input source="=if (is defined(resolvedArtifacts)) then resolvedArtifacts else null" target="resolvedArtifacts" />
          <zeebe:input source="=if (is defined(customInstructions)) then customInstructions else null" target="customInstructions" />
          <zeebe:input source="=if (is defined(transcriptUrlBase)) then transcriptUrlBase else null" target="transcriptUrlBase" />
          <zeebe:input source="=if (is defined(escalationAssignee)) then escalationAssignee else null" target="escalationAssignee" />
          <zeebe:input source="=escalationSlaTimeout" target="escalationSlaTimeout" />
          <zeebe:input source="=featureKey" target="subjectKey" />
          <zeebe:output source="=status" target="status" />
          <zeebe:output source="=if (is defined(summary)) then summary else null" target="summary" />
          <zeebe:output source="=if (is defined(pr)) then pr else null" target="pr" />
          <zeebe:output source="=if (is defined(question)) then question else null" target="question" />
          <zeebe:output source="=if (is defined(transcriptUrl)) then transcriptUrl else null" target="transcriptUrl" />
        </zeebe:ioMapping>
      </bpmn:extensionElements>
      <bpmn:incoming>f_implementing</bpmn:incoming>
      <bpmn:outgoing>w_toRecord</bpmn:outgoing>
    </bpmn:callActivity>
    <bpmn:serviceTask id="record-feature-implementing" name="Record implementing">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="pr.record-feature-implementing" />
        <zeebe:properties>
          <zeebe:property name="io.nanobpm.dataEnvelope.in" value="RecordFeatureImplementingIn" />
        </zeebe:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>f_toImplement</bpmn:incoming>
      <bpmn:outgoing>f_implementing</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="record-feature" name="Record result">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="pr.record-feature" />
        <zeebe:properties>
          <zeebe:property name="io.nanobpm.dataEnvelope.in" value="RecordFeatureIn" />
        </zeebe:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>w_toRecord</bpmn:incoming>
      <bpmn:outgoing>f_toBlockedGw</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="gw-blocked" name="blocked?" default="f_notBlocked">
      <bpmn:incoming>f_toBlockedGw</bpmn:incoming>
      <bpmn:outgoing>f_blocked</bpmn:outgoing>
      <bpmn:outgoing>f_notBlocked</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:userTask id="feature-blocked" name="Blocked run (human)">
      <bpmn:extensionElements>
        <zeebe:formDefinition formId="feature-blocked" />
        <zeebe:userTask />
        <zeebe:assignmentDefinition candidateGroups="operators" />
      </bpmn:extensionElements>
      <bpmn:incoming>f_blocked</bpmn:incoming>
      <bpmn:outgoing>f_toBlockedAck</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:serviceTask id="record-blocked-ack" name="Record acknowledgement">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="pr.record-blocked-ack" />
        <zeebe:ioMapping>
          <zeebe:input source="=featureKey" target="featureKey" />
          <zeebe:input source="=if (is defined(note)) then note else null" target="note" />
        </zeebe:ioMapping>
      </bpmn:extensionElements>
      <bpmn:incoming>f_toBlockedAck</bpmn:incoming>
      <bpmn:outgoing>f_blockedEnd</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="gw-converge" name="converge?" default="f_noConverge">
      <bpmn:incoming>f_notBlocked</bpmn:incoming>
      <bpmn:outgoing>f_converge</bpmn:outgoing>
      <bpmn:outgoing>f_noConverge</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:callActivity id="converge" name="Converge cell">
      <bpmn:extensionElements>
        <zeebe:calledElement processId="converge-cell" />
        <zeebe:ioMapping>
          <zeebe:input source="=featureKey" target="featureKey" />
          <zeebe:input source="=prKey" target="prKey" />
          <zeebe:input source="=autoMerge" target="autoMerge" />
        </zeebe:ioMapping>
      </bpmn:extensionElements>
      <bpmn:incoming>f_converge</bpmn:incoming>
      <bpmn:outgoing>f_toEndConverged</bpmn:outgoing>
    </bpmn:callActivity>
    <bpmn:endEvent id="End" name="Done">
      <bpmn:incoming>f_noConverge</bpmn:incoming>
      <bpmn:incoming>f_toEndConverged</bpmn:incoming>
      <bpmn:incoming>f_blockedEnd</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="f_toReadinessGw" sourceRef="Start" targetRef="gw-readiness" />
    <bpmn:sequenceFlow id="f_readiness_gate" name="gated" sourceRef="gw-readiness" targetRef="readiness-preflight">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=readinessProbes != null and count(readinessProbes) &gt; 0</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="f_readiness_skip" name="no gate" sourceRef="gw-readiness" targetRef="ensure-base-branch" />
    <bpmn:sequenceFlow id="f_readiness_done" sourceRef="readiness-preflight" targetRef="ensure-base-branch" />
    <bpmn:sequenceFlow id="f_toImplement" sourceRef="ensure-base-branch" targetRef="record-feature-implementing" />
    <bpmn:sequenceFlow id="f_implementing" sourceRef="record-feature-implementing" targetRef="implement" />
    <bpmn:sequenceFlow id="w_toRecord" sourceRef="implement" targetRef="record-feature" />
    <bpmn:sequenceFlow id="f_toBlockedGw" sourceRef="record-feature" targetRef="gw-blocked" />
    <bpmn:sequenceFlow id="f_blocked" name="blocked" sourceRef="gw-blocked" targetRef="feature-blocked">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=featureStatus = "blocked"</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="f_notBlocked" name="not blocked" sourceRef="gw-blocked" targetRef="gw-converge" />
    <bpmn:sequenceFlow id="f_toBlockedAck" sourceRef="feature-blocked" targetRef="record-blocked-ack" />
    <bpmn:sequenceFlow id="f_blockedEnd" sourceRef="record-blocked-ack" targetRef="End" />
    <bpmn:sequenceFlow id="f_converge" name="converge" sourceRef="gw-converge" targetRef="converge">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=converge = true and featureStatus = "opened" and prKey != null</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="f_noConverge" name="raise only" sourceRef="gw-converge" targetRef="End" />
    <bpmn:sequenceFlow id="f_toEndConverged" sourceRef="converge" targetRef="End" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_feature">
    <bpmndi:BPMNPlane id="BPMNPlane_feature" bpmnElement="feature">
      <bpmndi:BPMNShape id="BPMNShape_Start" bpmnElement="Start">
        <dc:Bounds x="80" y="102" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="63" y="143" width="70" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_gw-readiness" bpmnElement="gw-readiness" isMarkerVisible="true">
        <dc:Bounds x="216" y="95" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="206" y="48" width="71" height="42" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_readiness-preflight" bpmnElement="readiness-preflight">
        <dc:Bounds x="366" y="240" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_ensure-base-branch" bpmnElement="ensure-base-branch">
        <dc:Bounds x="566" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_implement" bpmnElement="implement">
        <dc:Bounds x="966" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_record-feature-implementing" bpmnElement="record-feature-implementing">
        <dc:Bounds x="766" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_record-feature" bpmnElement="record-feature">
        <dc:Bounds x="1166" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_gw-blocked" bpmnElement="gw-blocked" isMarkerVisible="true">
        <dc:Bounds x="1366" y="95" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1361" y="76" width="60" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_feature-blocked" bpmnElement="feature-blocked">
        <dc:Bounds x="1516" y="400" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_record-blocked-ack" bpmnElement="record-blocked-ack">
        <dc:Bounds x="1716" y="400" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_gw-converge" bpmnElement="gw-converge" isMarkerVisible="true">
        <dc:Bounds x="1541" y="95" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1533" y="76" width="67" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_converge" bpmnElement="converge">
        <dc:Bounds x="1716" y="240" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_End" bpmnElement="End">
        <dc:Bounds x="1916" y="102" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1917" y="83" width="34" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toReadinessGw" bpmnElement="f_toReadinessGw">
        <di:waypoint x="116" y="120" />
        <di:waypoint x="216" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_readiness_skip" bpmnElement="f_readiness_skip">
        <di:waypoint x="266" y="120" />
        <di:waypoint x="566" y="120" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="391" y="98" width="50" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toImplement" bpmnElement="f_toImplement">
        <di:waypoint x="666" y="120" />
        <di:waypoint x="766" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_implementing" bpmnElement="f_implementing">
        <di:waypoint x="866" y="120" />
        <di:waypoint x="966" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_w_toRecord" bpmnElement="w_toRecord">
        <di:waypoint x="1066" y="120" />
        <di:waypoint x="1166" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toBlockedGw" bpmnElement="f_toBlockedGw">
        <di:waypoint x="1266" y="120" />
        <di:waypoint x="1366" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_notBlocked" bpmnElement="f_notBlocked">
        <di:waypoint x="1416" y="120" />
        <di:waypoint x="1541" y="120" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1440" y="98" width="78" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_noConverge" bpmnElement="f_noConverge">
        <di:waypoint x="1591" y="120" />
        <di:waypoint x="1916" y="120" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1718" y="98" width="71" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_readiness_gate" bpmnElement="f_readiness_gate">
        <di:waypoint x="241" y="145" />
        <di:waypoint x="241" y="280" />
        <di:waypoint x="366" y="280" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="246" y="206" width="39" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_blocked" bpmnElement="f_blocked">
        <di:waypoint x="1391" y="145" />
        <di:waypoint x="1391" y="440" />
        <di:waypoint x="1516" y="440" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1396" y="286" width="53" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_converge" bpmnElement="f_converge">
        <di:waypoint x="1566" y="145" />
        <di:waypoint x="1566" y="280" />
        <di:waypoint x="1716" y="280" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1571" y="206" width="60" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_readiness_done" bpmnElement="f_readiness_done">
        <di:waypoint x="466" y="280" />
        <di:waypoint x="616" y="280" />
        <di:waypoint x="616" y="160" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toBlockedAck" bpmnElement="f_toBlockedAck">
        <di:waypoint x="1616" y="440" />
        <di:waypoint x="1716" y="440" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_blockedEnd" bpmnElement="f_blockedEnd">
        <di:waypoint x="1816" y="440" />
        <di:waypoint x="1934" y="440" />
        <di:waypoint x="1934" y="138" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toEndConverged" bpmnElement="f_toEndConverged">
        <di:waypoint x="1816" y="280" />
        <di:waypoint x="1934" y="280" />
        <di:waypoint x="1934" y="138" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
  <bpmndi:BPMNDiagram id="BPMNDiagram_readiness-preflight">
    <bpmndi:BPMNPlane id="BPMNPlane_readiness-preflight" bpmnElement="readiness-preflight">
      <bpmndi:BPMNShape id="BPMNShape_pf_start" bpmnElement="pf_start">
        <dc:Bounds x="80" y="102" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="65" y="143" width="67" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_preflight-probe-loop" bpmnElement="preflight-probe-loop">
        <dc:Bounds x="216" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_preflight-probe-last-attempt" bpmnElement="preflight-probe-last-attempt">
        <dc:Bounds x="416" y="240" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_pf_gw" bpmnElement="pf_gw" isMarkerVisible="true">
        <dc:Bounds x="616" y="95" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="610" y="62" width="63" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_readiness-escalation-pf" bpmnElement="readiness-escalation-pf">
        <dc:Bounds x="766" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_pf_gw_res" bpmnElement="pf_gw_res" isMarkerVisible="true">
        <dc:Bounds x="966" y="95" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="951" y="76" width="81" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_pf_end" bpmnElement="pf_end">
        <dc:Bounds x="1116" y="102" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1100" y="69" width="69" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_be_pf_probe_timeout" bpmnElement="be_pf_probe_timeout">
        <dc:Bounds x="248" y="142" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="165" y="183" width="83" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_be_pf_sla" bpmnElement="be_pf_sla">
        <dc:Bounds x="798" y="142" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="774" y="223" width="84" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_pf_toProbe" bpmnElement="pf_toProbe">
        <di:waypoint x="116" y="120" />
        <di:waypoint x="216" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_pf_probed" bpmnElement="pf_probed">
        <di:waypoint x="316" y="120" />
        <di:waypoint x="616" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_pf_escalate" bpmnElement="pf_escalate">
        <di:waypoint x="666" y="120" />
        <di:waypoint x="766" y="120" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="690" y="98" width="53" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_pf_toResolution" bpmnElement="pf_toResolution">
        <di:waypoint x="866" y="120" />
        <di:waypoint x="966" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_pf_proceed" bpmnElement="pf_proceed">
        <di:waypoint x="1016" y="120" />
        <di:waypoint x="1116" y="120" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1024" y="128" width="84" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_pf_ready" bpmnElement="pf_ready">
        <di:waypoint x="641" y="145" />
        <di:waypoint x="641" y="200" />
        <di:waypoint x="1134" y="200" />
        <di:waypoint x="1134" y="138" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="868" y="178" width="39" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_pf_lastAttemptDone" bpmnElement="pf_lastAttemptDone">
        <di:waypoint x="466" y="240" />
        <di:waypoint x="466" y="120" />
        <di:waypoint x="616" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_pf_abandon" bpmnElement="pf_abandon">
        <di:waypoint x="1016" y="120" />
        <di:waypoint x="1116" y="120" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1040" y="158" width="53" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_pf_probeTimedOut" bpmnElement="pf_probeTimedOut">
        <di:waypoint x="266" y="178" />
        <di:waypoint x="266" y="280" />
        <di:waypoint x="416" y="280" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="271" y="222" width="67" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_pf_sla" bpmnElement="pf_sla">
        <di:waypoint x="816" y="178" />
        <di:waypoint x="816" y="198" />
        <di:waypoint x="1134" y="198" />
        <di:waypoint x="1134" y="138" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="931" y="165" width="88" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
  <bpmndi:BPMNDiagram id="BPMNDiagram_preflight-probe-loop">
    <bpmndi:BPMNPlane id="BPMNPlane_preflight-probe-loop" bpmnElement="preflight-probe-loop">
      <bpmndi:BPMNShape id="BPMNShape_pf_loop_start" bpmnElement="pf_loop_start">
        <dc:Bounds x="80" y="102" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="58" y="143" width="80" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_preflight-probe" bpmnElement="preflight-probe">
        <dc:Bounds x="216" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_pf_loop_gw" bpmnElement="pf_loop_gw" isMarkerVisible="true">
        <dc:Bounds x="416" y="95" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="418" y="76" width="46" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_pf_wait_poll" bpmnElement="pf_wait_poll">
        <dc:Bounds x="566" y="262" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="550" y="229" width="68" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_pf_loop_end" bpmnElement="pf_loop_end">
        <dc:Bounds x="566" y="102" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="544" y="143" width="80" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_pf_loop_toProbe" bpmnElement="pf_loop_toProbe">
        <di:waypoint x="116" y="120" />
        <di:waypoint x="216" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_pf_loop_probed" bpmnElement="pf_loop_probed">
        <di:waypoint x="316" y="120" />
        <di:waypoint x="416" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_pf_loop_ready" bpmnElement="pf_loop_ready">
        <di:waypoint x="466" y="120" />
        <di:waypoint x="566" y="120" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="497" y="98" width="39" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_pf_notReady" bpmnElement="pf_notReady">
        <di:waypoint x="441" y="145" />
        <di:waypoint x="441" y="280" />
        <di:waypoint x="566" y="280" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="446" y="206" width="64" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_pf_pollBack" bpmnElement="pf_pollBack">
        <di:waypoint x="584" y="298" />
        <di:waypoint x="584" y="318" />
        <di:waypoint x="266" y="318" />
        <di:waypoint x="266" y="160" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
