<?xml version="1.0" encoding="UTF-8"?>
<definitions
  xmlns="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"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  targetNamespace="http://priostack.com/bpmn"
  id="def_loan_approval_bpmn">
  <process id="loan_approval_bpmn" name="Loan Approval" isExecutable="true">
    <startEvent id="start"/>
    <serviceTask id="validate_identity" name="Validate Identity"/>
    <serviceTask id="assess_risk" name="Assess Risk"/>
    <serviceTask id="approve_loan" name="Approve Loan"/>
    <userTask id="manual_review" name="Manual Review"/>
    <serviceTask id="notify_applicant" name="Notify Applicant"/>
    <exclusiveGateway id="gw_credit_decision" name="Credit Decision Gateway"/>
    <endEvent id="end"/>
    <sequenceFlow id="f1" sourceRef="start" targetRef="validate_identity"/>
    <sequenceFlow id="f2" sourceRef="validate_identity" targetRef="assess_risk"/>
    <sequenceFlow id="f3" sourceRef="assess_risk" targetRef="gw_credit_decision"/>
    <sequenceFlow id="f_approve" sourceRef="gw_credit_decision" targetRef="approve_loan">
      <conditionExpression xsi:type="tFormalExpression">decision == &quot;approved&quot;</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="f_review" sourceRef="gw_credit_decision" targetRef="manual_review">
      <conditionExpression xsi:type="tFormalExpression">decision != &quot;approved&quot;</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="f5a" sourceRef="approve_loan" targetRef="notify_applicant"/>
    <sequenceFlow id="f5b" sourceRef="manual_review" targetRef="notify_applicant"/>
    <sequenceFlow id="f6" sourceRef="notify_applicant" targetRef="end"/>
  </process>
  <bpmndi:BPMNDiagram id="diagram_loan_approval_bpmn">
    <bpmndi:BPMNPlane id="plane_loan_approval_bpmn" bpmnElement="loan_approval_bpmn">
      <bpmndi:BPMNShape id="shape_start" bpmnElement="start">
        <dc:Bounds x="80" y="240" width="36" height="36"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_validate_identity" bpmnElement="validate_identity">
        <dc:Bounds x="280" y="240" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_assess_risk" bpmnElement="assess_risk">
        <dc:Bounds x="480" y="240" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_approve_loan" bpmnElement="approve_loan">
        <dc:Bounds x="880" y="180" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_manual_review" bpmnElement="manual_review">
        <dc:Bounds x="880" y="300" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_notify_applicant" bpmnElement="notify_applicant">
        <dc:Bounds x="1080" y="240" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_gw_credit_decision" bpmnElement="gw_credit_decision" isMarkerVisible="true">
        <dc:Bounds x="680" y="240" width="50" height="50"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_end" bpmnElement="end">
        <dc:Bounds x="1280" y="240" width="36" height="36"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge_f1" bpmnElement="f1">
        <di:waypoint x="98" y="258"/>
        <di:waypoint x="330" y="280"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_f2" bpmnElement="f2">
        <di:waypoint x="330" y="280"/>
        <di:waypoint x="530" y="280"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_f3" bpmnElement="f3">
        <di:waypoint x="530" y="280"/>
        <di:waypoint x="705" y="265"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_f_approve" bpmnElement="f_approve">
        <di:waypoint x="705" y="265"/>
        <di:waypoint x="930" y="220"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_f_review" bpmnElement="f_review">
        <di:waypoint x="705" y="265"/>
        <di:waypoint x="930" y="340"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_f5a" bpmnElement="f5a">
        <di:waypoint x="930" y="220"/>
        <di:waypoint x="1130" y="280"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_f5b" bpmnElement="f5b">
        <di:waypoint x="930" y="340"/>
        <di:waypoint x="1130" y="280"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_f6" bpmnElement="f6">
        <di:waypoint x="1130" y="280"/>
        <di:waypoint x="1298" y="258"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
