Skip to content
BPMN 2.0 templates

Order reservation with explicit release on payment failure

Reserve inventory and authorize payment as distinct steps; commit only when both succeed, otherwise reverse reservations and preserve an audit trail. Editable collaboration with role lanes, decisions and explicit rollback activities. Illustrative policy and timing; adapt to local requirements.

Template previewBPMN 2.0
Rendering…

What this template contains

Source
71 lines

Make it your own.

<?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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="inventory_payment_reservation_definitions" targetNamespace="urn:flowss:advanced">
  <bpmn:message id="inventory_payment_reservation_message" name="Checkout submitted"/>
  
  <bpmn:process id="inventory_payment_reservation_process" name="Order reservation with explicit release on payment failure" isExecutable="false">
    <bpmn:documentation>Reserve inventory and authorize payment as distinct steps; commit only when both succeed, otherwise reverse reservations and preserve an audit trail. Inputs: Checkout submitted. Rollback activities are explicit modelled tasks, not engine-level BPMN compensation handlers. All policy choices, durations and conditions are illustrative. Replace example rules with approved local policy; configure integrations and review before execution. This non-executable template does not assert legal compliance or a real completed case.</bpmn:documentation>
    <bpmn:laneSet id="inventory_payment_reservation_lanes"><bpmn:lane id="inventory_payment_reservation_lane_0" name="Order service"><bpmn:flowNodeRef>inventory_payment_reservation_start</bpmn:flowNodeRef><bpmn:flowNodeRef>inventory_payment_reservation_intake_1</bpmn:flowNodeRef><bpmn:flowNodeRef>inventory_payment_reservation_prepare_1</bpmn:flowNodeRef><bpmn:flowNodeRef>inventory_payment_reservation_prepare_2</bpmn:flowNodeRef><bpmn:flowNodeRef>inventory_payment_reservation_commit_1</bpmn:flowNodeRef><bpmn:flowNodeRef>inventory_payment_reservation_commit_rest_1</bpmn:flowNodeRef><bpmn:flowNodeRef>inventory_payment_reservation_commit_rest_2</bpmn:flowNodeRef><bpmn:flowNodeRef>inventory_payment_reservation_complete</bpmn:flowNodeRef></bpmn:lane><bpmn:lane id="inventory_payment_reservation_lane_1" name="Payment operations"><bpmn:flowNodeRef>inventory_payment_reservation_verification</bpmn:flowNodeRef><bpmn:flowNodeRef>inventory_payment_reservation_decision</bpmn:flowNodeRef></bpmn:lane><bpmn:lane id="inventory_payment_reservation_lane_2" name="Recovery service"><bpmn:flowNodeRef>inventory_payment_reservation_rollback_1</bpmn:flowNodeRef><bpmn:flowNodeRef>inventory_payment_reservation_rollback_rest_1</bpmn:flowNodeRef><bpmn:flowNodeRef>inventory_payment_reservation_rollback_rest_2</bpmn:flowNodeRef><bpmn:flowNodeRef>inventory_payment_reservation_alternate</bpmn:flowNodeRef></bpmn:lane></bpmn:laneSet>
    <bpmn:startEvent id="inventory_payment_reservation_start" name="Checkout submitted"><bpmn:messageEventDefinition id="inventory_payment_reservation_start_def" messageRef="inventory_payment_reservation_message"/></bpmn:startEvent>
    <bpmn:userTask id="inventory_payment_reservation_intake_1" name="Validate order total"></bpmn:userTask>
    <bpmn:userTask id="inventory_payment_reservation_prepare_1" name="Reserve inventory"></bpmn:userTask>
    <bpmn:userTask id="inventory_payment_reservation_prepare_2" name="Request payment authorization"></bpmn:userTask>
    <bpmn:userTask id="inventory_payment_reservation_verification" name="Reconcile authorization response"></bpmn:userTask>
    <bpmn:exclusiveGateway id="inventory_payment_reservation_decision" name="Reservation confirmed?" default="inventory_payment_reservation_flow_7"></bpmn:exclusiveGateway>
    <bpmn:serviceTask id="inventory_payment_reservation_commit_1" name="Commit stock allocation"></bpmn:serviceTask>
    <bpmn:serviceTask id="inventory_payment_reservation_rollback_1" name="Void payment authorization"></bpmn:serviceTask>
    <bpmn:serviceTask id="inventory_payment_reservation_commit_rest_1" name="Capture authorized payment"></bpmn:serviceTask>
    <bpmn:serviceTask id="inventory_payment_reservation_commit_rest_2" name="Issue confirmed order"></bpmn:serviceTask>
    <bpmn:serviceTask id="inventory_payment_reservation_rollback_rest_1" name="Release stock reservation"></bpmn:serviceTask>
    <bpmn:serviceTask id="inventory_payment_reservation_rollback_rest_2" name="Record failed checkout"></bpmn:serviceTask>
    <bpmn:endEvent id="inventory_payment_reservation_complete" name="Order committed"></bpmn:endEvent>
    <bpmn:endEvent id="inventory_payment_reservation_alternate" name="Reservations released"></bpmn:endEvent>
    <bpmn:sequenceFlow id="inventory_payment_reservation_flow_1" sourceRef="inventory_payment_reservation_start" targetRef="inventory_payment_reservation_intake_1"></bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="inventory_payment_reservation_flow_2" sourceRef="inventory_payment_reservation_intake_1" targetRef="inventory_payment_reservation_prepare_1"></bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="inventory_payment_reservation_flow_3" sourceRef="inventory_payment_reservation_prepare_1" targetRef="inventory_payment_reservation_prepare_2"></bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="inventory_payment_reservation_flow_4" sourceRef="inventory_payment_reservation_prepare_2" targetRef="inventory_payment_reservation_verification"></bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="inventory_payment_reservation_flow_5" sourceRef="inventory_payment_reservation_verification" targetRef="inventory_payment_reservation_decision"></bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="inventory_payment_reservation_flow_6" sourceRef="inventory_payment_reservation_decision" targetRef="inventory_payment_reservation_commit_1" name="Yes"><bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=orderReady = true</bpmn:conditionExpression></bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="inventory_payment_reservation_flow_7" sourceRef="inventory_payment_reservation_decision" targetRef="inventory_payment_reservation_rollback_1" name="Otherwise"></bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="inventory_payment_reservation_flow_8" sourceRef="inventory_payment_reservation_commit_1" targetRef="inventory_payment_reservation_commit_rest_1"></bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="inventory_payment_reservation_flow_9" sourceRef="inventory_payment_reservation_commit_rest_1" targetRef="inventory_payment_reservation_commit_rest_2"></bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="inventory_payment_reservation_flow_10" sourceRef="inventory_payment_reservation_rollback_1" targetRef="inventory_payment_reservation_rollback_rest_1"></bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="inventory_payment_reservation_flow_11" sourceRef="inventory_payment_reservation_rollback_rest_1" targetRef="inventory_payment_reservation_rollback_rest_2"></bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="inventory_payment_reservation_flow_12" sourceRef="inventory_payment_reservation_commit_rest_2" targetRef="inventory_payment_reservation_complete"></bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="inventory_payment_reservation_flow_13" sourceRef="inventory_payment_reservation_rollback_rest_2" targetRef="inventory_payment_reservation_alternate"></bpmn:sequenceFlow>
  </bpmn:process>
  <bpmn:collaboration id="inventory_payment_reservation_collaboration"><bpmn:participant id="inventory_payment_reservation_party" name="Buyer"/><bpmn:participant id="inventory_payment_reservation_pool" name="Order reservation with explicit release on payment failure" processRef="inventory_payment_reservation_process"/><bpmn:messageFlow id="inventory_payment_reservation_request" sourceRef="inventory_payment_reservation_party" targetRef="inventory_payment_reservation_start"/></bpmn:collaboration>
  <bpmndi:BPMNDiagram id="inventory_payment_reservation_diagram"><bpmndi:BPMNPlane id="inventory_payment_reservation_plane" bpmnElement="inventory_payment_reservation_collaboration">
    <bpmndi:BPMNShape id="inventory_payment_reservation_party_di" bpmnElement="inventory_payment_reservation_party" isHorizontal="true"><dc:Bounds x="20" y="20" width="2210" height="70"/></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_pool_di" bpmnElement="inventory_payment_reservation_pool" isHorizontal="true"><dc:Bounds x="20" y="180" width="2210" height="780"/></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_lane_0_di" bpmnElement="inventory_payment_reservation_lane_0" isHorizontal="true"><dc:Bounds x="50" y="180" width="2180" height="260"/></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_lane_1_di" bpmnElement="inventory_payment_reservation_lane_1" isHorizontal="true"><dc:Bounds x="50" y="440" width="2180" height="260"/></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_lane_2_di" bpmnElement="inventory_payment_reservation_lane_2" isHorizontal="true"><dc:Bounds x="50" y="700" width="2180" height="260"/></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_start_di" bpmnElement="inventory_payment_reservation_start"><dc:Bounds x="162" y="292" width="36" height="36"/><bpmndi:BPMNLabel><dc:Bounds x="108" y="335" width="144" height="40"/></bpmndi:BPMNLabel></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_intake_1_di" bpmnElement="inventory_payment_reservation_intake_1"><dc:Bounds x="325" y="272" width="130" height="76"/></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_prepare_1_di" bpmnElement="inventory_payment_reservation_prepare_1"><dc:Bounds x="535" y="272" width="130" height="76"/></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_prepare_2_di" bpmnElement="inventory_payment_reservation_prepare_2"><dc:Bounds x="745" y="272" width="130" height="76"/></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_verification_di" bpmnElement="inventory_payment_reservation_verification"><dc:Bounds x="955" y="532" width="130" height="76"/></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_decision_di" bpmnElement="inventory_payment_reservation_decision" isMarkerVisible="true"><dc:Bounds x="1206" y="546" width="48" height="48"/><bpmndi:BPMNLabel><dc:Bounds x="1158" y="496" width="144" height="40"/></bpmndi:BPMNLabel></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_commit_1_di" bpmnElement="inventory_payment_reservation_commit_1"><dc:Bounds x="1375" y="272" width="130" height="76"/></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_rollback_1_di" bpmnElement="inventory_payment_reservation_rollback_1"><dc:Bounds x="1375" y="792" width="130" height="76"/></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_commit_rest_1_di" bpmnElement="inventory_payment_reservation_commit_rest_1"><dc:Bounds x="1585" y="272" width="130" height="76"/></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_commit_rest_2_di" bpmnElement="inventory_payment_reservation_commit_rest_2"><dc:Bounds x="1795" y="272" width="130" height="76"/></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_rollback_rest_1_di" bpmnElement="inventory_payment_reservation_rollback_rest_1"><dc:Bounds x="1585" y="792" width="130" height="76"/></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_rollback_rest_2_di" bpmnElement="inventory_payment_reservation_rollback_rest_2"><dc:Bounds x="1795" y="792" width="130" height="76"/></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_complete_di" bpmnElement="inventory_payment_reservation_complete"><dc:Bounds x="2052" y="292" width="36" height="36"/><bpmndi:BPMNLabel><dc:Bounds x="1998" y="335" width="144" height="40"/></bpmndi:BPMNLabel></bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="inventory_payment_reservation_alternate_di" bpmnElement="inventory_payment_reservation_alternate"><dc:Bounds x="2052" y="812" width="36" height="36"/><bpmndi:BPMNLabel><dc:Bounds x="1998" y="855" width="144" height="40"/></bpmndi:BPMNLabel></bpmndi:BPMNShape>
    <bpmndi:BPMNEdge id="inventory_payment_reservation_flow_1_di" bpmnElement="inventory_payment_reservation_flow_1"><di:waypoint x="198" y="310"/><di:waypoint x="325" y="310"/></bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="inventory_payment_reservation_flow_2_di" bpmnElement="inventory_payment_reservation_flow_2"><di:waypoint x="455" y="310"/><di:waypoint x="535" y="310"/></bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="inventory_payment_reservation_flow_3_di" bpmnElement="inventory_payment_reservation_flow_3"><di:waypoint x="665" y="310"/><di:waypoint x="745" y="310"/></bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="inventory_payment_reservation_flow_4_di" bpmnElement="inventory_payment_reservation_flow_4"><di:waypoint x="875" y="310"/><di:waypoint x="915" y="310"/><di:waypoint x="915" y="570"/><di:waypoint x="955" y="570"/></bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="inventory_payment_reservation_flow_5_di" bpmnElement="inventory_payment_reservation_flow_5"><di:waypoint x="1085" y="570"/><di:waypoint x="1206" y="570"/></bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="inventory_payment_reservation_flow_6_di" bpmnElement="inventory_payment_reservation_flow_6"><di:waypoint x="1254" y="570"/><di:waypoint x="1315" y="570"/><di:waypoint x="1315" y="310"/><di:waypoint x="1375" y="310"/><bpmndi:BPMNLabel><dc:Bounds x="1262" y="543" width="100" height="22"/></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="inventory_payment_reservation_flow_7_di" bpmnElement="inventory_payment_reservation_flow_7"><di:waypoint x="1254" y="570"/><di:waypoint x="1315" y="570"/><di:waypoint x="1315" y="830"/><di:waypoint x="1375" y="830"/><bpmndi:BPMNLabel><dc:Bounds x="1262" y="580" width="100" height="22"/></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="inventory_payment_reservation_flow_8_di" bpmnElement="inventory_payment_reservation_flow_8"><di:waypoint x="1505" y="310"/><di:waypoint x="1585" y="310"/></bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="inventory_payment_reservation_flow_9_di" bpmnElement="inventory_payment_reservation_flow_9"><di:waypoint x="1715" y="310"/><di:waypoint x="1795" y="310"/></bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="inventory_payment_reservation_flow_10_di" bpmnElement="inventory_payment_reservation_flow_10"><di:waypoint x="1505" y="830"/><di:waypoint x="1585" y="830"/></bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="inventory_payment_reservation_flow_11_di" bpmnElement="inventory_payment_reservation_flow_11"><di:waypoint x="1715" y="830"/><di:waypoint x="1795" y="830"/></bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="inventory_payment_reservation_flow_12_di" bpmnElement="inventory_payment_reservation_flow_12"><di:waypoint x="1925" y="310"/><di:waypoint x="2052" y="310"/></bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="inventory_payment_reservation_flow_13_di" bpmnElement="inventory_payment_reservation_flow_13"><di:waypoint x="1925" y="830"/><di:waypoint x="2052" y="830"/></bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="inventory_payment_reservation_request_di" bpmnElement="inventory_payment_reservation_request"><di:waypoint x="180" y="90"/><di:waypoint x="180" y="292"/></bpmndi:BPMNEdge>
    
  </bpmndi:BPMNPlane></bpmndi:BPMNDiagram>
</bpmn:definitions>