<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" id="Definitions_rules" name="Specimen: warehouse receiving to dispatch, business rules" namespace="https://handoffregister.theartofservice.com/dmn/" exporter="Handoff Register" exporterVersion="1.0">
  <description>Specimen: warehouse receiving to dispatch. Business rules: 2 decision tables, each linked to its business rule task in specimen-rules-as-is.bpmn. Exported 2026-10-08. Handoff Register DMN 1.0. Expressions are FEEL.</description>
  <decision id="Decision_s12" name="Release the order or hold it for credit">
    <description>Rule table for step 12 of Specimen: warehouse receiving to dispatch: Check the customer is within their credit limit before releasing the order.. Hit policy first match. 3 rules. Default route: Finance manager review. Source: Credit policy, section 4 (specimen). Rule owner: Finance manager. Effective: 1 July.</description>
    <variable id="Variable_s12" name="Release the order or hold it for credit" typeRef="string"/>
    <informationRequirement id="InformationRequirement_s12_1"><requiredInput href="#InputData_s12_1"/></informationRequirement>
    <informationRequirement id="InformationRequirement_s12_2"><requiredInput href="#InputData_s12_2"/></informationRequirement>
    <informationRequirement id="InformationRequirement_s12_3"><requiredInput href="#InputData_s12_3"/></informationRequirement>
    <usingProcess href="specimen-rules-as-is.bpmn#Process_1"/>
    <usingTask href="specimen-rules-as-is.bpmn#Task_s12"/>
    <decisionTable id="DecisionTable_s12" hitPolicy="FIRST" outputLabel="Route">
      <input id="Input_s12_1" label="Over credit limit"><inputExpression id="InputExpression_s12_1" typeRef="boolean"><text>overCreditLimit</text></inputExpression></input>
      <input id="Input_s12_2" label="Customer type"><inputExpression id="InputExpression_s12_2" typeRef="string"><text>customerType</text></inputExpression></input>
      <input id="Input_s12_3" label="Order value"><inputExpression id="InputExpression_s12_3" typeRef="number"><text>orderValue</text></inputExpression></input>
      <output id="Output_s12" label="Route" name="route" typeRef="string"><outputValues id="OutputValues_s12"><text>&quot;Step 13&quot;,&quot;Finance manager review&quot;,&quot;Step 14&quot;</text></outputValues><defaultOutputEntry id="DefaultOutputEntry_s12"><text>&quot;Finance manager review&quot;</text></defaultOutputEntry></output>
      <annotation name="Rule"/>
      <rule id="Rule_s12_1"><description>Over the limit: the credit hold step decides.</description><inputEntry id="InputEntry_s12_1_1"><text>true</text></inputEntry><inputEntry id="InputEntry_s12_1_2"><text>-</text></inputEntry><inputEntry id="InputEntry_s12_1_3"><text>-</text></inputEntry><outputEntry id="OutputEntry_s12_1"><text>&quot;Step 13&quot;</text></outputEntry><annotationEntry><text>Rule 1: Over credit limit: yes goes to Step 13: If the order is on credit hold, finance releases it or calls</text></annotationEntry></rule>
      <rule id="Rule_s12_2"><description>A new customer above 10,000 is reviewed before release.</description><inputEntry id="InputEntry_s12_2_1"><text>false</text></inputEntry><inputEntry id="InputEntry_s12_2_2"><text>&quot;new&quot;</text></inputEntry><inputEntry id="InputEntry_s12_2_3"><text>&gt; 10000</text></inputEntry><outputEntry id="OutputEntry_s12_2"><text>&quot;Finance manager review&quot;</text></outputEntry><annotationEntry><text>Rule 2: Over credit limit: no and Customer type = new and Order value &gt; 10,000 goes to Route: Finance manager review</text></annotationEntry></rule>
      <rule id="Rule_s12_3"><description>Within the limit: release to pricing.</description><inputEntry id="InputEntry_s12_3_1"><text>false</text></inputEntry><inputEntry id="InputEntry_s12_3_2"><text>-</text></inputEntry><inputEntry id="InputEntry_s12_3_3"><text>-</text></inputEntry><outputEntry id="OutputEntry_s12_3"><text>&quot;Step 14&quot;</text></outputEntry><annotationEntry><text>Rule 3: Over credit limit: no goes to Step 14: Applies the customer&apos;s contract pricing to the order lines</text></annotationEntry></rule>
    </decisionTable>
  </decision>
  <inputData id="InputData_s12_1" name="overCreditLimit" label="Over credit limit"><variable id="InputDataVariable_s12_1" name="overCreditLimit" typeRef="boolean"/></inputData>
  <inputData id="InputData_s12_2" name="customerType" label="Customer type"><variable id="InputDataVariable_s12_2" name="customerType" typeRef="string"/></inputData>
  <inputData id="InputData_s12_3" name="orderValue" label="Order value"><variable id="InputDataVariable_s12_3" name="orderValue" typeRef="number"/></inputData>
  <decision id="Decision_s26" name="Express or standard freight">
    <description>Rule table for step 26 of Specimen: warehouse receiving to dispatch: Decide whether the order goes express or standard from the promised date.. Hit policy unique. 3 rules. Default route: Step 27. Source: Freight booking guide (specimen). Rule owner: Logistics manager. Effective: 1 July.</description>
    <variable id="Variable_s26" name="Express or standard freight" typeRef="string"/>
    <informationRequirement id="InformationRequirement_s26_1"><requiredInput href="#InputData_s26_1"/></informationRequirement>
    <informationRequirement id="InformationRequirement_s26_2"><requiredInput href="#InputData_s26_2"/></informationRequirement>
    <usingProcess href="specimen-rules-as-is.bpmn#Process_1"/>
    <usingTask href="specimen-rules-as-is.bpmn#Task_s26"/>
    <decisionTable id="DecisionTable_s26" hitPolicy="UNIQUE" outputLabel="Route">
      <input id="Input_s26_1" label="Days to promised date"><inputExpression id="InputExpression_s26_1" typeRef="number"><text>daysToPromisedDate</text></inputExpression></input>
      <input id="Input_s26_2" label="Order weight kg"><inputExpression id="InputExpression_s26_2" typeRef="number"><text>orderWeightKg</text></inputExpression></input>
      <output id="Output_s26" label="Route" name="route" typeRef="string"><outputValues id="OutputValues_s26"><text>&quot;Step 27&quot;,&quot;Step 28&quot;,&quot;Pallet freight booking&quot;</text></outputValues><defaultOutputEntry id="DefaultOutputEntry_s26"><text>&quot;Step 27&quot;</text></defaultOutputEntry></output>
      <annotation name="Rule"/>
      <rule id="Rule_s26_1"><description>Under two days: air freight, which the logistics manager approves.</description><inputEntry id="InputEntry_s26_1_1"><text>&lt; 2</text></inputEntry><inputEntry id="InputEntry_s26_1_2"><text>-</text></inputEntry><outputEntry id="OutputEntry_s26_1"><text>&quot;Step 27&quot;</text></outputEntry><annotationEntry><text>Rule 1: Days to promised date &lt; 2 goes to Next step (step 27)</text></annotationEntry></rule>
      <rule id="Rule_s26_2"><description>Two days or more and light: standard parcel.</description><inputEntry id="InputEntry_s26_2_1"><text>&gt;= 2</text></inputEntry><inputEntry id="InputEntry_s26_2_2"><text>&lt;= 30</text></inputEntry><outputEntry id="OutputEntry_s26_2"><text>&quot;Step 28&quot;</text></outputEntry><annotationEntry><text>Rule 2: Days to promised date ≥ 2 and Order weight kg ≤ 30 goes to Step 28: Sort out the Friday stuff for the big account.</text></annotationEntry></rule>
      <rule id="Rule_s26_3"><description>Two days or more and heavy: book pallet freight.</description><inputEntry id="InputEntry_s26_3_1"><text>&gt;= 2</text></inputEntry><inputEntry id="InputEntry_s26_3_2"><text>&gt; 30</text></inputEntry><outputEntry id="OutputEntry_s26_3"><text>&quot;Pallet freight booking&quot;</text></outputEntry><annotationEntry><text>Rule 3: Days to promised date ≥ 2 and Order weight kg &gt; 30 goes to Route: Pallet freight booking</text></annotationEntry></rule>
    </decisionTable>
  </decision>
  <inputData id="InputData_s26_1" name="daysToPromisedDate" label="Days to promised date"><variable id="InputDataVariable_s26_1" name="daysToPromisedDate" typeRef="number"/></inputData>
  <inputData id="InputData_s26_2" name="orderWeightKg" label="Order weight kg"><variable id="InputDataVariable_s26_2" name="orderWeightKg" typeRef="number"/></inputData>
  <dmndi:DMNDI>
    <dmndi:DMNDiagram id="DMNDiagram_1" name="Specimen: warehouse receiving to dispatch, business rules">
      <dmndi:DMNShape id="DMNShape_Decision_s12" dmnElementRef="Decision_s12"><dc:Bounds x="235" y="80" width="180" height="80"/></dmndi:DMNShape>
      <dmndi:DMNShape id="DMNShape_InputData_s12_1" dmnElementRef="InputData_s12_1"><dc:Bounds x="50" y="260" width="170" height="45"/></dmndi:DMNShape>
      <dmndi:DMNEdge id="DMNEdge_s12_1" dmnElementRef="InformationRequirement_s12_1"><di:waypoint x="135" y="260"/><di:waypoint x="325" y="160"/></dmndi:DMNEdge>
      <dmndi:DMNShape id="DMNShape_InputData_s12_2" dmnElementRef="InputData_s12_2"><dc:Bounds x="240" y="260" width="170" height="45"/></dmndi:DMNShape>
      <dmndi:DMNEdge id="DMNEdge_s12_2" dmnElementRef="InformationRequirement_s12_2"><di:waypoint x="325" y="260"/><di:waypoint x="325" y="160"/></dmndi:DMNEdge>
      <dmndi:DMNShape id="DMNShape_InputData_s12_3" dmnElementRef="InputData_s12_3"><dc:Bounds x="430" y="260" width="170" height="45"/></dmndi:DMNShape>
      <dmndi:DMNEdge id="DMNEdge_s12_3" dmnElementRef="InformationRequirement_s12_3"><di:waypoint x="515" y="260"/><di:waypoint x="325" y="160"/></dmndi:DMNEdge>
      <dmndi:DMNShape id="DMNShape_Decision_s26" dmnElementRef="Decision_s26"><dc:Bounds x="770" y="80" width="180" height="80"/></dmndi:DMNShape>
      <dmndi:DMNShape id="DMNShape_InputData_s26_1" dmnElementRef="InputData_s26_1"><dc:Bounds x="680" y="260" width="170" height="45"/></dmndi:DMNShape>
      <dmndi:DMNEdge id="DMNEdge_s26_1" dmnElementRef="InformationRequirement_s26_1"><di:waypoint x="765" y="260"/><di:waypoint x="860" y="160"/></dmndi:DMNEdge>
      <dmndi:DMNShape id="DMNShape_InputData_s26_2" dmnElementRef="InputData_s26_2"><dc:Bounds x="870" y="260" width="170" height="45"/></dmndi:DMNShape>
      <dmndi:DMNEdge id="DMNEdge_s26_2" dmnElementRef="InformationRequirement_s26_2"><di:waypoint x="955" y="260"/><di:waypoint x="860" y="160"/></dmndi:DMNEdge>
    </dmndi:DMNDiagram>
  </dmndi:DMNDI>
</definitions>
