-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
loan-granting.bpmn
207 lines (207 loc) · 11.2 KB
/
loan-granting.bpmn
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.6.0">
<bpmn:process id="loan_process" name="Granting Loans" isExecutable="true" camunda:historyTimeToLive="P180D">
<bpmn:sequenceFlow id="SequenceFlow_0nww3wx" sourceRef="StartEvent_1" targetRef="Task_1lvjtd4" />
<bpmn:serviceTask id="Task_1lvjtd4" name="Check credit score" camunda:type="external" camunda:topic="creditScoreChecker">
<bpmn:extensionElements>
<camunda:inputOutput>
<camunda:inputParameter name="Input_2rvtuu9">
<camunda:script scriptFormat="javascript">execution.setVariable("defaultScore", 5);</camunda:script>
</camunda:inputParameter>
</camunda:inputOutput>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0nww3wx</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_12biatx</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:subProcess id="SubProcess_16kr5xn" name="Decide if a loan is granted">
<bpmn:incoming>SequenceFlow_12biatx</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1pbe3dr</bpmn:outgoing>
<bpmn:multiInstanceLoopCharacteristics camunda:collection="${creditScores}" camunda:elementVariable="score" />
<bpmn:exclusiveGateway id="ExclusiveGateway_12xhuxz">
<bpmn:incoming>SequenceFlow_04c54bl</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_17zmvol</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_0vpum3q</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:endEvent id="EndEvent_1alwvtl">
<bpmn:incoming>SequenceFlow_0crpu1y</bpmn:incoming>
</bpmn:endEvent>
<bpmn:endEvent id="EndEvent_0zj88y0">
<bpmn:incoming>SequenceFlow_1p8qb0a</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_17zmvol" name="good score" sourceRef="ExclusiveGateway_12xhuxz" targetRef="Task_0v4gadf">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${score > 5}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_0vpum3q" name="bad score" sourceRef="ExclusiveGateway_12xhuxz" targetRef="Task_0j0sjlk">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${score <= 5}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_0crpu1y" sourceRef="Task_0v4gadf" targetRef="EndEvent_1alwvtl" />
<bpmn:sequenceFlow id="SequenceFlow_1p8qb0a" sourceRef="Task_0j0sjlk" targetRef="EndEvent_0zj88y0" />
<bpmn:startEvent id="StartEvent_01840xx">
<bpmn:outgoing>SequenceFlow_04c54bl</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="SequenceFlow_04c54bl" sourceRef="StartEvent_01840xx" targetRef="ExclusiveGateway_12xhuxz" />
<bpmn:serviceTask id="Task_0v4gadf" name="Grant loan" camunda:type="external" camunda:topic="loanGranter">
<bpmn:incoming>SequenceFlow_17zmvol</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0crpu1y</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="Task_0j0sjlk" name="Reject loan request" camunda:type="external" camunda:topic="requestRejecter">
<bpmn:incoming>SequenceFlow_0vpum3q</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1p8qb0a</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:textAnnotation id="TextAnnotation_0u1nkri">
<bpmn:text>Topic name: loanGranter</bpmn:text>
</bpmn:textAnnotation>
<bpmn:association id="Association_1v9v6fl" sourceRef="Task_0v4gadf" targetRef="TextAnnotation_0u1nkri" />
<bpmn:textAnnotation id="TextAnnotation_0qjs0yj">
<bpmn:text>Topic name: requestRejecter</bpmn:text>
</bpmn:textAnnotation>
<bpmn:association id="Association_1gskhvh" sourceRef="Task_0j0sjlk" targetRef="TextAnnotation_0qjs0yj" />
</bpmn:subProcess>
<bpmn:endEvent id="EndEvent_0q9wl5o">
<bpmn:incoming>SequenceFlow_1pbe3dr</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_1pbe3dr" sourceRef="SubProcess_16kr5xn" targetRef="EndEvent_0q9wl5o" />
<bpmn:sequenceFlow id="SequenceFlow_12biatx" sourceRef="Task_1lvjtd4" targetRef="SubProcess_16kr5xn" />
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>SequenceFlow_0nww3wx</bpmn:outgoing>
<bpmn:timerEventDefinition>
<bpmn:timeCycle xsi:type="bpmn:tFormalExpression">0/5 0/1 * 1/1 * ? *</bpmn:timeCycle>
</bpmn:timerEventDefinition>
</bpmn:startEvent>
<bpmn:textAnnotation id="TextAnnotation_0k1pblj">
<bpmn:text>Topic name: creditScoreChecker</bpmn:text>
</bpmn:textAnnotation>
<bpmn:association id="Association_0rosxy5" sourceRef="Task_1lvjtd4" targetRef="TextAnnotation_0k1pblj" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="loan_process">
<bpmndi:BPMNEdge id="SequenceFlow_12biatx_di" bpmnElement="SequenceFlow_12biatx">
<di:waypoint x="334" y="276" />
<di:waypoint x="384" y="276" />
<bpmndi:BPMNLabel>
<dc:Bounds x="494" y="254.5" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1pbe3dr_di" bpmnElement="SequenceFlow_1pbe3dr">
<di:waypoint x="914" y="279" />
<di:waypoint x="968" y="279" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1076" y="257.5" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0nww3wx_di" bpmnElement="SequenceFlow_0nww3wx">
<di:waypoint x="188" y="280" />
<di:waypoint x="234" y="279" />
<bpmndi:BPMNLabel>
<dc:Bounds x="346" y="258" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0xcwm5l_di" bpmnElement="Task_1lvjtd4">
<dc:Bounds x="234" y="239" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="SubProcess_16kr5xn_di" bpmnElement="SubProcess_16kr5xn" isExpanded="true">
<dc:Bounds x="384" y="81" width="530" height="384" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_04c54bl_di" bpmnElement="SequenceFlow_04c54bl">
<di:waypoint x="457" y="276" />
<di:waypoint x="498" y="276" />
<bpmndi:BPMNLabel>
<dc:Bounds x="612.5" y="254.5" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1p8qb0a_di" bpmnElement="SequenceFlow_1p8qb0a">
<di:waypoint x="749" y="342" />
<di:waypoint x="830" y="342" />
<bpmndi:BPMNLabel>
<dc:Bounds x="925" y="321" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0crpu1y_di" bpmnElement="SequenceFlow_0crpu1y">
<di:waypoint x="749" y="207" />
<di:waypoint x="830" y="207" />
<bpmndi:BPMNLabel>
<dc:Bounds x="925" y="186" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0vpum3q_di" bpmnElement="SequenceFlow_0vpum3q">
<di:waypoint x="523" y="301" />
<di:waypoint x="523" y="342" />
<di:waypoint x="649" y="342" />
<bpmndi:BPMNLabel>
<dc:Bounds x="553" y="346" width="49" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_17zmvol_di" bpmnElement="SequenceFlow_17zmvol">
<di:waypoint x="523" y="251" />
<di:waypoint x="523" y="207" />
<di:waypoint x="649" y="207" />
<bpmndi:BPMNLabel>
<dc:Bounds x="545" y="186" width="55" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_12xhuxz_di" bpmnElement="ExclusiveGateway_12xhuxz" isMarkerVisible="true">
<dc:Bounds x="498" y="251" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="738" y="269" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_1alwvtl_di" bpmnElement="EndEvent_1alwvtl">
<dc:Bounds x="830" y="189" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="983" y="228" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_0zj88y0_di" bpmnElement="EndEvent_0zj88y0">
<dc:Bounds x="830" y="324" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="983" y="363" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="StartEvent_01840xx_di" bpmnElement="StartEvent_01840xx">
<dc:Bounds x="421" y="258" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="574" y="297" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_06na61t_di" bpmnElement="Task_0v4gadf">
<dc:Bounds x="649" y="167" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_0i8ohao_di" bpmnElement="Task_0j0sjlk">
<dc:Bounds x="649" y="302" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="TextAnnotation_0u1nkri_di" bpmnElement="TextAnnotation_0u1nkri">
<dc:Bounds x="618" y="119" width="161" height="28" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="TextAnnotation_0qjs0yj_di" bpmnElement="TextAnnotation_0qjs0yj">
<dc:Bounds x="631" y="400" width="171" height="30" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Association_1v9v6fl_di" bpmnElement="Association_1v9v6fl">
<di:waypoint x="699" y="167" />
<di:waypoint x="699" y="147" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_0q9wl5o_di" bpmnElement="EndEvent_0q9wl5o">
<dc:Bounds x="968" y="261" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1121" y="308" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="StartEvent_0s4wasg_di" bpmnElement="StartEvent_1">
<dc:Bounds x="152" y="262" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="260" y="306" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="TextAnnotation_0k1pblj_di" bpmnElement="TextAnnotation_0k1pblj">
<dc:Bounds x="190" y="180" width="187" height="28" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Association_0rosxy5_di" bpmnElement="Association_0rosxy5">
<di:waypoint x="284" y="239" />
<di:waypoint x="284" y="208" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Association_1gskhvh_di" bpmnElement="Association_1gskhvh">
<di:waypoint x="699" y="382" />
<di:waypoint x="699" y="400" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>