<?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_plan" targetNamespace="http://nanobpm.io/nano-workforce">
  <bpmn:message id="Message_waveMerged" name="wave-merged">
    <bpmn:extensionElements>
      <zeebe:subscription correlationKey="=planKey" />
    </bpmn:extensionElements>
  </bpmn:message>
  <bpmn:message id="Message_capsResolved" name="caps-resolved">
    <bpmn:extensionElements>
      <zeebe:subscription correlationKey="=capsGateKey" />
      <zeebe:properties>
        <zeebe:property name="io.nanobpm.dataEnvelope.in" value="CapsResolved" />
      </zeebe:properties>
    </bpmn:extensionElements>
  </bpmn:message>
  <bpmn:process id="plan-fanout" name="Agent Fleet — plan &#38; implement" isExecutable="true">
    <bpmn:extensionElements>
      <nano:shapes>
        <nano:shape id="EnsureBaseBranchIn" name="Ensure base branch — input">
          <nano:extend name="repo" type="string" />
          <nano:extend name="baseBranch" type="string" />
        </nano:shape>
        <nano:shape id="CapabilityNeed" name="Cross-repo capability dependency (issue #289)">
          <nano:extend name="capabilityRef" type="string" />
          <nano:extend name="package" type="string" />
          <nano:extend name="verifyCommand" type="string" optional="true" />
        </nano:shape>
        <nano:shape id="RecordPlanTask" name="Record plan — raw planner task">
          <nano:extend name="id" type="string" optional="true" />
          <nano:extend name="title" type="string" optional="true" />
          <nano:extend name="prompt" type="string" optional="true" />
          <nano:extend name="dependsOn" type="string" list="true" optional="true" />
          <nano:reference name="needs" ref="CapabilityNeed" list="true" optional="true" />
        </nano:shape>
        <nano:shape id="RecordPlanIn" name="Record plan — input">
          <nano:extend name="planKey" type="string" />
          <nano:reference name="tasks" ref="RecordPlanTask" list="true" />
          <nano:extend name="note" type="string" optional="true" />
        </nano:shape>
        <nano:shape id="RecordWaveTaskRef" name="Record wave — task ref">
          <nano:extend name="id" type="string" optional="true" />
        </nano:shape>
        <nano:shape id="RecordWaveDelta" name="Record wave — task delta">
          <nano:extend name="contractChange" type="string" optional="true" />
          <nano:extend name="newlyTouches" type="string" list="true" optional="true" />
          <nano:extend name="affectsTasks" type="string" list="true" optional="true" />
          <nano:extend name="constraint" type="string" optional="true" />
        </nano:shape>
        <nano:shape id="RecordWaveResult" name="Record wave — agent result">
          <nano:extend name="status" type="string" optional="true" />
          <nano:extend name="summary" type="string" optional="true" />
          <nano:extend name="pr" type="string" optional="true" />
          <nano:extend name="delta" type="RecordWaveDelta" optional="true" />
        </nano:shape>
        <nano:shape id="RecordWaveIn" name="Record wave — input">
          <nano:extend name="planKey" type="string" />
          <nano:extend name="currentWave" type="integer" />
          <nano:extend name="waveCount" type="integer" />
          <nano:reference name="waveTasks" ref="RecordWaveTaskRef" list="true" />
          <nano:reference name="waveResults" ref="RecordWaveResult" list="true" />
        </nano:shape>
        <nano:shape id="RecordTrialMergeHead" name="Record trial merge — open head">
          <nano:extend name="repo" type="string" />
          <nano:extend name="prNumber" type="integer" />
          <nano:extend name="headRef" type="string" optional="true" />
          <nano:extend name="headSha" type="string" optional="true" />
        </nano:shape>
        <nano:shape id="RecordTrialMergeIn" name="Record trial merge — input">
          <nano:extend name="planKey" type="string" />
          <nano:extend name="currentWave" type="integer" optional="true" />
          <nano:extend name="trialMergeWave" type="integer" optional="true" />
          <nano:reference name="waveOpenHeads" ref="RecordTrialMergeHead" list="true" />
          <nano:extend name="result" type="string" optional="true" />
          <nano:extend name="conflicts" type="string" list="true" optional="true" />
          <nano:extend name="failing" type="string" list="true" optional="true" />
          <nano:extend name="summary" type="string" optional="true" />
        </nano:shape>
        <nano:shape id="RecordPlanReviewIn" name="Record plan review — input">
          <nano:extend name="planKey" type="string" />
          <nano:extend name="approved" type="boolean" optional="true" />
          <nano:extend name="findings" type="string" optional="true" />
          <nano:extend name="planReviewEpoch" type="integer" optional="true" />
        </nano:shape>
        <nano:shape id="SelectWaveIn" name="Select wave — input">
          <nano:extend name="planKey" type="string" />
          <nano:extend name="currentWave" type="integer" />
          <nano:extend name="resolvedArtifacts" type="string" list="true" optional="true" />
        </nano:shape>
        <nano:shape id="ResolveTrialAttentionIn" name="Clear trial attention — input">
          <nano:extend name="planKey" type="string" />
          <nano:extend name="currentWave" type="integer" optional="true" />
          <nano:extend name="trialMergeWave" type="integer" optional="true" />
        </nano:shape>
        <nano:shape id="RecordResultsIn" name="Finalize plan — input">
          <nano:extend name="planKey" type="string" />
        </nano:shape>
        <nano:shape id="CapsResolved" name="caps-resolved message payload (issue #289)">
          <nano:extend name="resolvedDepsBrief" type="string" optional="true" />
        </nano:shape>
        <nano:shape id="CapsPrepareIn" name="Prepare capability barrier — input (issue #289)">
          <nano:extend name="planKey" type="string" />
          <nano:extend name="taskId" type="string" />
          <nano:reference name="needs" ref="CapabilityNeed" list="true" optional="true" />
        </nano:shape>
        <nano:shape id="CapsPrepareOut" name="Prepare capability barrier — output (issue #289)">
          <nano:extend name="capsGateKey" type="string" />
          <nano:extend name="hasNeeds" type="boolean" />
        </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="dependent (has capability gate)?" 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 producer capabilities (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 capability">
        <bpmn:outgoing>pf_toProbe</bpmn:outgoing>
      </bpmn:startEvent>
      <bpmn:subProcess id="preflight-probe-loop" name="Probe capability 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 capability">
          <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 capability (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="capability 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="Producer capability 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="Capability 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_toPlan</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="plan" name="Plan (agent)">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="senior:plan" />
        <zeebe:agentDefinition agentType="external" />
        <zeebe:linkedResources>
          <zeebe:linkedResource resourceId="prompts/plan.md" bindingType="latest" resourceType="GenericScript" linkName="prompt" />
        </zeebe:linkedResources>
        <zeebe:ioMapping>
          <zeebe:input source="=(if (planFindings = null or planFindings = &#34;&#34;) then &#34;&#34; else &#34;&#10;&#10;---&#10;&#10;A prior review REJECTED your last plan. Address every point, then re-emit the full plan:&#10;&#10;&#34; + planFindings)" target="appendPrompt" />
        </zeebe:ioMapping>
      </bpmn:extensionElements>
      <bpmn:incoming>f_toPlan</bpmn:incoming>
      <bpmn:incoming>f_plan_revise</bpmn:incoming>
      <bpmn:incoming>f_plan_answer_revise</bpmn:incoming>
      <bpmn:incoming>f_plan_sla</bpmn:incoming>
      <bpmn:outgoing>f_toRecordPlan</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="record-plan" name="Record plan &#38; levelize">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="pr.record-plan" />
        <zeebe:properties>
          <zeebe:property name="io.nanobpm.dataEnvelope.in" value="RecordPlanIn" />
        </zeebe:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>f_toRecordPlan</bpmn:incoming>
      <bpmn:outgoing>f_toPlanEmptyGw</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="gw-plan-empty" name="plan has tasks?" default="f_toReviewPlan">
      <bpmn:incoming>f_toPlanEmptyGw</bpmn:incoming>
      <bpmn:outgoing>f_plan_empty</bpmn:outgoing>
      <bpmn:outgoing>f_toReviewPlan</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:userTask id="empty-plan-escalation" name="Empty plan — operator attention (human)">
      <bpmn:extensionElements>
        <zeebe:formDefinition formId="empty-plan-escalation" />
        <zeebe:userTask />
        <zeebe:assignmentDefinition candidateGroups="operators" assignee="=escalationAssignee" />
        <zeebe:ioMapping>
          <zeebe:output source="=(if planFindings = null then &#34;&#34; else planFindings) + (if (notes = null or notes = &#34;&#34;) then &#34;&#34; else &#34;&#10;&#10;Human guidance:&#10;&#34; + notes)" target="planFindings" />
        </zeebe:ioMapping>
      </bpmn:extensionElements>
      <bpmn:incoming>f_plan_empty</bpmn:incoming>
      <bpmn:outgoing>f_toGwEmptyAnswer</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:exclusiveGateway id="gw-empty-plan-answer" name="accept no-op?" default="f_empty_revise">
      <bpmn:incoming>f_toGwEmptyAnswer</bpmn:incoming>
      <bpmn:outgoing>f_empty_accept</bpmn:outgoing>
      <bpmn:outgoing>f_empty_revise</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:endEvent id="EndTasklessDone" name="Taskless done (no-op epic)">
      <bpmn:incoming>f_empty_accept</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:serviceTask id="review-plan" name="Review plan (agent)">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="senior:plan-review" />
        <zeebe:agentDefinition agentType="external" />
        <zeebe:linkedResources>
          <zeebe:linkedResource resourceId="prompts/plan-review.md" bindingType="latest" resourceType="GenericScript" linkName="prompt" />
        </zeebe:linkedResources>
      </bpmn:extensionElements>
      <bpmn:incoming>f_toReviewPlan</bpmn:incoming>
      <bpmn:outgoing>f_toRecordPlanReview</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="record-plan-review" name="Record review &#38; decide">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="pr.record-plan-review" />
        <zeebe:properties>
          <zeebe:property name="io.nanobpm.dataEnvelope.in" value="RecordPlanReviewIn" />
        </zeebe:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>f_toRecordPlanReview</bpmn:incoming>
      <bpmn:outgoing>f_toGwPlanReview</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="gw-plan-review" name="plan approved?" default="f_plan_revise">
      <bpmn:incoming>f_toGwPlanReview</bpmn:incoming>
      <bpmn:outgoing>f_plan_proceed</bpmn:outgoing>
      <bpmn:outgoing>f_plan_escalate</bpmn:outgoing>
      <bpmn:outgoing>f_plan_revise</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:userTask id="plan-review-decision" name="Plan-review decision (human)">
      <bpmn:extensionElements>
        <zeebe:formDefinition formId="plan-review-decision" />
        <zeebe:userTask />
        <zeebe:assignmentDefinition candidateGroups="operators" assignee="=escalationAssignee" />
        <zeebe:ioMapping>
          <zeebe:output source="=(if planReviewEpoch = null then 0 else planReviewEpoch) + 1" target="planReviewEpoch" />
          <zeebe:output source="=(if planFindings = null then &#34;&#34; else planFindings) + (if (notes = null or notes = &#34;&#34;) then &#34;&#34; else &#34;&#10;&#10;Human guidance:&#10;&#34; + notes)" target="planFindings" />
        </zeebe:ioMapping>
      </bpmn:extensionElements>
      <bpmn:incoming>f_plan_escalate</bpmn:incoming>
      <bpmn:outgoing>f_toGwPlanAnswer</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:boundaryEvent id="be_plan_sla" name="SLA elapsed" attachedToRef="plan-review-decision">
      <bpmn:outgoing>f_plan_sla</bpmn:outgoing>
      <bpmn:timerEventDefinition id="ted_plan_sla">
        <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">=escalationSlaTimeout</bpmn:timeDuration>
      </bpmn:timerEventDefinition>
    </bpmn:boundaryEvent>
    <bpmn:exclusiveGateway id="gw-plan-answer" name="proceed override?" default="f_plan_answer_revise">
      <bpmn:incoming>f_toGwPlanAnswer</bpmn:incoming>
      <bpmn:outgoing>f_plan_answer_proceed</bpmn:outgoing>
      <bpmn:outgoing>f_plan_answer_revise</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:serviceTask id="select-wave" name="Select wave">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="pr.select-wave" />
        <zeebe:properties>
          <zeebe:property name="io.nanobpm.dataEnvelope.in" value="SelectWaveIn" />
        </zeebe:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>f_plan_proceed</bpmn:incoming>
      <bpmn:incoming>f_plan_answer_proceed</bpmn:incoming>
      <bpmn:incoming>f_waveMerged</bpmn:incoming>
      <bpmn:outgoing>f_toImplement</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:subProcess id="implement" name="Implement task (agent)">
      <bpmn:extensionElements>
        <zeebe:ioMapping>
          <zeebe:input source="=null" target="answer" />
          <zeebe:input source="=null" target="summary" />
          <zeebe:input source="=null" target="pr" />
          <zeebe:input source="=null" target="delta" />
          <zeebe:input source="=null" target="resolvedDepsBrief" />
        </zeebe:ioMapping>
      </bpmn:extensionElements>
      <bpmn:incoming>f_toImplement</bpmn:incoming>
      <bpmn:outgoing>f_toRecordWave</bpmn:outgoing>
      <bpmn:multiInstanceLoopCharacteristics>
        <bpmn:extensionElements>
          <zeebe:loopCharacteristics inputCollection="=waveTasks" inputElement="task" outputCollection="waveResults" outputElement="={status: status, summary: summary, pr: pr, delta: delta}" />
        </bpmn:extensionElements>
      </bpmn:multiInstanceLoopCharacteristics>
      <bpmn:startEvent id="w_start" name="Task">
        <bpmn:outgoing>w_toCapsPrepare</bpmn:outgoing>
      </bpmn:startEvent>
      <bpmn:serviceTask id="caps-prepare" name="Prepare capability barrier">
        <bpmn:extensionElements>
          <zeebe:taskDefinition type="pr.caps-prepare" />
          <zeebe:properties>
            <zeebe:property name="io.nanobpm.dataEnvelope.in" value="CapsPrepareIn" />
            <zeebe:property name="io.nanobpm.dataEnvelope.out" value="CapsPrepareOut" />
          </zeebe:properties>
          <zeebe:ioMapping>
            <zeebe:input source="=planKey" target="planKey" />
            <zeebe:input source="=task.id" target="taskId" />
            <zeebe:input source="=task.needs" target="needs" />
            <zeebe:output source="=capsGateKey" target="capsGateKey" />
            <zeebe:output source="=hasNeeds" target="hasNeeds" />
          </zeebe:ioMapping>
        </bpmn:extensionElements>
        <bpmn:incoming>w_toCapsPrepare</bpmn:incoming>
        <bpmn:outgoing>w_toNeedsGw</bpmn:outgoing>
      </bpmn:serviceTask>
      <bpmn:exclusiveGateway id="w_gw_needs" name="capability needs?" default="w_noNeeds">
        <bpmn:incoming>w_toNeedsGw</bpmn:incoming>
        <bpmn:outgoing>w_toWaitCaps</bpmn:outgoing>
        <bpmn:outgoing>w_noNeeds</bpmn:outgoing>
      </bpmn:exclusiveGateway>
      <bpmn:eventBasedGateway id="w_gw_caps" name="resolved or timeout?">
        <bpmn:incoming>w_toWaitCaps</bpmn:incoming>
        <bpmn:outgoing>w_capsToWait</bpmn:outgoing>
        <bpmn:outgoing>w_capsToTimeout</bpmn:outgoing>
      </bpmn:eventBasedGateway>
      <bpmn:intermediateCatchEvent id="wait-caps-resolved" name="Wait: capabilities resolved">
        <bpmn:incoming>w_capsToWait</bpmn:incoming>
        <bpmn:outgoing>w_capsResolved</bpmn:outgoing>
        <bpmn:messageEventDefinition id="med_capsResolved" messageRef="Message_capsResolved" />
      </bpmn:intermediateCatchEvent>
      <bpmn:intermediateCatchEvent id="wait-caps-timeout" name="Wait: capability SLA elapsed">
        <bpmn:extensionElements>
          <zeebe:ioMapping>
            <zeebe:output source="=&#34;A cross-repo capability this task depends on did not resolve within the bounded wait. This usually means a declared capabilityRef names no owner/repo releases source (unresolvable) or the upstream capability never shipped. Correct the plan&#39;s capabilityRef or ship the capability, then answer to retry the task, or abandon it.&#34;" target="question" />
          </zeebe:ioMapping>
        </bpmn:extensionElements>
        <bpmn:incoming>w_capsToTimeout</bpmn:incoming>
        <bpmn:outgoing>w_capsTimeout</bpmn:outgoing>
        <bpmn:timerEventDefinition id="ted_caps_timeout">
          <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">=capsWaitTimeout</bpmn:timeDuration>
        </bpmn:timerEventDefinition>
      </bpmn:intermediateCatchEvent>
      <bpmn:callActivity id="implement-cell-call" name="Implement cell">
        <bpmn:extensionElements>
          <zeebe:calledElement processId="implement-cell" />
          <zeebe:ioMapping>
            <zeebe:input source="=task" target="task" />
            <zeebe:input source="=planKey" target="subjectKey" />
            <zeebe:input source="=baseBranch" target="baseBranch" />
            <zeebe:input source="=escalationSlaTimeout" target="escalationSlaTimeout" />
            <zeebe:input source="=if (is defined(escalationAssignee)) then escalationAssignee else null" target="escalationAssignee" />
            <zeebe:input source="=if (is defined(baseBranchBrief)) then baseBranchBrief else null" target="baseBranchBrief" />
            <zeebe:input source="=if (is defined(blackboardBrief)) then blackboardBrief else null" target="blackboardBrief" />
            <zeebe:input source="=if (is defined(resolvedDepsBrief)) then resolvedDepsBrief else null" target="resolvedDepsBrief" />
            <zeebe:input source="=if (is defined(resolvedArtifacts)) then resolvedArtifacts else null" target="resolvedArtifacts" />
            <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(delta)) then delta else null" target="delta" />
            <zeebe:output source="=if (is defined(question)) then question else null" target="question" />
          </zeebe:ioMapping>
        </bpmn:extensionElements>
        <bpmn:incoming>w_noNeeds</bpmn:incoming>
        <bpmn:incoming>w_capsResolved</bpmn:incoming>
        <bpmn:incoming>w_answerLoop</bpmn:incoming>
        <bpmn:outgoing>w_toEnd</bpmn:outgoing>
      </bpmn:callActivity>
      <bpmn:userTask id="feature-escalation" name="Task escalation (human)">
        <bpmn:extensionElements>
          <zeebe:formDefinition formId="feature-escalation" />
          <zeebe:userTask />
          <zeebe:assignmentDefinition candidateGroups="operators" assignee="=escalationAssignee" />
        </bpmn:extensionElements>
        <bpmn:incoming>w_capsTimeout</bpmn:incoming>
        <bpmn:outgoing>w_toAnswerGw</bpmn:outgoing>
      </bpmn:userTask>
      <bpmn:boundaryEvent id="be_feature_sla" name="SLA elapsed" attachedToRef="feature-escalation">
        <bpmn:outgoing>w_sla</bpmn:outgoing>
        <bpmn:timerEventDefinition id="ted_feature_sla">
          <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">=escalationSlaTimeout</bpmn:timeDuration>
        </bpmn:timerEventDefinition>
      </bpmn:boundaryEvent>
      <bpmn:exclusiveGateway id="w_gw_answer" name="answer?" default="w_abandon">
        <bpmn:incoming>w_toAnswerGw</bpmn:incoming>
        <bpmn:outgoing>w_answerLoop</bpmn:outgoing>
        <bpmn:outgoing>w_abandon</bpmn:outgoing>
      </bpmn:exclusiveGateway>
      <bpmn:endEvent id="w_end" name="Task done">
        <bpmn:incoming>w_toEnd</bpmn:incoming>
        <bpmn:incoming>w_abandon</bpmn:incoming>
        <bpmn:incoming>w_sla</bpmn:incoming>
      </bpmn:endEvent>
      <bpmn:sequenceFlow id="w_toCapsPrepare" sourceRef="w_start" targetRef="caps-prepare" />
      <bpmn:sequenceFlow id="w_toNeedsGw" sourceRef="caps-prepare" targetRef="w_gw_needs" />
      <bpmn:sequenceFlow id="w_toWaitCaps" name="needs" sourceRef="w_gw_needs" targetRef="w_gw_caps">
        <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=hasNeeds</bpmn:conditionExpression>
      </bpmn:sequenceFlow>
      <bpmn:sequenceFlow id="w_capsToWait" sourceRef="w_gw_caps" targetRef="wait-caps-resolved" />
      <bpmn:sequenceFlow id="w_capsToTimeout" sourceRef="w_gw_caps" targetRef="wait-caps-timeout" />
      <bpmn:sequenceFlow id="w_capsTimeout" name="caps SLA" sourceRef="wait-caps-timeout" targetRef="feature-escalation" />
      <bpmn:sequenceFlow id="w_noNeeds" name="none" sourceRef="w_gw_needs" targetRef="implement-cell-call" />
      <bpmn:sequenceFlow id="w_capsResolved" sourceRef="wait-caps-resolved" targetRef="implement-cell-call" />
      <bpmn:sequenceFlow id="w_toEnd" sourceRef="implement-cell-call" targetRef="w_end" />
      <bpmn:sequenceFlow id="w_toAnswerGw" sourceRef="feature-escalation" targetRef="w_gw_answer" />
      <bpmn:sequenceFlow id="w_answerLoop" name="answer" sourceRef="w_gw_answer" targetRef="implement-cell-call">
        <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=resolution = "answer"</bpmn:conditionExpression>
      </bpmn:sequenceFlow>
      <bpmn:sequenceFlow id="w_abandon" name="abandon" sourceRef="w_gw_answer" targetRef="w_end" />
      <bpmn:sequenceFlow id="w_sla" name="SLA auto-abandon" sourceRef="be_feature_sla" targetRef="w_end" />
    </bpmn:subProcess>
    <bpmn:serviceTask id="record-wave" name="Record wave &#38; hand off">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="pr.record-wave" />
        <zeebe:properties>
          <zeebe:property name="io.nanobpm.dataEnvelope.in" value="RecordWaveIn" />
        </zeebe:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>f_toRecordWave</bpmn:incoming>
      <bpmn:outgoing>f_toTrialNeeded</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="gw-trial-needed" name="trial merge?" default="f_skipTrialMerge">
      <bpmn:incoming>f_toTrialNeeded</bpmn:incoming>
      <bpmn:outgoing>f_runTrialMerge</bpmn:outgoing>
      <bpmn:outgoing>f_skipTrialMerge</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:serviceTask id="trial-merge" name="Trial merge (agent)">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="senior:trial-merge" />
        <zeebe:agentDefinition agentType="external" />
        <zeebe:linkedResources>
          <zeebe:linkedResource resourceId="prompts/trial-merge.md" bindingType="latest" resourceType="GenericScript" linkName="prompt" />
        </zeebe:linkedResources>
        <zeebe:ioMapping>
          <zeebe:input source="=null" target="result" />
          <zeebe:input source="=null" target="conflicts" />
          <zeebe:input source="=null" target="failing" />
          <zeebe:input source="=null" target="summary" />
          <zeebe:input source="=null" target="answer" />
        </zeebe:ioMapping>
      </bpmn:extensionElements>
      <bpmn:incoming>f_runTrialMerge</bpmn:incoming>
      <bpmn:incoming>f_trialAnswerRerun</bpmn:incoming>
      <bpmn:incoming>f_trial_sla</bpmn:incoming>
      <bpmn:outgoing>f_toRecordTrialMerge</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="record-trial-merge" name="Record trial merge">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="pr.record-trial-merge" />
        <zeebe:properties>
          <zeebe:property name="io.nanobpm.dataEnvelope.in" value="RecordTrialMergeIn" />
        </zeebe:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>f_toRecordTrialMerge</bpmn:incoming>
      <bpmn:outgoing>f_toGwTrial</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="gw-trial" name="trial red?" default="f_trialProceed">
      <bpmn:incoming>f_toGwTrial</bpmn:incoming>
      <bpmn:outgoing>f_trialEscalate</bpmn:outgoing>
      <bpmn:outgoing>f_trialProceed</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:userTask id="trial-merge-decision" name="Trial-merge decision (human)">
      <bpmn:extensionElements>
        <zeebe:formDefinition formId="trial-merge-decision" />
        <zeebe:userTask />
        <zeebe:assignmentDefinition candidateGroups="operators" assignee="=escalationAssignee" />
      </bpmn:extensionElements>
      <bpmn:incoming>f_trialEscalate</bpmn:incoming>
      <bpmn:outgoing>f_toGwTrialAnswer</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:boundaryEvent id="be_trial_sla" name="SLA elapsed" attachedToRef="trial-merge-decision">
      <bpmn:outgoing>f_trial_sla</bpmn:outgoing>
      <bpmn:timerEventDefinition id="ted_trial_sla">
        <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">=escalationSlaTimeout</bpmn:timeDuration>
      </bpmn:timerEventDefinition>
    </bpmn:boundaryEvent>
    <bpmn:serviceTask id="resolve-trial-attention" name="Clear trial attention">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="pr.resolve-trial-attention" />
        <zeebe:properties>
          <zeebe:property name="io.nanobpm.dataEnvelope.in" value="ResolveTrialAttentionIn" />
        </zeebe:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>f_toGwTrialAnswer</bpmn:incoming>
      <bpmn:outgoing>f_resolveToTrialAnswer</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="gw-trial-answer" name="action?" default="f_trialAnswerRerun">
      <bpmn:incoming>f_resolveToTrialAnswer</bpmn:incoming>
      <bpmn:outgoing>f_trialAnswerProceed</bpmn:outgoing>
      <bpmn:outgoing>f_trialAnswerAbandon</bpmn:outgoing>
      <bpmn:outgoing>f_trialAnswerRerun</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:exclusiveGateway id="gw-more" name="more waves?" default="f_done">
      <bpmn:incoming>f_skipTrialMerge</bpmn:incoming>
      <bpmn:incoming>f_trialProceed</bpmn:incoming>
      <bpmn:incoming>f_trialAnswerProceed</bpmn:incoming>
      <bpmn:outgoing>f_moreWaves</bpmn:outgoing>
      <bpmn:outgoing>f_done</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:intermediateCatchEvent id="wait-wave-merged" name="Wait: wave merged">
      <bpmn:incoming>f_moreWaves</bpmn:incoming>
      <bpmn:outgoing>f_waveMerged</bpmn:outgoing>
      <bpmn:messageEventDefinition id="med_waveMerged" messageRef="Message_waveMerged" />
    </bpmn:intermediateCatchEvent>
    <bpmn:serviceTask id="record-results" name="Finalize plan">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="pr.record-results" />
        <zeebe:properties>
          <zeebe:property name="io.nanobpm.dataEnvelope.in" value="RecordResultsIn" />
        </zeebe:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>f_done</bpmn:incoming>
      <bpmn:incoming>f_trialAnswerAbandon</bpmn:incoming>
      <bpmn:outgoing>f_toEnd</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:endEvent id="End" name="Fleet dispatched">
      <bpmn:incoming>f_toEnd</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="f_toReadinessGw" sourceRef="Start" targetRef="gw-readiness" />
    <bpmn:sequenceFlow id="f_readiness_gate" name="dependent" 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="root" sourceRef="gw-readiness" targetRef="ensure-base-branch" />
    <bpmn:sequenceFlow id="f_readiness_done" sourceRef="readiness-preflight" targetRef="ensure-base-branch" />
    <bpmn:sequenceFlow id="f_toPlan" sourceRef="ensure-base-branch" targetRef="plan" />
    <bpmn:sequenceFlow id="f_toRecordPlan" sourceRef="plan" targetRef="record-plan" />
    <bpmn:sequenceFlow id="f_toPlanEmptyGw" sourceRef="record-plan" targetRef="gw-plan-empty" />
    <bpmn:sequenceFlow id="f_plan_empty" name="no tasks" sourceRef="gw-plan-empty" targetRef="empty-plan-escalation">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=taskCount = 0</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="f_toGwEmptyAnswer" sourceRef="empty-plan-escalation" targetRef="gw-empty-plan-answer" />
    <bpmn:sequenceFlow id="f_empty_accept" name="accept (no-op)" sourceRef="gw-empty-plan-answer" targetRef="EndTasklessDone">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=directive = "accept"</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="f_empty_revise" name="revise" sourceRef="gw-empty-plan-answer" targetRef="plan" />
    <bpmn:sequenceFlow id="f_toReviewPlan" name="has tasks" sourceRef="gw-plan-empty" targetRef="review-plan" />
    <bpmn:sequenceFlow id="f_toRecordPlanReview" sourceRef="review-plan" targetRef="record-plan-review" />
    <bpmn:sequenceFlow id="f_toGwPlanReview" sourceRef="record-plan-review" targetRef="gw-plan-review" />
    <bpmn:sequenceFlow id="f_plan_proceed" name="approved" sourceRef="gw-plan-review" targetRef="select-wave">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=planApproved</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="f_plan_escalate" name="escalated" sourceRef="gw-plan-review" targetRef="plan-review-decision">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=planEscalated</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="f_plan_revise" name="revise" sourceRef="gw-plan-review" targetRef="plan" />
    <bpmn:sequenceFlow id="f_plan_sla" name="SLA auto-revise" sourceRef="be_plan_sla" targetRef="plan" />
    <bpmn:sequenceFlow id="f_toGwPlanAnswer" sourceRef="plan-review-decision" targetRef="gw-plan-answer" />
    <bpmn:sequenceFlow id="f_plan_answer_proceed" name="proceed" sourceRef="gw-plan-answer" targetRef="select-wave">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=directive = "proceed"</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="f_plan_answer_revise" name="revise" sourceRef="gw-plan-answer" targetRef="plan" />
    <bpmn:sequenceFlow id="f_toImplement" sourceRef="select-wave" targetRef="implement" />
    <bpmn:sequenceFlow id="f_toRecordWave" sourceRef="implement" targetRef="record-wave" />
    <bpmn:sequenceFlow id="f_toTrialNeeded" sourceRef="record-wave" targetRef="gw-trial-needed" />
    <bpmn:sequenceFlow id="f_runTrialMerge" name="run" sourceRef="gw-trial-needed" targetRef="trial-merge">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=runTrialMerge</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="f_skipTrialMerge" name="skip" sourceRef="gw-trial-needed" targetRef="gw-more" />
    <bpmn:sequenceFlow id="f_toRecordTrialMerge" sourceRef="trial-merge" targetRef="record-trial-merge" />
    <bpmn:sequenceFlow id="f_toGwTrial" sourceRef="record-trial-merge" targetRef="gw-trial" />
    <bpmn:sequenceFlow id="f_trialEscalate" name="suite failed" sourceRef="gw-trial" targetRef="trial-merge-decision">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=trialMergeRed</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="f_trialProceed" name="proceed" sourceRef="gw-trial" targetRef="gw-more" />
    <bpmn:sequenceFlow id="f_toGwTrialAnswer" sourceRef="trial-merge-decision" targetRef="resolve-trial-attention" />
    <bpmn:sequenceFlow id="f_resolveToTrialAnswer" sourceRef="resolve-trial-attention" targetRef="gw-trial-answer" />
    <bpmn:sequenceFlow id="f_trialAnswerProceed" name="proceed" sourceRef="gw-trial-answer" targetRef="gw-more">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=action = "proceed"</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="f_trialAnswerAbandon" name="abandon" sourceRef="gw-trial-answer" targetRef="record-results">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=action = "abandon"</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="f_trialAnswerRerun" name="rebase" sourceRef="gw-trial-answer" targetRef="trial-merge" />
    <bpmn:sequenceFlow id="f_trial_sla" name="SLA auto-rerun" sourceRef="be_trial_sla" targetRef="trial-merge" />
    <bpmn:sequenceFlow id="f_moreWaves" name="more" sourceRef="gw-more" targetRef="wait-wave-merged">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=hasMoreWaves</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="f_waveMerged" sourceRef="wait-wave-merged" targetRef="select-wave" />
    <bpmn:sequenceFlow id="f_done" name="done" sourceRef="gw-more" targetRef="record-results" />
    <bpmn:sequenceFlow id="f_toEnd" sourceRef="record-results" targetRef="End" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_plan-fanout">
    <bpmndi:BPMNPlane id="BPMNPlane_plan-fanout" bpmnElement="plan-fanout">
      <bpmndi:BPMNShape id="BPMNShape_Start" bpmnElement="Start">
        <dc:Bounds x="80" y="311" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="63" y="352" width="70" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_gw-readiness" bpmnElement="gw-readiness" isMarkerVisible="true">
        <dc:Bounds x="216" y="304" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="204" y="243" width="74" height="56" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_readiness-preflight" bpmnElement="readiness-preflight">
        <dc:Bounds x="366" y="449" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_ensure-base-branch" bpmnElement="ensure-base-branch">
        <dc:Bounds x="566" y="289" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_plan" bpmnElement="plan">
        <dc:Bounds x="766" y="289" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_record-plan" bpmnElement="record-plan">
        <dc:Bounds x="966" y="289" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_gw-plan-empty" bpmnElement="gw-plan-empty" isMarkerVisible="true">
        <dc:Bounds x="1166" y="304" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1163" y="379" width="57" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_empty-plan-escalation" bpmnElement="empty-plan-escalation">
        <dc:Bounds x="1316" y="609" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_gw-empty-plan-answer" bpmnElement="gw-empty-plan-answer" isMarkerVisible="true">
        <dc:Bounds x="1541" y="624" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1543" y="719" width="46" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_EndTasklessDone" bpmnElement="EndTasklessDone">
        <dc:Bounds x="1723" y="631" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1702" y="672" width="78" height="42" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_review-plan" bpmnElement="review-plan">
        <dc:Bounds x="1316" y="289" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_record-plan-review" bpmnElement="record-plan-review">
        <dc:Bounds x="1516" y="289" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_gw-plan-review" bpmnElement="gw-plan-review" isMarkerVisible="true">
        <dc:Bounds x="1716" y="304" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1668" y="379" width="67" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_plan-review-decision" bpmnElement="plan-review-decision">
        <dc:Bounds x="1866" y="449" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_gw-plan-answer" bpmnElement="gw-plan-answer" isMarkerVisible="true">
        <dc:Bounds x="2066" y="464" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="2058" y="431" width="67" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_select-wave" bpmnElement="select-wave">
        <dc:Bounds x="2216" y="289" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_implement" bpmnElement="implement" isExpanded="true">
        <dc:Bounds x="2416" y="80" width="1438" height="498" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_record-wave" bpmnElement="record-wave">
        <dc:Bounds x="3954" y="289" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_gw-trial-needed" bpmnElement="gw-trial-needed" isMarkerVisible="true">
        <dc:Bounds x="4154" y="304" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="4135" y="285" width="88" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_trial-merge" bpmnElement="trial-merge">
        <dc:Bounds x="4304" y="929" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_record-trial-merge" bpmnElement="record-trial-merge">
        <dc:Bounds x="4504" y="929" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_gw-trial" bpmnElement="gw-trial" isMarkerVisible="true">
        <dc:Bounds x="4704" y="944" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="4694" y="999" width="71" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_trial-merge-decision" bpmnElement="trial-merge-decision">
        <dc:Bounds x="4854" y="449" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_resolve-trial-attention" bpmnElement="resolve-trial-attention">
        <dc:Bounds x="5054" y="449" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_gw-trial-answer" bpmnElement="gw-trial-answer" isMarkerVisible="true">
        <dc:Bounds x="5254" y="464" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="5253" y="519" width="53" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_gw-more" bpmnElement="gw-more" isMarkerVisible="true">
        <dc:Bounds x="5404" y="304" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="5327" y="359" width="84" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_wait-wave-merged" bpmnElement="wait-wave-merged">
        <dc:Bounds x="5586" y="471" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="5565" y="438" width="78" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_record-results" bpmnElement="record-results">
        <dc:Bounds x="5554" y="289" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_End" bpmnElement="End">
        <dc:Bounds x="5754" y="311" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="5735" y="352" width="74" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_be_plan_sla" bpmnElement="be_plan_sla">
        <dc:Bounds x="1898" y="511" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1874" y="612" width="84" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_be_trial_sla" bpmnElement="be_trial_sla">
        <dc:Bounds x="4886" y="511" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="4802" y="552" width="84" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toReadinessGw" bpmnElement="f_toReadinessGw">
        <di:waypoint x="116" y="329" />
        <di:waypoint x="216" y="329" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_readiness_skip" bpmnElement="f_readiness_skip">
        <di:waypoint x="266" y="329" />
        <di:waypoint x="566" y="329" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="400" y="307" width="32" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toPlan" bpmnElement="f_toPlan">
        <di:waypoint x="666" y="329" />
        <di:waypoint x="766" y="329" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toRecordPlan" bpmnElement="f_toRecordPlan">
        <di:waypoint x="866" y="329" />
        <di:waypoint x="966" y="329" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toPlanEmptyGw" bpmnElement="f_toPlanEmptyGw">
        <di:waypoint x="1066" y="329" />
        <di:waypoint x="1166" y="329" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toReviewPlan" bpmnElement="f_toReviewPlan">
        <di:waypoint x="1216" y="329" />
        <di:waypoint x="1316" y="329" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1234" y="307" width="64" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toRecordPlanReview" bpmnElement="f_toRecordPlanReview">
        <di:waypoint x="1416" y="329" />
        <di:waypoint x="1516" y="329" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toGwPlanReview" bpmnElement="f_toGwPlanReview">
        <di:waypoint x="1616" y="329" />
        <di:waypoint x="1716" y="329" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_plan_proceed" bpmnElement="f_plan_proceed">
        <di:waypoint x="1766" y="329" />
        <di:waypoint x="2216" y="329" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1961" y="307" width="60" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toImplement" bpmnElement="f_toImplement">
        <di:waypoint x="2316" y="329" />
        <di:waypoint x="2416" y="329" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toRecordWave" bpmnElement="f_toRecordWave">
        <di:waypoint x="3854" y="329" />
        <di:waypoint x="3954" y="329" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toTrialNeeded" bpmnElement="f_toTrialNeeded">
        <di:waypoint x="4054" y="329" />
        <di:waypoint x="4154" y="329" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_skipTrialMerge" bpmnElement="f_skipTrialMerge">
        <di:waypoint x="4204" y="329" />
        <di:waypoint x="5404" y="329" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="4726" y="307" width="32" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_done" bpmnElement="f_done">
        <di:waypoint x="5454" y="329" />
        <di:waypoint x="5554" y="329" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="5488" y="307" width="32" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toEnd" bpmnElement="f_toEnd">
        <di:waypoint x="5654" y="329" />
        <di:waypoint x="5754" y="329" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_empty_revise" bpmnElement="f_empty_revise">
        <di:waypoint x="1566" y="674" />
        <di:waypoint x="1566" y="709" />
        <di:waypoint x="816" y="709" />
        <di:waypoint x="816" y="369" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1168" y="687" width="46" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_plan_revise" bpmnElement="f_plan_revise">
        <di:waypoint x="1741" y="304" />
        <di:waypoint x="1741" y="269" />
        <di:waypoint x="816" y="269" />
        <di:waypoint x="816" y="289" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1256" y="247" width="46" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_plan_answer_revise" bpmnElement="f_plan_answer_revise">
        <di:waypoint x="2091" y="514" />
        <di:waypoint x="2091" y="569" />
        <di:waypoint x="816" y="569" />
        <di:waypoint x="816" y="369" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1431" y="547" width="46" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toRecordTrialMerge" bpmnElement="f_toRecordTrialMerge">
        <di:waypoint x="4404" y="969" />
        <di:waypoint x="4504" y="969" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toGwTrial" bpmnElement="f_toGwTrial">
        <di:waypoint x="4604" y="969" />
        <di:waypoint x="4704" y="969" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_trialProceed" bpmnElement="f_trialProceed">
        <di:waypoint x="4754" y="969" />
        <di:waypoint x="5429" y="969" />
        <di:waypoint x="5429" y="354" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="5065" y="947" width="53" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_trialAnswerRerun" bpmnElement="f_trialAnswerRerun">
        <di:waypoint x="5279" y="464" />
        <di:waypoint x="5279" y="429" />
        <di:waypoint x="4354" y="429" />
        <di:waypoint x="4354" y="929" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="4794" y="407" width="46" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_readiness_gate" bpmnElement="f_readiness_gate">
        <di:waypoint x="241" y="354" />
        <di:waypoint x="241" y="489" />
        <di:waypoint x="366" y="489" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="246" y="415" width="67" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_plan_empty" bpmnElement="f_plan_empty">
        <di:waypoint x="1191" y="354" />
        <di:waypoint x="1191" y="374" />
        <di:waypoint x="2136" y="374" />
        <di:waypoint x="2136" y="589" />
        <di:waypoint x="1296" y="589" />
        <di:waypoint x="1296" y="629" />
        <di:waypoint x="1316" y="629" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="2141" y="495" width="57" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_plan_escalate" bpmnElement="f_plan_escalate">
        <di:waypoint x="1741" y="354" />
        <di:waypoint x="1741" y="489" />
        <di:waypoint x="1866" y="489" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1746" y="415" width="67" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_plan_answer_proceed" bpmnElement="f_plan_answer_proceed">
        <di:waypoint x="2116" y="489" />
        <di:waypoint x="2266" y="489" />
        <di:waypoint x="2266" y="369" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="2165" y="467" width="53" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_runTrialMerge" bpmnElement="f_runTrialMerge">
        <di:waypoint x="4179" y="354" />
        <di:waypoint x="4179" y="969" />
        <di:waypoint x="4304" y="969" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="4184" y="655" width="25" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_trialEscalate" bpmnElement="f_trialEscalate">
        <di:waypoint x="4729" y="944" />
        <di:waypoint x="4729" y="489" />
        <di:waypoint x="4854" y="489" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="4734" y="710" width="85" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_trialAnswerProceed" bpmnElement="f_trialAnswerProceed">
        <di:waypoint x="5279" y="464" />
        <di:waypoint x="5279" y="329" />
        <di:waypoint x="5404" y="329" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="5284" y="390" width="53" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_trialAnswerAbandon" bpmnElement="f_trialAnswerAbandon">
        <di:waypoint x="5279" y="464" />
        <di:waypoint x="5279" y="291" />
        <di:waypoint x="5534" y="291" />
        <di:waypoint x="5534" y="329" />
        <di:waypoint x="5554" y="329" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="5380" y="269" width="53" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_moreWaves" bpmnElement="f_moreWaves">
        <di:waypoint x="5454" y="329" />
        <di:waypoint x="5474" y="329" />
        <di:waypoint x="5474" y="354" />
        <di:waypoint x="5508" y="354" />
        <di:waypoint x="5508" y="509" />
        <di:waypoint x="5586" y="509" />
        <di:waypoint x="5586" y="527" />
        <di:waypoint x="5604" y="527" />
        <di:waypoint x="5604" y="507" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="5513" y="425" width="35" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_readiness_done" bpmnElement="f_readiness_done">
        <di:waypoint x="466" y="489" />
        <di:waypoint x="616" y="489" />
        <di:waypoint x="616" y="369" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toGwEmptyAnswer" bpmnElement="f_toGwEmptyAnswer">
        <di:waypoint x="1416" y="649" />
        <di:waypoint x="1541" y="649" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_empty_accept" bpmnElement="f_empty_accept">
        <di:waypoint x="1591" y="649" />
        <di:waypoint x="1723" y="649" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1631" y="616" width="53" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toGwPlanAnswer" bpmnElement="f_toGwPlanAnswer">
        <di:waypoint x="1966" y="489" />
        <di:waypoint x="2066" y="489" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_toGwTrialAnswer" bpmnElement="f_toGwTrialAnswer">
        <di:waypoint x="4954" y="489" />
        <di:waypoint x="5054" y="489" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_resolveToTrialAnswer" bpmnElement="f_resolveToTrialAnswer">
        <di:waypoint x="5154" y="489" />
        <di:waypoint x="5254" y="489" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_waveMerged" bpmnElement="f_waveMerged">
        <di:waypoint x="5604" y="507" />
        <di:waypoint x="5604" y="598" />
        <di:waypoint x="2266" y="598" />
        <di:waypoint x="2266" y="369" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_plan_sla" bpmnElement="f_plan_sla">
        <di:waypoint x="1916" y="547" />
        <di:waypoint x="1916" y="567" />
        <di:waypoint x="816" y="567" />
        <di:waypoint x="816" y="369" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1326" y="534" width="81" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_f_trial_sla" bpmnElement="f_trial_sla">
        <di:waypoint x="4904" y="547" />
        <di:waypoint x="4904" y="909" />
        <di:waypoint x="4354" y="909" />
        <di:waypoint x="4354" y="929" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="4592" y="876" width="74" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="BPMNShape_w_start" bpmnElement="w_start">
        <dc:Bounds x="2456" y="142" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="2457" y="183" width="34" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_caps-prepare" bpmnElement="caps-prepare">
        <dc:Bounds x="2592" y="120" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_w_gw_needs" bpmnElement="w_gw_needs" isMarkerVisible="true">
        <dc:Bounds x="2792" y="135" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="2780" y="102" width="74" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_w_gw_caps" bpmnElement="w_gw_caps" isMarkerVisible="true">
        <dc:Bounds x="2942" y="295" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="2928" y="262" width="78" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_wait-caps-resolved" bpmnElement="wait-caps-resolved">
        <dc:Bounds x="3092" y="302" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="3066" y="343" width="88" height="42" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_wait-caps-timeout" bpmnElement="wait-caps-timeout">
        <dc:Bounds x="3092" y="462" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="3068" y="503" width="84" height="42" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_implement-cell-call" bpmnElement="implement-cell-call">
        <dc:Bounds x="3578" y="120" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_feature-escalation" bpmnElement="feature-escalation">
        <dc:Bounds x="3228" y="440" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_w_gw_answer" bpmnElement="w_gw_answer" isMarkerVisible="true">
        <dc:Bounds x="3428" y="455" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="3425" y="510" width="56" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_w_end" bpmnElement="w_end">
        <dc:Bounds x="3778" y="142" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="3763" y="123" width="66" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_be_feature_sla" bpmnElement="be_feature_sla">
        <dc:Bounds x="3260" y="502" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="3236" y="563" width="84" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_w_toCapsPrepare" bpmnElement="w_toCapsPrepare">
        <di:waypoint x="2492" y="160" />
        <di:waypoint x="2592" y="160" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_w_toNeedsGw" bpmnElement="w_toNeedsGw">
        <di:waypoint x="2692" y="160" />
        <di:waypoint x="2792" y="160" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_w_noNeeds" bpmnElement="w_noNeeds">
        <di:waypoint x="2842" y="160" />
        <di:waypoint x="3578" y="160" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="3194" y="138" width="32" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_w_toEnd" bpmnElement="w_toEnd">
        <di:waypoint x="3678" y="160" />
        <di:waypoint x="3778" y="160" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_w_capsToWait" bpmnElement="w_capsToWait">
        <di:waypoint x="2992" y="320" />
        <di:waypoint x="3092" y="320" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_w_capsResolved" bpmnElement="w_capsResolved">
        <di:waypoint x="3128" y="320" />
        <di:waypoint x="3628" y="320" />
        <di:waypoint x="3628" y="200" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_w_abandon" bpmnElement="w_abandon">
        <di:waypoint x="3478" y="480" />
        <di:waypoint x="3796" y="480" />
        <di:waypoint x="3796" y="178" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="3621" y="488" width="53" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_w_toWaitCaps" bpmnElement="w_toWaitCaps">
        <di:waypoint x="2817" y="185" />
        <di:waypoint x="2817" y="320" />
        <di:waypoint x="2942" y="320" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="2822" y="246" width="39" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_w_capsToTimeout" bpmnElement="w_capsToTimeout">
        <di:waypoint x="2967" y="345" />
        <di:waypoint x="2967" y="480" />
        <di:waypoint x="3092" y="480" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_w_answerLoop" bpmnElement="w_answerLoop">
        <di:waypoint x="3478" y="480" />
        <di:waypoint x="3498" y="480" />
        <di:waypoint x="3498" y="455" />
        <di:waypoint x="3698" y="455" />
        <di:waypoint x="3698" y="198" />
        <di:waypoint x="3678" y="198" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="3574" y="433" width="49" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_w_capsTimeout" bpmnElement="w_capsTimeout">
        <di:waypoint x="3128" y="480" />
        <di:waypoint x="3228" y="480" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="3147" y="458" width="63" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_w_toAnswerGw" bpmnElement="w_toAnswerGw">
        <di:waypoint x="3328" y="480" />
        <di:waypoint x="3428" y="480" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_w_sla" bpmnElement="w_sla">
        <di:waypoint x="3278" y="538" />
        <di:waypoint x="3278" y="558" />
        <di:waypoint x="3796" y="558" />
        <di:waypoint x="3796" y="178" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="3493" y="525" width="88" height="28" />
        </bpmndi:BPMNLabel>
      </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="61" y="143" width="74" 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="604" y="62" width="74" 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="1096" y="69" width="76" 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>
