xref: /plugin/bpmnio/test/data/dmn-test.txt (revision 43854469855b0d3261173416b47cbad6e62bc444)
1*43854469SJaap de Haan====== DMN Plugin Test Page ======
2*43854469SJaap de Haan
3*43854469SJaap de HaanThis page tests the DMN.io plugin functionality.
4*43854469SJaap de Haan
5*43854469SJaap de Haan===== Simple DMN Decision Table =====
6*43854469SJaap de Haan
7*43854469SJaap de Haan<bpmnio type="dmn">
8*43854469SJaap de Haan<?xml version="1.0" encoding="UTF-8"?>
9*43854469SJaap de Haan<definitions
10*43854469SJaap de Haan    xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/"
11*43854469SJaap de Haan    xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/"
12*43854469SJaap de Haan    xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/"
13*43854469SJaap de Haan    xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"
14*43854469SJaap de Haan    namespace="http://camunda.org/schema/1.0/dmn"
15*43854469SJaap de Haan    exporter="dmn-js (https://demo.bpmn.io/dmn)"
16*43854469SJaap de Haan    exporterVersion="17.0.2"
17*43854469SJaap de Haan    name="Add a DMN diagram">
18*43854469SJaap de Haan  <inputData id="dayType_id" name="Type of day">
19*43854469SJaap de Haan    <variable id="dayType_ii" name="Type of day" typeRef="string" />
20*43854469SJaap de Haan  </inputData>
21*43854469SJaap de Haan  <inputData id="temperature_id" name="Weather in Celsius">
22*43854469SJaap de Haan    <variable id="temperature_ii" name="Weather in Celsius" typeRef="number" />
23*43854469SJaap de Haan  </inputData>
24*43854469SJaap de Haan  <knowledgeSource id="host_ks" name="Host" />
25*43854469SJaap de Haan  <knowledgeSource id="guest_ks" name="Guest Type">
26*43854469SJaap de Haan    <authorityRequirement id="AuthorityRequirement_0vkhray">
27*43854469SJaap de Haan      <requiredDecision href="#guestCount" />
28*43854469SJaap de Haan    </authorityRequirement>
29*43854469SJaap de Haan  </knowledgeSource>
30*43854469SJaap de Haan  <businessKnowledgeModel id="elMenu" name="El menú" />
31*43854469SJaap de Haan  <decision id="dish-decision" name="Dish Decision">
32*43854469SJaap de Haan    <informationRequirement id="InformationRequirement_1d56kg6">
33*43854469SJaap de Haan      <requiredDecision href="#guestCount" />
34*43854469SJaap de Haan    </informationRequirement>
35*43854469SJaap de Haan    <informationRequirement id="InformationRequirement_11onl5b">
36*43854469SJaap de Haan      <requiredDecision href="#season" />
37*43854469SJaap de Haan    </informationRequirement>
38*43854469SJaap de Haan    <authorityRequirement id="AuthorityRequirement_142y75e">
39*43854469SJaap de Haan      <requiredAuthority href="#host_ks" />
40*43854469SJaap de Haan    </authorityRequirement>
41*43854469SJaap de Haan    <decisionTable id="dishDecisionTable">
42*43854469SJaap de Haan      <input id="seasonInput" label="Season">
43*43854469SJaap de Haan        <inputExpression id="seasonInputExpression" typeRef="string">
44*43854469SJaap de Haan          <text>season</text>
45*43854469SJaap de Haan        </inputExpression>
46*43854469SJaap de Haan      </input>
47*43854469SJaap de Haan      <input id="guestCountInput" label="How many guests">
48*43854469SJaap de Haan        <inputExpression id="guestCountInputExpression" typeRef="number">
49*43854469SJaap de Haan          <text>guestCount</text>
50*43854469SJaap de Haan        </inputExpression>
51*43854469SJaap de Haan      </input>
52*43854469SJaap de Haan      <output id="output1" label="Dish" name="desiredDish" typeRef="string" />
53*43854469SJaap de Haan      <rule id="row-495762709-1">
54*43854469SJaap de Haan        <inputEntry id="UnaryTests_1nxcsjr">
55*43854469SJaap de Haan          <text>"Winter"</text>
56*43854469SJaap de Haan        </inputEntry>
57*43854469SJaap de Haan        <inputEntry id="UnaryTests_1r9yorj">
58*43854469SJaap de Haan          <text>&lt;= 8</text>
59*43854469SJaap de Haan        </inputEntry>
60*43854469SJaap de Haan        <outputEntry id="LiteralExpression_1mtwzqz">
61*43854469SJaap de Haan          <text>"Spareribs"</text>
62*43854469SJaap de Haan        </outputEntry>
63*43854469SJaap de Haan      </rule>
64*43854469SJaap de Haan      <rule id="row-495762709-2">
65*43854469SJaap de Haan        <inputEntry id="UnaryTests_1lxjbif">
66*43854469SJaap de Haan          <text>"Winter"</text>
67*43854469SJaap de Haan        </inputEntry>
68*43854469SJaap de Haan        <inputEntry id="UnaryTests_0nhiedb">
69*43854469SJaap de Haan          <text>&gt; 8</text>
70*43854469SJaap de Haan        </inputEntry>
71*43854469SJaap de Haan        <outputEntry id="LiteralExpression_1h30r12">
72*43854469SJaap de Haan          <text>"Pasta"</text>
73*43854469SJaap de Haan        </outputEntry>
74*43854469SJaap de Haan      </rule>
75*43854469SJaap de Haan      <rule id="row-495762709-3">
76*43854469SJaap de Haan        <inputEntry id="UnaryTests_0ifgmfm">
77*43854469SJaap de Haan          <text>"Summer"</text>
78*43854469SJaap de Haan        </inputEntry>
79*43854469SJaap de Haan        <inputEntry id="UnaryTests_12cib9m">
80*43854469SJaap de Haan          <text>&gt; 10</text>
81*43854469SJaap de Haan        </inputEntry>
82*43854469SJaap de Haan        <outputEntry id="LiteralExpression_0wgaegy">
83*43854469SJaap de Haan          <text>"Light salad"</text>
84*43854469SJaap de Haan        </outputEntry>
85*43854469SJaap de Haan      </rule>
86*43854469SJaap de Haan      <rule id="row-495762709-7">
87*43854469SJaap de Haan        <inputEntry id="UnaryTests_0ozm9s7">
88*43854469SJaap de Haan          <text>"Summer"</text>
89*43854469SJaap de Haan        </inputEntry>
90*43854469SJaap de Haan        <inputEntry id="UnaryTests_0sesgov">
91*43854469SJaap de Haan          <text>&lt;= 10</text>
92*43854469SJaap de Haan        </inputEntry>
93*43854469SJaap de Haan        <outputEntry id="LiteralExpression_1dvc5x3">
94*43854469SJaap de Haan          <text>"Beans salad"</text>
95*43854469SJaap de Haan        </outputEntry>
96*43854469SJaap de Haan      </rule>
97*43854469SJaap de Haan      <rule id="row-445981423-3">
98*43854469SJaap de Haan        <inputEntry id="UnaryTests_1er0je1">
99*43854469SJaap de Haan          <text>"Spring"</text>
100*43854469SJaap de Haan        </inputEntry>
101*43854469SJaap de Haan        <inputEntry id="UnaryTests_1uzqner">
102*43854469SJaap de Haan          <text>&lt; 10</text>
103*43854469SJaap de Haan        </inputEntry>
104*43854469SJaap de Haan        <outputEntry id="LiteralExpression_1pxy4g1">
105*43854469SJaap de Haan          <text>"Stew"</text>
106*43854469SJaap de Haan        </outputEntry>
107*43854469SJaap de Haan      </rule>
108*43854469SJaap de Haan      <rule id="row-445981423-4">
109*43854469SJaap de Haan        <inputEntry id="UnaryTests_06or48g">
110*43854469SJaap de Haan          <text>"Spring"</text>
111*43854469SJaap de Haan        </inputEntry>
112*43854469SJaap de Haan        <inputEntry id="UnaryTests_0wa71sy">
113*43854469SJaap de Haan          <text>&gt;= 10</text>
114*43854469SJaap de Haan        </inputEntry>
115*43854469SJaap de Haan        <outputEntry id="LiteralExpression_09ggol9">
116*43854469SJaap de Haan          <text>"Steak"</text>
117*43854469SJaap de Haan        </outputEntry>
118*43854469SJaap de Haan      </rule>
119*43854469SJaap de Haan    </decisionTable>
120*43854469SJaap de Haan  </decision>
121*43854469SJaap de Haan  <decision id="season" name="Season decision">
122*43854469SJaap de Haan    <informationRequirement id="InformationRequirement_1sdwefx">
123*43854469SJaap de Haan      <requiredInput href="#temperature_id" />
124*43854469SJaap de Haan    </informationRequirement>
125*43854469SJaap de Haan    <decisionTable id="seasonDecisionTable">
126*43854469SJaap de Haan      <input id="temperatureInput" label="Weather in Celsius">
127*43854469SJaap de Haan        <inputExpression id="temperatureInputExpression" typeRef="number">
128*43854469SJaap de Haan          <text>temperature</text>
129*43854469SJaap de Haan        </inputExpression>
130*43854469SJaap de Haan      </input>
131*43854469SJaap de Haan      <output id="seasonOutput" label="season" name="season" typeRef="string" />
132*43854469SJaap de Haan      <rule id="row-495762709-5">
133*43854469SJaap de Haan        <inputEntry id="UnaryTests_1fd0eqo">
134*43854469SJaap de Haan          <text>&gt;30</text>
135*43854469SJaap de Haan        </inputEntry>
136*43854469SJaap de Haan        <outputEntry id="LiteralExpression_0l98klb">
137*43854469SJaap de Haan          <text>"Summer"</text>
138*43854469SJaap de Haan        </outputEntry>
139*43854469SJaap de Haan      </rule>
140*43854469SJaap de Haan      <rule id="row-495762709-6">
141*43854469SJaap de Haan        <inputEntry id="UnaryTests_1nz6at2">
142*43854469SJaap de Haan          <text>&lt;10</text>
143*43854469SJaap de Haan        </inputEntry>
144*43854469SJaap de Haan        <outputEntry id="LiteralExpression_08moy1k">
145*43854469SJaap de Haan          <text>"Winter"</text>
146*43854469SJaap de Haan        </outputEntry>
147*43854469SJaap de Haan      </rule>
148*43854469SJaap de Haan      <rule id="row-445981423-2">
149*43854469SJaap de Haan        <inputEntry id="UnaryTests_1a0imxy">
150*43854469SJaap de Haan          <text>[10..30]</text>
151*43854469SJaap de Haan        </inputEntry>
152*43854469SJaap de Haan        <outputEntry id="LiteralExpression_1poftw4">
153*43854469SJaap de Haan          <text>"Spring"</text>
154*43854469SJaap de Haan        </outputEntry>
155*43854469SJaap de Haan      </rule>
156*43854469SJaap de Haan    </decisionTable>
157*43854469SJaap de Haan  </decision>
158*43854469SJaap de Haan  <decision id="guestCount" name="Guest Count">
159*43854469SJaap de Haan    <informationRequirement id="InformationRequirement_0j60f3j">
160*43854469SJaap de Haan      <requiredInput href="#dayType_id" />
161*43854469SJaap de Haan    </informationRequirement>
162*43854469SJaap de Haan    <knowledgeRequirement id="KnowledgeRequirement_0n56cqb">
163*43854469SJaap de Haan      <requiredKnowledge href="#elMenu" />
164*43854469SJaap de Haan    </knowledgeRequirement>
165*43854469SJaap de Haan    <decisionTable id="guestCountDecisionTable">
166*43854469SJaap de Haan      <input id="typeOfDayInput" label="Type of day">
167*43854469SJaap de Haan        <inputExpression id="typeOfDayInputExpression" typeRef="string">
168*43854469SJaap de Haan          <text>dayType</text>
169*43854469SJaap de Haan        </inputExpression>
170*43854469SJaap de Haan      </input>
171*43854469SJaap de Haan      <output id="guestCountOutput" label="Guest count" name="guestCount" typeRef="number" />
172*43854469SJaap de Haan      <rule id="row-495762709-8">
173*43854469SJaap de Haan        <inputEntry id="UnaryTests_0l72u8n">
174*43854469SJaap de Haan          <text>"Weekday"</text>
175*43854469SJaap de Haan        </inputEntry>
176*43854469SJaap de Haan        <outputEntry id="LiteralExpression_0wuwqaz">
177*43854469SJaap de Haan          <text>4</text>
178*43854469SJaap de Haan        </outputEntry>
179*43854469SJaap de Haan      </rule>
180*43854469SJaap de Haan      <rule id="row-495762709-9">
181*43854469SJaap de Haan        <inputEntry id="UnaryTests_03a73o9">
182*43854469SJaap de Haan          <text>"Holiday"</text>
183*43854469SJaap de Haan        </inputEntry>
184*43854469SJaap de Haan        <outputEntry id="LiteralExpression_1whn119">
185*43854469SJaap de Haan          <text>10</text>
186*43854469SJaap de Haan        </outputEntry>
187*43854469SJaap de Haan      </rule>
188*43854469SJaap de Haan      <rule id="row-495762709-10">
189*43854469SJaap de Haan        <inputEntry id="UnaryTests_12tygwt">
190*43854469SJaap de Haan          <text>"Weekend"</text>
191*43854469SJaap de Haan        </inputEntry>
192*43854469SJaap de Haan        <outputEntry id="LiteralExpression_1b5k9t8">
193*43854469SJaap de Haan          <text>15</text>
194*43854469SJaap de Haan        </outputEntry>
195*43854469SJaap de Haan      </rule>
196*43854469SJaap de Haan    </decisionTable>
197*43854469SJaap de Haan  </decision>
198*43854469SJaap de Haan  <textAnnotation id="TextAnnotation_1">
199*43854469SJaap de Haan    <text>Week day or week end</text>
200*43854469SJaap de Haan  </textAnnotation>
201*43854469SJaap de Haan  <association id="Association_18hoj4i">
202*43854469SJaap de Haan    <sourceRef href="#dayType_id" />
203*43854469SJaap de Haan    <targetRef href="#TextAnnotation_1" />
204*43854469SJaap de Haan  </association>
205*43854469SJaap de Haan  <dmndi:DMNDI>
206*43854469SJaap de Haan    <dmndi:DMNDiagram id="DMNDiagram_05sfxgt">
207*43854469SJaap de Haan      <dmndi:DMNShape id="DMNShape_1nkrqp5" dmnElementRef="dayType_id">
208*43854469SJaap de Haan        <dc:Bounds height="45" width="125" x="417" y="377" />
209*43854469SJaap de Haan      </dmndi:DMNShape>
210*43854469SJaap de Haan      <dmndi:DMNShape id="DMNShape_0wgwr3t" dmnElementRef="temperature_id">
211*43854469SJaap de Haan        <dc:Bounds height="45" width="125" x="188" y="377" />
212*43854469SJaap de Haan      </dmndi:DMNShape>
213*43854469SJaap de Haan      <dmndi:DMNShape id="DMNShape_17n98pm" dmnElementRef="host_ks">
214*43854469SJaap de Haan        <dc:Bounds height="63" width="100" x="646" y="48" />
215*43854469SJaap de Haan      </dmndi:DMNShape>
216*43854469SJaap de Haan      <dmndi:DMNShape id="DMNShape_1i9incu" dmnElementRef="guest_ks">
217*43854469SJaap de Haan        <dc:Bounds height="63" width="100" x="660" y="198" />
218*43854469SJaap de Haan      </dmndi:DMNShape>
219*43854469SJaap de Haan      <dmndi:DMNEdge id="DMNEdge_0tdfvdg" dmnElementRef="AuthorityRequirement_0vkhray">
220*43854469SJaap de Haan        <di:waypoint x="570" y="245" />
221*43854469SJaap de Haan        <di:waypoint x="660" y="235" />
222*43854469SJaap de Haan      </dmndi:DMNEdge>
223*43854469SJaap de Haan      <dmndi:DMNShape id="DMNShape_1uo50vq" dmnElementRef="elMenu">
224*43854469SJaap de Haan        <dc:Bounds height="46" width="135" x="642" y="307" />
225*43854469SJaap de Haan      </dmndi:DMNShape>
226*43854469SJaap de Haan      <dmndi:DMNShape id="DMNShape_0s7a8pk" dmnElementRef="dish-decision">
227*43854469SJaap de Haan        <dc:Bounds height="80" width="180" x="301" y="48" />
228*43854469SJaap de Haan      </dmndi:DMNShape>
229*43854469SJaap de Haan      <dmndi:DMNEdge id="DMNEdge_1cvfntf" dmnElementRef="InformationRequirement_1d56kg6">
230*43854469SJaap de Haan        <di:waypoint x="480" y="210" />
231*43854469SJaap de Haan        <di:waypoint x="421" y="148" />
232*43854469SJaap de Haan        <di:waypoint x="421" y="128" />
233*43854469SJaap de Haan      </dmndi:DMNEdge>
234*43854469SJaap de Haan      <dmndi:DMNEdge id="DMNEdge_0djoiii" dmnElementRef="InformationRequirement_11onl5b">
235*43854469SJaap de Haan        <di:waypoint x="251" y="210" />
236*43854469SJaap de Haan        <di:waypoint x="361" y="148" />
237*43854469SJaap de Haan        <di:waypoint x="361" y="128" />
238*43854469SJaap de Haan      </dmndi:DMNEdge>
239*43854469SJaap de Haan      <dmndi:DMNEdge id="DMNEdge_0qqxexx" dmnElementRef="AuthorityRequirement_142y75e">
240*43854469SJaap de Haan        <di:waypoint x="646" y="81" />
241*43854469SJaap de Haan        <di:waypoint x="481" y="86" />
242*43854469SJaap de Haan      </dmndi:DMNEdge>
243*43854469SJaap de Haan      <dmndi:DMNShape id="DMNShape_06z5z89" dmnElementRef="season">
244*43854469SJaap de Haan        <dc:Bounds height="80" width="180" x="161" y="210" />
245*43854469SJaap de Haan      </dmndi:DMNShape>
246*43854469SJaap de Haan      <dmndi:DMNEdge id="DMNEdge_1383eyj" dmnElementRef="InformationRequirement_1sdwefx">
247*43854469SJaap de Haan        <di:waypoint x="251" y="377" />
248*43854469SJaap de Haan        <di:waypoint x="251" y="310" />
249*43854469SJaap de Haan        <di:waypoint x="251" y="290" />
250*43854469SJaap de Haan      </dmndi:DMNEdge>
251*43854469SJaap de Haan      <dmndi:DMNShape id="DMNShape_0qbhe8q" dmnElementRef="guestCount">
252*43854469SJaap de Haan        <dc:Bounds height="80" width="180" x="390" y="210" />
253*43854469SJaap de Haan      </dmndi:DMNShape>
254*43854469SJaap de Haan      <dmndi:DMNEdge id="DMNEdge_131oa1j" dmnElementRef="KnowledgeRequirement_0n56cqb">
255*43854469SJaap de Haan        <di:waypoint x="691" y="307" />
256*43854469SJaap de Haan        <di:waypoint x="570" y="262" />
257*43854469SJaap de Haan      </dmndi:DMNEdge>
258*43854469SJaap de Haan      <dmndi:DMNEdge id="DMNEdge_1avtdb1" dmnElementRef="InformationRequirement_0j60f3j">
259*43854469SJaap de Haan        <di:waypoint x="480" y="377" />
260*43854469SJaap de Haan        <di:waypoint x="480" y="310" />
261*43854469SJaap de Haan        <di:waypoint x="480" y="290" />
262*43854469SJaap de Haan      </dmndi:DMNEdge>
263*43854469SJaap de Haan      <dmndi:DMNShape id="DMNShape_0bblyhb" dmnElementRef="TextAnnotation_1">
264*43854469SJaap de Haan        <dc:Bounds height="45" width="125" x="328" y="477" />
265*43854469SJaap de Haan      </dmndi:DMNShape>
266*43854469SJaap de Haan      <dmndi:DMNEdge id="DMNEdge_0aqnkob" dmnElementRef="Association_18hoj4i">
267*43854469SJaap de Haan        <di:waypoint x="480" y="422" />
268*43854469SJaap de Haan        <di:waypoint x="391" y="477" />
269*43854469SJaap de Haan      </dmndi:DMNEdge>
270*43854469SJaap de Haan    </dmndi:DMNDiagram>
271*43854469SJaap de Haan  </dmndi:DMNDI>
272*43854469SJaap de Haan</definitions>
273*43854469SJaap de Haan</bpmnio>
274*43854469SJaap de Haan===== Test Instructions =====
275*43854469SJaap de Haan
276*43854469SJaap de Haan1. The DMN decision table above should render using the dmn.io viewer
277*43854469SJaap de Haan2. You should be able to see the decision logic clearly
278*43854469SJaap de Haan3. The table should show input/output columns with rules