forked from camunda/camunda-bpm-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
check-order.dmn
85 lines (85 loc) · 2.83 KB
/
check-order.dmn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/DMN/20151101/dmn.xsd"
id="definitions"
name="definitions"
namespace="http://camunda.org/schema/1.0/dmn">
<decision id="checkOrder" name="Check Order">
<decisionTable id="decisionTable">
<input id="input1" label="Customer Status">
<inputExpression id="inputExpression1" typeRef="string">
<text>status</text>
</inputExpression>
<inputValues id="inputValues">
<text>"bronze","silver","gold"</text>
</inputValues>
</input>
<input id="input2" label="Order Sum">
<inputExpression id="inputExpression2" typeRef="double">
<text>sum</text>
</inputExpression>
</input>
<output id="output1" label="Check Result" name="result" typeRef="string">
<outputValues id="outputValues">
<text>"ok","notok"</text>
</outputValues>
</output>
<output id="output2" label="Reason" name="reason" typeRef="string" />
<rule id="rule1">
<inputEntry id="inputEntry1">
<text>"bronze"</text>
</inputEntry>
<inputEntry id="inputEntry2">
<text/>
</inputEntry>
<outputEntry id="outputEntry1">
<text>"notok"</text>
</outputEntry>
<outputEntry id="outputEntry2">
<text><![CDATA["work on your status first, as bronze you're not going to get anything"]]></text>
</outputEntry>
</rule>
<rule id="rule2">
<inputEntry id="inputEntry3">
<text>"silver"</text>
</inputEntry>
<inputEntry id="inputEntry4">
<text><![CDATA[< 1000]]></text>
</inputEntry>
<outputEntry id="outputEntry3">
<text>"ok"</text>
</outputEntry>
<outputEntry id="outputEntry4">
<text>"you little fish will get what you want"</text>
</outputEntry>
</rule>
<rule id="rule3">
<inputEntry id="inputEntry5">
<text>"silver"</text>
</inputEntry>
<inputEntry id="inputEntry6">
<text><![CDATA[>= 1000]]></text>
</inputEntry>
<outputEntry id="outputEntry5">
<text>"notok"</text>
</outputEntry>
<outputEntry id="outputEntry6">
<text>"you took too much man, you took too much!"</text>
</outputEntry>
</rule>
<rule id="rule4">
<inputEntry id="inputEntry7">
<text>"gold"</text>
</inputEntry>
<inputEntry id="inputEntry8">
<text/>
</inputEntry>
<outputEntry id="outputEntry7">
<text>"ok"</text>
</outputEntry>
<outputEntry id="outputEntry8">
<text>"you get anything you want"</text>
</outputEntry>
</rule>
</decisionTable>
</decision>
</definitions>