<?xml version="1.0" encoding="UTF-8"?>
<b:definitions xmlns:b="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bd="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="IndependentDefinitions" targetNamespace="urn:primeui:test:independent">
  <b:itemDefinition id="InvoiceType" />
  <b:category id="Category">
    <b:categoryValue id="Approved" value="Review stage" />
  </b:category>
  <b:process id="ProcessA" name="Purchasing" isExecutable="false">
    <b:laneSet id="LanesA">
      <b:lane id="LaneA" name="Buyer">
        <b:flowNodeRef>Start</b:flowNodeRef>
        <b:flowNodeRef>Manual</b:flowNodeRef>
        <b:flowNodeRef>End</b:flowNodeRef>
        <b:flowNodeRef>Sub</b:flowNodeRef>
        <b:flowNodeRef>Review</b:flowNodeRef>
        <b:flowNodeRef>Reminder</b:flowNodeRef>
      </b:lane>
    </b:laneSet>
    <b:startEvent id="Start" name="Request">
      <b:outgoing>StartFlow</b:outgoing>
    </b:startEvent>
    <b:manualTask id="Manual" name="manual">
      <b:outgoing>EndFlow</b:outgoing>
    </b:manualTask>
    <b:endEvent id="End" name="Accepted">
      <b:incoming>EndFlow</b:incoming>
    </b:endEvent>
    <b:subProcess id="Sub" name="Archive">
      <b:incoming>NextFlow</b:incoming>
      <b:task id="Archive" name="Store invoice" />
    </b:subProcess>
    <b:dataObject id="Invoice" name="Invoice" itemSubjectRef="InvoiceType" />
    <b:dataObjectReference id="InvoiceView" itemSubjectRef="InvoiceType" name="Invoice" dataObjectRef="Invoice" />
    <b:sequenceFlow id="StartFlow" sourceRef="Start" targetRef="Review" />
    <b:sequenceFlow id="NextFlow" sourceRef="Review" targetRef="Sub" />
    <b:sequenceFlow id="EndFlow" sourceRef="Manual" targetRef="End" />
    <b:userTask id="Review" name="External review approved">
      <b:categoryValueRef>Approved</b:categoryValueRef>
      <b:incoming>StartFlow</b:incoming>
      <b:outgoing>NextFlow</b:outgoing>
      <b:ioSpecification>
        <b:dataInput id="InvoiceInput" itemSubjectRef="InvoiceType" name="Invoice" />
        <b:inputSet id="InputSet">
          <b:dataInputRefs>InvoiceInput</b:dataInputRefs>
        </b:inputSet>
        <b:outputSet id="OutputSet" />
      </b:ioSpecification>
      <b:dataInputAssociation id="ReadInvoice">
        <b:sourceRef>InvoiceView</b:sourceRef>
        <b:targetRef>InvoiceInput</b:targetRef>
      </b:dataInputAssociation>
    </b:userTask>
    <b:boundaryEvent id="Reminder" name="Reminder" cancelActivity="false" attachedToRef="Review">
      <b:categoryValueRef>Approved</b:categoryValueRef>
      <b:timerEventDefinition id="ReminderTimer" />
    </b:boundaryEvent>
  </b:process>
  <b:process id="ProcessB" name="Supplier" isExecutable="false">
    <b:laneSet id="LanesB">
      <b:lane id="LaneB" name="Supplier">
        <b:flowNodeRef>Receive</b:flowNodeRef>
      </b:lane>
    </b:laneSet>
    <b:receiveTask id="Receive" name="Receive order" />
  </b:process>
  <b:collaboration id="Collaboration" name="Independent purchasing">
    <b:participant id="Buyer" name="Buyer" processRef="ProcessA" />
    <b:participant id="Supplier" name="Supplier" processRef="ProcessB" />
    <b:messageFlow id="Message" sourceRef="Review" targetRef="Receive" />
    <b:group id="Group" categoryValueRef="Approved" />
  </b:collaboration>
  <bd:BPMNDiagram id="Diagram">
    <bd:BPMNPlane id="Plane" bpmnElement="Collaboration">
      <bd:BPMNShape id="BuyerShape" bpmnElement="Buyer" isHorizontal="true">
        <dc:Bounds x="20" y="40" width="900" height="400" />
      </bd:BPMNShape>
      <bd:BPMNShape id="LaneAShape" bpmnElement="LaneA" isHorizontal="true">
        <dc:Bounds x="50" y="40" width="870" height="400" />
      </bd:BPMNShape>
      <bd:BPMNShape id="StartShape" bpmnElement="Start">
        <dc:Bounds x="70" y="130" width="40" height="40" />
      </bd:BPMNShape>
      <bd:BPMNShape id="ManualShape" bpmnElement="Manual">
        <dc:Bounds x="390" y="110" width="120" height="80" />
      </bd:BPMNShape>
      <bd:BPMNShape id="EndShape" bpmnElement="End">
        <dc:Bounds x="610" y="130" width="40" height="40" />
      </bd:BPMNShape>
      <bd:BPMNShape id="ReviewShape" bpmnElement="Review">
        <dc:Bounds x="204" y="126" width="120" height="80" />
        <bd:BPMNLabel />
      </bd:BPMNShape>
      <bd:BPMNShape id="SubShape" bpmnElement="Sub" isExpanded="true">
        <dc:Bounds x="580" y="250" width="270" height="150" />
      </bd:BPMNShape>
      <bd:BPMNShape id="ArchiveShape" bpmnElement="Archive">
        <dc:Bounds x="620" y="290" width="120" height="70" />
      </bd:BPMNShape>
      <bd:BPMNShape id="InvoiceShape" bpmnElement="InvoiceView">
        <dc:Bounds x="100" y="300" width="45" height="60" />
      </bd:BPMNShape>
      <bd:BPMNShape id="ReminderShape" bpmnElement="Reminder">
        <dc:Bounds x="244" y="186" width="40" height="40" />
        <bd:BPMNLabel>
          <dc:Bounds x="240" y="226" width="48" height="14" />
        </bd:BPMNLabel>
      </bd:BPMNShape>
      <bd:BPMNEdge id="StartEdge" bpmnElement="StartFlow">
        <di:waypoint x="110" y="150" />
        <di:waypoint x="157" y="150" />
        <di:waypoint x="157" y="166" />
        <di:waypoint x="204" y="166" />
      </bd:BPMNEdge>
      <bd:BPMNEdge id="NextEdge" bpmnElement="NextFlow">
        <di:waypoint x="324" y="166" />
        <di:waypoint x="357" y="166" />
        <di:waypoint x="357" y="325" />
        <di:waypoint x="580" y="325" />
      </bd:BPMNEdge>
      <bd:BPMNEdge id="EndEdge" bpmnElement="EndFlow">
        <di:waypoint x="510" y="150" />
        <di:waypoint x="610" y="150" />
      </bd:BPMNEdge>
      <bd:BPMNShape id="SupplierShape" bpmnElement="Supplier" isHorizontal="true">
        <dc:Bounds x="20" y="500" width="900" height="180" />
      </bd:BPMNShape>
      <bd:BPMNShape id="LaneBShape" bpmnElement="LaneB" isHorizontal="true">
        <dc:Bounds x="50" y="500" width="870" height="180" />
      </bd:BPMNShape>
      <bd:BPMNShape id="ReceiveShape" bpmnElement="Receive">
        <dc:Bounds x="180" y="550" width="120" height="80" />
      </bd:BPMNShape>
      <bd:BPMNShape id="GroupShape" bpmnElement="Group">
        <dc:Bounds x="155" y="85" width="180" height="150" />
      </bd:BPMNShape>
      <bd:BPMNEdge id="InvoiceEdge" bpmnElement="ReadInvoice">
        <di:waypoint x="145" y="330" />
        <di:waypoint x="204" y="190" />
      </bd:BPMNEdge>
      <bd:BPMNEdge id="MessageEdge" bpmnElement="Message">
        <di:waypoint x="294" y="206" />
        <di:waypoint x="294" y="551" />
      </bd:BPMNEdge>
    </bd:BPMNPlane>
  </bd:BPMNDiagram>
</b:definitions>
