Skip to content

Instantly share code, notes, and snippets.

@mengwong
Created April 6, 2020 15:57
Show Gist options
  • Save mengwong/07b3ef4c03e0884f2ae2440a8bbe19a7 to your computer and use it in GitHub Desktop.
Save mengwong/07b3ef4c03e0884f2ae2440a8bbe19a7 to your computer and use it in GitHub Desktop.
Resilience & Solidarity Budget, as DMN
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:camunda="http://camunda.org/schema/1.0/dmn" 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_0t62h4q" name="SG&#39;s Resilience &#38; Solidarity Budget" namespace="http://camunda.org/schema/1.0/dmn" exporter="dmn-js (https://demo.bpmn.io/dmn)" exporterVersion="8.2.0">
<decision id="decision_13ddh8x" name="Wealth-Based">
<informationRequirement id="InformationRequirement_0gmit98">
<requiredInput href="#InputData_0l1r2fx" />
</informationRequirement>
<informationRequirement id="InformationRequirement_0p71qyg">
<requiredInput href="#InputData_06zht3h" />
</informationRequirement>
<decisionTable id="decisionTable_0b71773">
<input id="InputClause_1db6xvr" label="2019 income" camunda:inputVariable="2019 income">
<inputExpression id="LiteralExpression_0hnqcsa" typeRef="integer">
<text></text>
</inputExpression>
</input>
<input id="InputClause_0sivywl" label="properties" camunda:inputVariable="properties owned">
<inputExpression id="LiteralExpression_09qwiab" typeRef="integer">
<text></text>
</inputExpression>
</input>
<output id="output1" label="April 2020 payout" name="april 2020 payout" typeRef="integer" />
<output id="OutputClause_0vy8nj3" label="June 2020 Payout" name="june 2020 payout" typeRef="integer" />
<rule id="DecisionRule_1rwc1ja">
<inputEntry id="UnaryTests_0min45l">
<text>&lt;28000</text>
</inputEntry>
<inputEntry id="UnaryTests_1ovuay4">
<text>&lt;= 1</text>
</inputEntry>
<outputEntry id="LiteralExpression_0s5x0km">
<text>600</text>
</outputEntry>
<outputEntry id="LiteralExpression_13joqc0">
<text>600</text>
</outputEntry>
</rule>
<rule id="DecisionRule_02glbut">
<inputEntry id="UnaryTests_1sau1bo">
<text>&lt;100000</text>
</inputEntry>
<inputEntry id="UnaryTests_1aa9b0o">
<text>&lt;= 1</text>
</inputEntry>
<outputEntry id="LiteralExpression_1oc8x42">
<text>600</text>
</outputEntry>
<outputEntry id="LiteralExpression_0kdwso0">
<text>300</text>
</outputEntry>
</rule>
<rule id="DecisionRule_1hosubs">
<inputEntry id="UnaryTests_1o9aw1k">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_1dnpbph">
<text></text>
</inputEntry>
<outputEntry id="LiteralExpression_1rr0kof">
<text>600</text>
</outputEntry>
<outputEntry id="LiteralExpression_03c7sw5">
<text>0</text>
</outputEntry>
</rule>
</decisionTable>
</decision>
<inputData id="InputData_1nj9a1d" name="elderly bonus" />
<inputData id="InputData_06zht3h" name="2019 income" />
<inputData id="InputData_0l1r2fx" name="properties owned" />
<inputData id="InputData_1c4k4s6" name="children" />
<decision id="Decision_0lrnhtg" name="Child-Based">
<variable id="InformationItem_07ig5ny" name="child bonus" typeRef="integer" />
<informationRequirement id="InformationRequirement_1vzup8m">
<requiredInput href="#InputData_1c4k4s6" />
</informationRequirement>
<literalExpression id="LiteralExpression_1mht8uc" expressionLanguage="feel">
<text>children.any.age &lt;= 20</text>
</literalExpression>
</decision>
<decision id="Decision_1lx2ciy" name="Age-Based">
<informationRequirement id="InformationRequirement_1b7fv1z">
<requiredDecision href="#decision_13ddh8x" />
</informationRequirement>
<informationRequirement id="InformationRequirement_0enx5e4">
<requiredInput href="#InputData_1nj9a1d" />
</informationRequirement>
<decisionTable id="DecisionTable_1ssosgz">
<input id="InputClause_1hapv7d" label="age" camunda:inputVariable="age">
<inputExpression id="LiteralExpression_12ze5k3" typeRef="integer" />
</input>
<input id="InputClause_15nin2x" label="Wealth Based" camunda:inputVariable="wealth based">
<inputExpression id="LiteralExpression_0wkkay3" typeRef="integer">
<text></text>
</inputExpression>
</input>
<input id="InputClause_0uul69f" label="Elderly Bonus" camunda:inputVariable="elderly bonus">
<inputExpression id="LiteralExpression_1eve8hl" typeRef="integer">
<text></text>
</inputExpression>
</input>
<output id="OutputClause_1ay7738" label="Age-Based" name="age based" typeRef="integer" />
<rule id="DecisionRule_1rq6wbj">
<inputEntry id="UnaryTests_10ne2ey">
<text>&lt; 21</text>
</inputEntry>
<inputEntry id="UnaryTests_1lmbkrt">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_1wp99bb">
<text></text>
</inputEntry>
<outputEntry id="LiteralExpression_14p82pe">
<text>0</text>
</outputEntry>
</rule>
<rule id="DecisionRule_0ky7eol">
<inputEntry id="UnaryTests_1v3natn">
<text>&gt; 50</text>
</inputEntry>
<inputEntry id="UnaryTests_0m3kfy0">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_1u3tf3n">
<text></text>
</inputEntry>
<outputEntry id="LiteralExpression_0sdhxej">
<text>wealth based + elderly bonus</text>
</outputEntry>
</rule>
<rule id="DecisionRule_19htt6p">
<inputEntry id="UnaryTests_1o5e9aw">
<text>&gt;= 21</text>
</inputEntry>
<inputEntry id="UnaryTests_11f7y0u">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_02g4cqj">
<text></text>
</inputEntry>
<outputEntry id="LiteralExpression_0to1ns8">
<text>wealth based</text>
</outputEntry>
</rule>
<rule id="DecisionRule_0rz55ov">
<inputEntry id="UnaryTests_0r0zmcz">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_0di9mj5">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_0ic9ihg">
<text></text>
</inputEntry>
<outputEntry id="LiteralExpression_05bpn9n">
<text></text>
</outputEntry>
</rule>
</decisionTable>
</decision>
<decision id="Decision_160vxz2" name="Total">
<variable id="InformationItem_0rzsoth" name="total" typeRef="integer" />
<informationRequirement id="InformationRequirement_0eku6i6">
<requiredDecision href="#Decision_0lrnhtg" />
</informationRequirement>
<informationRequirement id="InformationRequirement_1kfalpy">
<requiredDecision href="#Decision_1lx2ciy" />
</informationRequirement>
<literalExpression id="LiteralExpression_1gincd6" expressionLanguage="feel">
<text>Age-Based + Child-Based</text>
</literalExpression>
</decision>
<dmndi:DMNDI>
<dmndi:DMNDiagram id="DMNDiagram_1afd47n">
<dmndi:DMNShape id="DMNShape_107jkvp" dmnElementRef="decision_13ddh8x">
<dc:Bounds height="80" width="180" x="310" y="150" />
</dmndi:DMNShape>
<dmndi:DMNShape id="DMNShape_1bmhid1" dmnElementRef="InputData_1nj9a1d">
<dc:Bounds height="45" width="125" x="138" y="317" />
</dmndi:DMNShape>
<dmndi:DMNShape id="DMNShape_1gg83eq" dmnElementRef="InputData_06zht3h">
<dc:Bounds height="45" width="125" x="138" y="168" />
</dmndi:DMNShape>
<dmndi:DMNShape id="DMNShape_1tgzol9" dmnElementRef="InputData_0l1r2fx">
<dc:Bounds height="45" width="125" x="338" y="58" />
</dmndi:DMNShape>
<dmndi:DMNEdge id="DMNEdge_1whmahz" dmnElementRef="InformationRequirement_0gmit98">
<di:waypoint x="401" y="103" />
<di:waypoint x="400" y="150" />
</dmndi:DMNEdge>
<dmndi:DMNEdge id="DMNEdge_0ouqlks" dmnElementRef="InformationRequirement_0p71qyg">
<di:waypoint x="263" y="191" />
<di:waypoint x="310" y="190" />
</dmndi:DMNEdge>
<dmndi:DMNShape id="DMNShape_05cgziy" dmnElementRef="InputData_1c4k4s6">
<dc:Bounds height="45" width="125" x="139" y="478" />
</dmndi:DMNShape>
<dmndi:DMNEdge id="DMNEdge_0qbk5w4" dmnElementRef="InformationRequirement_1vzup8m">
<di:waypoint x="264" y="501" />
<di:waypoint x="310" y="500" />
</dmndi:DMNEdge>
<dmndi:DMNShape id="DMNShape_0l623r2" dmnElementRef="Decision_0lrnhtg">
<dc:Bounds height="80" width="180" x="310" y="460" />
</dmndi:DMNShape>
<dmndi:DMNShape id="DMNShape_1vi6m06" dmnElementRef="Decision_1lx2ciy">
<dc:Bounds height="80" width="180" x="650" y="300" />
</dmndi:DMNShape>
<dmndi:DMNEdge id="DMNEdge_1xlkftn" dmnElementRef="InformationRequirement_1b7fv1z">
<di:waypoint x="480" y="230" />
<di:waypoint x="650" y="315" />
</dmndi:DMNEdge>
<dmndi:DMNEdge id="DMNEdge_1saxbem" dmnElementRef="InformationRequirement_0enx5e4">
<di:waypoint x="263" y="340" />
<di:waypoint x="650" y="340" />
</dmndi:DMNEdge>
<dmndi:DMNEdge id="DMNEdge_1xbusxz" dmnElementRef="InformationRequirement_0eku6i6">
<di:waypoint x="490" y="500" />
<di:waypoint x="650" y="500" />
</dmndi:DMNEdge>
<dmndi:DMNEdge id="DMNEdge_0msr2d1" dmnElementRef="InformationRequirement_1kfalpy">
<di:waypoint x="740" y="380" />
<di:waypoint x="740" y="461" />
</dmndi:DMNEdge>
<dmndi:DMNShape id="DMNShape_1ujtc0c" dmnElementRef="Decision_160vxz2">
<dc:Bounds height="80" width="180" x="650" y="461" />
</dmndi:DMNShape>
</dmndi:DMNDiagram>
</dmndi:DMNDI>
</definitions>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment