Skip to content

Instantly share code, notes, and snippets.

@ptahchiev
Created December 19, 2019 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ptahchiev/d4ab0fa3e10d03571902d6252deabccf to your computer and use it in GitHub Desktop.
Save ptahchiev/d4ab0fa3e10d03571902d6252deabccf to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="cashback" name="Cashback points"
namespace="https://www.drools.org/kie-dmn"
xmlns="http://www.omg.org/spec/DMN/20151101/dmn.xsd"
xmlns:kie="https://www.drools.org/kie-dmn"
xmlns:feel="http://www.omg.org/spec/FEEL/20140401"
xmlns:biodi="http://bpmn.io/schema/dmn/biodi/1.0">
<inputData id="InputData_1jm0c5f" name="Order Total">
<extensionElements>
<biodi:bounds x="-412" y="414" width="125" height="45" />
</extensionElements>
</inputData>
<decision id="CreditAccountCalculator" name="Calculate Credit Account Points">
<extensionElements>
<biodi:bounds x="-300" y="167" width="180" height="80" />
<biodi:edge source="InputData_1jm0c5f">
<biodi:waypoints x="-340" y="414" />
<biodi:waypoints x="-272" y="247" />
</biodi:edge>
<biodi:edge source="InputData_08byps2">
<biodi:waypoints x="-96" y="416" />
<biodi:waypoints x="-167" y="247" />
</biodi:edge>
</extensionElements>
<informationRequirement>
<requiredInput href="#InputData_1jm0c5f" />
</informationRequirement>
<informationRequirement>
<requiredInput href="#InputData_08byps2" />
</informationRequirement>
<decisionTable id="DecisionTable_1p06dw4">
<input id="InputClause_1dlkonz" label="Order Total">
<inputExpression id="LiteralExpression_1kopktw" typeRef="double">
<text>orderTotal</text>
</inputExpression>
</input>
<input id="InputClause_0oz9z0t" label="Number Of Orders">
<inputExpression id="LiteralExpression_0exn5iz" typeRef="long">
<text>numberOfOrders</text>
</inputExpression>
</input>
<output id="OutputClause_13dpjqo" label="Credit Account" typeRef="long" />
<rule id="DecisionRule_1606k40">
<inputEntry id="UnaryTests_04rsutp">
<text>[0..100]</text>
</inputEntry>
<inputEntry id="UnaryTests_156roxi">
<text>0</text>
</inputEntry>
<outputEntry id="LiteralExpression_0v7msol">
<text>10</text>
</outputEntry>
</rule>
<rule id="DecisionRule_19jje7u">
<inputEntry id="UnaryTests_173vwr9">
<text>[0..100]</text>
</inputEntry>
<inputEntry id="UnaryTests_1gm76uk">
<text>[1..3]</text>
</inputEntry>
<outputEntry id="LiteralExpression_0hm4wda">
<text>20</text>
</outputEntry>
</rule>
<rule id="DecisionRule_1alcbwt">
<inputEntry id="UnaryTests_0blmfg0">
<text>[0..100]</text>
</inputEntry>
<inputEntry id="UnaryTests_1u4do13">
<text>&gt;3</text>
</inputEntry>
<outputEntry id="LiteralExpression_1nhkjte">
<text>30</text>
</outputEntry>
</rule>
<rule id="DecisionRule_05tcrl9">
<inputEntry id="UnaryTests_1mijul3">
<text>[100..500]</text>
</inputEntry>
<inputEntry id="UnaryTests_0glzzfz">
<text>0</text>
</inputEntry>
<outputEntry id="LiteralExpression_0q0i8r7">
<text>20</text>
</outputEntry>
</rule>
<rule id="DecisionRule_158crwl">
<inputEntry id="UnaryTests_1s35whp">
<text>[100..500]</text>
</inputEntry>
<inputEntry id="UnaryTests_10589q8">
<text>[1..3]</text>
</inputEntry>
<outputEntry id="LiteralExpression_0w5284n">
<text>40</text>
</outputEntry>
</rule>
<rule id="DecisionRule_16akr3x">
<inputEntry id="UnaryTests_05t4npa">
<text>[100..500]</text>
</inputEntry>
<inputEntry id="UnaryTests_08ca8e2">
<text>&gt;3</text>
</inputEntry>
<outputEntry id="LiteralExpression_1qamz8q">
<text>50</text>
</outputEntry>
</rule>
<rule id="DecisionRule_0tcnm88">
<inputEntry id="UnaryTests_1cgg9gx">
<text>&gt;500</text>
</inputEntry>
<inputEntry id="UnaryTests_0aor20a">
<text>0</text>
</inputEntry>
<outputEntry id="LiteralExpression_1pwdlnd">
<text>30</text>
</outputEntry>
</rule>
<rule id="DecisionRule_0skpxks">
<inputEntry id="UnaryTests_0zlnu3x">
<text>&gt;500</text>
</inputEntry>
<inputEntry id="UnaryTests_16qws3k">
<text>[1..3]</text>
</inputEntry>
<outputEntry id="LiteralExpression_0qqa7cv">
<text>50</text>
</outputEntry>
</rule>
<rule id="DecisionRule_1jw088q">
<inputEntry id="UnaryTests_0ignud1">
<text>&gt;500</text>
</inputEntry>
<inputEntry id="UnaryTests_09nvgv3">
<text>&gt;3</text>
</inputEntry>
<outputEntry id="LiteralExpression_0t0c6i9">
<text>100</text>
</outputEntry>
</rule>
</decisionTable>
</decision>
<inputData id="InputData_08byps2" name="Number Of Orders">
<extensionElements>
<biodi:bounds x="-149" y="416" width="125" height="45" />
</extensionElements>
</inputData>
</definitions>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment