<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" 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" id="R1Definitions" targetNamespace="https://prevention-demo.local/r1">
<bpmn:process id="R1Process" name="Portfolio R1 member-controlled support" isExecutable="false">
<bpmn:documentation>Core R1 path. Errors, reset, expiry and revocation are detailed in the API and acceptance tests. Fictional data only. Lane ownership denotes responsibility, not production identity.</bpmn:documentation>
<bpmn:laneSet id="Roles"><bpmn:lane id="Lane_member" name="Member"><bpmn:flowNodeRef>Start</bpmn:flowNodeRef><bpmn:flowNodeRef>Preferences</bpmn:flowNodeRef><bpmn:flowNodeRef>PlanChoice</bpmn:flowNodeRef><bpmn:flowNodeRef>Activity</bpmn:flowNodeRef><bpmn:flowNodeRef>CheckIn</bpmn:flowNodeRef><bpmn:flowNodeRef>SupportChoice</bpmn:flowNodeRef><bpmn:flowNodeRef>Sharing</bpmn:flowNodeRef><bpmn:flowNodeRef>Request</bpmn:flowNodeRef><bpmn:flowNodeRef>Decision</bpmn:flowNodeRef><bpmn:flowNodeRef>AcceptChange</bpmn:flowNodeRef><bpmn:flowNodeRef>End</bpmn:flowNodeRef></bpmn:lane><bpmn:lane id="Lane_system" name="Application"><bpmn:flowNodeRef>Proposal</bpmn:flowNodeRef><bpmn:flowNodeRef>Review</bpmn:flowNodeRef><bpmn:flowNodeRef>Activate</bpmn:flowNodeRef></bpmn:lane><bpmn:lane id="Lane_coach" name="Assigned coach"><bpmn:flowNodeRef>Coach</bpmn:flowNodeRef></bpmn:lane><bpmn:lane id="Lane_analyst" name="Analyst"><bpmn:flowNodeRef>Analyst</bpmn:flowNodeRef></bpmn:lane></bpmn:laneSet>
<bpmn:startEvent id="Start" name="New guided journey"><bpmn:outgoing>f01</bpmn:outgoing></bpmn:startEvent>
<bpmn:userTask id="Preferences" name="Save preferences"><bpmn:incoming>f01</bpmn:incoming><bpmn:outgoing>f02</bpmn:outgoing></bpmn:userTask>
<bpmn:serviceTask id="Proposal" name="Match demo template"><bpmn:incoming>f02</bpmn:incoming><bpmn:outgoing>f03</bpmn:outgoing></bpmn:serviceTask>
<bpmn:exclusiveGateway id="PlanChoice" name="Accept plan?"><bpmn:incoming>f03</bpmn:incoming><bpmn:outgoing>f04</bpmn:outgoing><bpmn:outgoing>f05</bpmn:outgoing></bpmn:exclusiveGateway>
<bpmn:userTask id="Activity" name="Record manual activity"><bpmn:incoming>f04</bpmn:incoming><bpmn:outgoing>f06</bpmn:outgoing></bpmn:userTask>
<bpmn:userTask id="CheckIn" name="Optional check-in / reporting"><bpmn:incoming>f06</bpmn:incoming><bpmn:outgoing>f07</bpmn:outgoing></bpmn:userTask>
<bpmn:serviceTask id="Review" name="Calculate and persist review"><bpmn:incoming>f07</bpmn:incoming><bpmn:outgoing>f08</bpmn:outgoing></bpmn:serviceTask>
<bpmn:exclusiveGateway id="SupportChoice" name="Request support?"><bpmn:incoming>f08</bpmn:incoming><bpmn:outgoing>f09</bpmn:outgoing><bpmn:outgoing>f10</bpmn:outgoing></bpmn:exclusiveGateway>
<bpmn:userTask id="Sharing" name="Enable coach sharing"><bpmn:incoming>f09</bpmn:incoming><bpmn:outgoing>f11</bpmn:outgoing></bpmn:userTask>
<bpmn:userTask id="Request" name="Explicit support request"><bpmn:incoming>f11</bpmn:incoming><bpmn:outgoing>f12</bpmn:outgoing></bpmn:userTask>
<bpmn:userTask id="Coach" name="Propose adjustment; active plan unchanged"><bpmn:incoming>f12</bpmn:incoming><bpmn:outgoing>f13</bpmn:outgoing></bpmn:userTask>
<bpmn:userTask id="Decision" name="Member reviews proposal"><bpmn:incoming>f13</bpmn:incoming><bpmn:outgoing>f14</bpmn:outgoing></bpmn:userTask>
<bpmn:exclusiveGateway id="AcceptChange" name="Accept adjustment?"><bpmn:incoming>f14</bpmn:incoming><bpmn:outgoing>f15</bpmn:outgoing><bpmn:outgoing>f16</bpmn:outgoing></bpmn:exclusiveGateway>
<bpmn:serviceTask id="Activate" name="Activate new immutable version"><bpmn:incoming>f15</bpmn:incoming><bpmn:outgoing>f17</bpmn:outgoing></bpmn:serviceTask>
<bpmn:userTask id="Analyst" name="Inspect pseudonymous decision"><bpmn:incoming>f10</bpmn:incoming><bpmn:incoming>f16</bpmn:incoming><bpmn:incoming>f17</bpmn:incoming><bpmn:outgoing>f18</bpmn:outgoing></bpmn:userTask>
<bpmn:endEvent id="End" name="Member choice preserved"><bpmn:incoming>f05</bpmn:incoming><bpmn:incoming>f18</bpmn:incoming></bpmn:endEvent>
<bpmn:sequenceFlow id="f01" sourceRef="Start" targetRef="Preferences"/>
<bpmn:sequenceFlow id="f02" sourceRef="Preferences" targetRef="Proposal"/>
<bpmn:sequenceFlow id="f03" sourceRef="Proposal" targetRef="PlanChoice"/>
<bpmn:sequenceFlow id="f04" sourceRef="PlanChoice" targetRef="Activity" name="Accepted"/>
<bpmn:sequenceFlow id="f05" sourceRef="PlanChoice" targetRef="End" name="Declined"/>
<bpmn:sequenceFlow id="f06" sourceRef="Activity" targetRef="CheckIn"/>
<bpmn:sequenceFlow id="f07" sourceRef="CheckIn" targetRef="Review"/>
<bpmn:sequenceFlow id="f08" sourceRef="Review" targetRef="SupportChoice"/>
<bpmn:sequenceFlow id="f09" sourceRef="SupportChoice" targetRef="Sharing" name="Support chosen"/>
<bpmn:sequenceFlow id="f10" sourceRef="SupportChoice" targetRef="Analyst" name="Continue without support"/>
<bpmn:sequenceFlow id="f11" sourceRef="Sharing" targetRef="Request" name="Sharing granted"/>
<bpmn:sequenceFlow id="f12" sourceRef="Request" targetRef="Coach" name="Assigned authorized coach"/>
<bpmn:sequenceFlow id="f13" sourceRef="Coach" targetRef="Decision"/>
<bpmn:sequenceFlow id="f14" sourceRef="Decision" targetRef="AcceptChange"/>
<bpmn:sequenceFlow id="f15" sourceRef="AcceptChange" targetRef="Activate" name="Accepted with current ETag"/>
<bpmn:sequenceFlow id="f16" sourceRef="AcceptChange" targetRef="Analyst" name="Declined; active plan preserved"/>
<bpmn:sequenceFlow id="f17" sourceRef="Activate" targetRef="Analyst"/>
<bpmn:sequenceFlow id="f18" sourceRef="Analyst" targetRef="End"/>
</bpmn:process>
<bpmndi:BPMNDiagram id="Diagram"><bpmndi:BPMNPlane id="Plane" bpmnElement="R1Process">
<bpmndi:BPMNShape id="Shape_Lane_member" bpmnElement="Lane_member" isHorizontal="true"><dc:Bounds x="20" y="0" width="2650" height="180"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_Lane_system" bpmnElement="Lane_system" isHorizontal="true"><dc:Bounds x="20" y="180" width="2650" height="180"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_Lane_coach" bpmnElement="Lane_coach" isHorizontal="true"><dc:Bounds x="20" y="360" width="2650" height="180"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_Lane_analyst" bpmnElement="Lane_analyst" isHorizontal="true"><dc:Bounds x="20" y="540" width="2650" height="180"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_Start" bpmnElement="Start"><dc:Bounds x="50" y="60" width="36" height="36"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_Preferences" bpmnElement="Preferences"><dc:Bounds x="130" y="60" width="130" height="80"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_Proposal" bpmnElement="Proposal"><dc:Bounds x="310" y="240" width="130" height="80"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_PlanChoice" bpmnElement="PlanChoice"><dc:Bounds x="490" y="60" width="50" height="50"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_Activity" bpmnElement="Activity"><dc:Bounds x="590" y="60" width="130" height="80"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_CheckIn" bpmnElement="CheckIn"><dc:Bounds x="770" y="60" width="150" height="80"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_Review" bpmnElement="Review"><dc:Bounds x="970" y="240" width="150" height="80"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_SupportChoice" bpmnElement="SupportChoice"><dc:Bounds x="1170" y="60" width="50" height="50"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_Sharing" bpmnElement="Sharing"><dc:Bounds x="1270" y="60" width="130" height="80"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_Request" bpmnElement="Request"><dc:Bounds x="1450" y="60" width="130" height="80"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_Coach" bpmnElement="Coach"><dc:Bounds x="1630" y="420" width="170" height="90"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_Decision" bpmnElement="Decision"><dc:Bounds x="1850" y="60" width="140" height="80"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_AcceptChange" bpmnElement="AcceptChange"><dc:Bounds x="2040" y="60" width="50" height="50"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_Activate" bpmnElement="Activate"><dc:Bounds x="2140" y="240" width="150" height="80"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_Analyst" bpmnElement="Analyst"><dc:Bounds x="2340" y="600" width="170" height="90"/></bpmndi:BPMNShape><bpmndi:BPMNShape id="Shape_End" bpmnElement="End"><dc:Bounds x="2560" y="60" width="36" height="36"/></bpmndi:BPMNShape><bpmndi:BPMNEdge id="Edge_f01" bpmnElement="f01"><di:waypoint x="86" y="78"/><di:waypoint x="130" y="100"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f02" bpmnElement="f02"><di:waypoint x="260" y="100"/><di:waypoint x="310" y="280"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f03" bpmnElement="f03"><di:waypoint x="440" y="280"/><di:waypoint x="490" y="85"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f04" bpmnElement="f04"><di:waypoint x="540" y="85"/><di:waypoint x="590" y="100"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f05" bpmnElement="f05"><di:waypoint x="540" y="85"/><di:waypoint x="2560" y="78"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f06" bpmnElement="f06"><di:waypoint x="720" y="100"/><di:waypoint x="770" y="100"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f07" bpmnElement="f07"><di:waypoint x="920" y="100"/><di:waypoint x="970" y="280"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f08" bpmnElement="f08"><di:waypoint x="1120" y="280"/><di:waypoint x="1170" y="85"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f09" bpmnElement="f09"><di:waypoint x="1220" y="85"/><di:waypoint x="1270" y="100"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f10" bpmnElement="f10"><di:waypoint x="1220" y="85"/><di:waypoint x="2340" y="645"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f11" bpmnElement="f11"><di:waypoint x="1400" y="100"/><di:waypoint x="1450" y="100"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f12" bpmnElement="f12"><di:waypoint x="1580" y="100"/><di:waypoint x="1630" y="465"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f13" bpmnElement="f13"><di:waypoint x="1800" y="465"/><di:waypoint x="1850" y="100"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f14" bpmnElement="f14"><di:waypoint x="1990" y="100"/><di:waypoint x="2040" y="85"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f15" bpmnElement="f15"><di:waypoint x="2090" y="85"/><di:waypoint x="2140" y="280"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f16" bpmnElement="f16"><di:waypoint x="2090" y="85"/><di:waypoint x="2340" y="645"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f17" bpmnElement="f17"><di:waypoint x="2290" y="280"/><di:waypoint x="2340" y="645"/></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Edge_f18" bpmnElement="f18"><di:waypoint x="2510" y="645"/><di:waypoint x="2560" y="78"/></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>
