@logicflow/extension 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/README.md +16 -0
  2. package/dist/index.css +1 -1
  3. package/dist/index.min.js +1 -1
  4. package/dist/index.min.js.map +1 -1
  5. package/es/NodeResize/node/RectResize.d.ts +0 -6
  6. package/es/NodeResize/node/RectResize.js +2 -11
  7. package/es/bpmn-elements-adapter/json2xml.d.ts +2 -1
  8. package/es/bpmn-elements-adapter/json2xml.js +18 -4
  9. package/es/bpmn-elements-adapter/xml2json.js +2 -7
  10. package/es/components/control/index.d.ts +1 -0
  11. package/es/components/control/index.js +24 -11
  12. package/es/components/mini-map/index.js +1 -1
  13. package/es/dynamic-group/model.d.ts +2 -1
  14. package/es/dynamic-group/model.js +28 -11
  15. package/es/dynamic-group/node.js +1 -0
  16. package/es/index.css +1 -1
  17. package/es/index.d.ts +1 -0
  18. package/es/index.js +2 -0
  19. package/es/insert-node-in-polyline/index.js +11 -35
  20. package/es/materials/curved-edge/index.js +49 -21
  21. package/es/materials/group/GroupNode.d.ts +0 -6
  22. package/es/materials/group/GroupNode.js +1 -6
  23. package/es/pool/LaneModel.d.ts +90 -0
  24. package/es/pool/LaneModel.js +252 -0
  25. package/es/pool/LaneView.d.ts +40 -0
  26. package/es/pool/LaneView.js +202 -0
  27. package/es/pool/PoolModel.d.ts +120 -0
  28. package/es/pool/PoolModel.js +586 -0
  29. package/es/pool/PoolView.d.ts +17 -0
  30. package/es/pool/PoolView.js +76 -0
  31. package/es/pool/constant.d.ts +15 -0
  32. package/es/pool/constant.js +17 -0
  33. package/es/pool/index.d.ts +89 -0
  34. package/es/pool/index.js +524 -0
  35. package/es/pool/utils.d.ts +19 -0
  36. package/es/pool/utils.js +33 -0
  37. package/es/style/index.css +1 -1
  38. package/es/style/raw.d.ts +1 -1
  39. package/es/style/raw.js +1 -1
  40. package/es/tools/label/LabelOverlay.js +3 -3
  41. package/es/tools/label/mediumEditor.d.ts +1 -1
  42. package/es/tools/label/mediumEditor.js +89 -52
  43. package/es/tools/snapshot/index.d.ts +7 -3
  44. package/es/tools/snapshot/index.js +72 -77
  45. package/lib/NodeResize/node/RectResize.d.ts +0 -6
  46. package/lib/NodeResize/node/RectResize.js +1 -10
  47. package/lib/bpmn-elements-adapter/json2xml.d.ts +2 -1
  48. package/lib/bpmn-elements-adapter/json2xml.js +19 -4
  49. package/lib/bpmn-elements-adapter/xml2json.js +2 -7
  50. package/lib/components/control/index.d.ts +1 -0
  51. package/lib/components/control/index.js +24 -11
  52. package/lib/components/mini-map/index.js +1 -1
  53. package/lib/dynamic-group/model.d.ts +2 -1
  54. package/lib/dynamic-group/model.js +28 -11
  55. package/lib/dynamic-group/node.js +1 -0
  56. package/lib/index.css +1 -1
  57. package/lib/index.d.ts +1 -0
  58. package/lib/index.js +2 -0
  59. package/lib/insert-node-in-polyline/index.js +10 -34
  60. package/lib/materials/curved-edge/index.js +49 -21
  61. package/lib/materials/group/GroupNode.d.ts +0 -6
  62. package/lib/materials/group/GroupNode.js +1 -6
  63. package/lib/pool/LaneModel.d.ts +90 -0
  64. package/lib/pool/LaneModel.js +255 -0
  65. package/lib/pool/LaneView.d.ts +40 -0
  66. package/lib/pool/LaneView.js +205 -0
  67. package/lib/pool/PoolModel.d.ts +120 -0
  68. package/lib/pool/PoolModel.js +589 -0
  69. package/lib/pool/PoolView.d.ts +17 -0
  70. package/lib/pool/PoolView.js +79 -0
  71. package/lib/pool/constant.d.ts +15 -0
  72. package/lib/pool/constant.js +20 -0
  73. package/lib/pool/index.d.ts +89 -0
  74. package/lib/pool/index.js +527 -0
  75. package/lib/pool/utils.d.ts +19 -0
  76. package/lib/pool/utils.js +38 -0
  77. package/lib/style/index.css +1 -1
  78. package/lib/style/raw.d.ts +1 -1
  79. package/lib/style/raw.js +1 -1
  80. package/lib/tools/label/LabelOverlay.js +2 -2
  81. package/lib/tools/label/mediumEditor.d.ts +1 -1
  82. package/lib/tools/label/mediumEditor.js +91 -53
  83. package/lib/tools/snapshot/index.d.ts +7 -3
  84. package/lib/tools/snapshot/index.js +72 -77
  85. package/package.json +10 -7
  86. package/.turbo/turbo-build.log +0 -38
  87. package/CHANGELOG.md +0 -1766
  88. package/__test__/bpmn-adapter.test.js +0 -227
  89. package/es/materials/curved-edge/__test__/curved-edge.test.d.ts +0 -1
  90. package/es/materials/curved-edge/__test__/curved-edge.test.js +0 -18
  91. package/jest.config.js +0 -198
  92. package/lib/materials/curved-edge/__test__/curved-edge.test.d.ts +0 -1
  93. package/lib/materials/curved-edge/__test__/curved-edge.test.js +0 -20
  94. package/rollup.config.js +0 -52
  95. package/src/NodeResize/BasicShape/Ellipse.tsx +0 -22
  96. package/src/NodeResize/BasicShape/Polygon.tsx +0 -24
  97. package/src/NodeResize/BasicShape/Rect.tsx +0 -44
  98. package/src/NodeResize/control/Control.tsx +0 -537
  99. package/src/NodeResize/control/ControlGroup.tsx +0 -76
  100. package/src/NodeResize/control/Util.ts +0 -206
  101. package/src/NodeResize/index.ts +0 -26
  102. package/src/NodeResize/node/DiamondResize.tsx +0 -149
  103. package/src/NodeResize/node/EllipseResize.tsx +0 -140
  104. package/src/NodeResize/node/HtmlResize.tsx +0 -125
  105. package/src/NodeResize/node/RectResize.tsx +0 -146
  106. package/src/NodeResize/node/index.ts +0 -4
  107. package/src/bpmn/constant.ts +0 -56
  108. package/src/bpmn/events/EndEvent.ts +0 -73
  109. package/src/bpmn/events/StartEvent.ts +0 -52
  110. package/src/bpmn/events/index.ts +0 -2
  111. package/src/bpmn/flow/SequenceFlow.ts +0 -25
  112. package/src/bpmn/flow/index.ts +0 -1
  113. package/src/bpmn/gateways/ExclusiveGateway.ts +0 -71
  114. package/src/bpmn/gateways/index.ts +0 -1
  115. package/src/bpmn/getBpmnId.ts +0 -31
  116. package/src/bpmn/index.ts +0 -60
  117. package/src/bpmn/tasks/ServiceTask.ts +0 -63
  118. package/src/bpmn/tasks/UserTask.ts +0 -64
  119. package/src/bpmn/tasks/index.ts +0 -2
  120. package/src/bpmn-adapter/bpmnIds.ts +0 -31
  121. package/src/bpmn-adapter/index.ts +0 -835
  122. package/src/bpmn-adapter/json2xml.ts +0 -127
  123. package/src/bpmn-adapter/xml2json.ts +0 -544
  124. package/src/bpmn-elements/README.md +0 -223
  125. package/src/bpmn-elements/__tests__/definition.test.js +0 -72
  126. package/src/bpmn-elements/index.d.ts +0 -26
  127. package/src/bpmn-elements/index.ts +0 -107
  128. package/src/bpmn-elements/presets/Event/EndEventFactory.ts +0 -114
  129. package/src/bpmn-elements/presets/Event/IntermediateCatchEvent.ts +0 -108
  130. package/src/bpmn-elements/presets/Event/IntermediateThrowEvent.ts +0 -109
  131. package/src/bpmn-elements/presets/Event/StartEventFactory.ts +0 -114
  132. package/src/bpmn-elements/presets/Event/boundaryEventFactory.ts +0 -117
  133. package/src/bpmn-elements/presets/Event/index.ts +0 -14
  134. package/src/bpmn-elements/presets/Flow/flow.d.ts +0 -6
  135. package/src/bpmn-elements/presets/Flow/index.ts +0 -8
  136. package/src/bpmn-elements/presets/Flow/manhattan.ts +0 -691
  137. package/src/bpmn-elements/presets/Flow/sequenceFlow.ts +0 -65
  138. package/src/bpmn-elements/presets/Gateway/gateway.ts +0 -107
  139. package/src/bpmn-elements/presets/Gateway/index.ts +0 -23
  140. package/src/bpmn-elements/presets/Pool/Lane.ts +0 -211
  141. package/src/bpmn-elements/presets/Pool/Pool.ts +0 -284
  142. package/src/bpmn-elements/presets/Pool/index.ts +0 -89
  143. package/src/bpmn-elements/presets/Task/index.ts +0 -122
  144. package/src/bpmn-elements/presets/Task/subProcess.ts +0 -189
  145. package/src/bpmn-elements/presets/Task/task.ts +0 -193
  146. package/src/bpmn-elements/presets/icons.ts +0 -155
  147. package/src/bpmn-elements/utils.ts +0 -52
  148. package/src/bpmn-elements-adapter/README.md +0 -293
  149. package/src/bpmn-elements-adapter/__tests__/adapter_in.test.js +0 -528
  150. package/src/bpmn-elements-adapter/__tests__/adapter_out.test.js +0 -569
  151. package/src/bpmn-elements-adapter/constant.ts +0 -76
  152. package/src/bpmn-elements-adapter/index.ts +0 -1134
  153. package/src/bpmn-elements-adapter/json2xml.ts +0 -91
  154. package/src/bpmn-elements-adapter/xml2json.ts +0 -548
  155. package/src/components/context-menu/index.ts +0 -253
  156. package/src/components/control/index.ts +0 -141
  157. package/src/components/dnd-panel/index.ts +0 -137
  158. package/src/components/highlight/index.ts +0 -227
  159. package/src/components/menu/index.ts +0 -748
  160. package/src/components/mini-map/index.ts +0 -686
  161. package/src/components/selection-select/index.ts +0 -387
  162. package/src/dynamic-group/index.ts +0 -775
  163. package/src/dynamic-group/model.ts +0 -562
  164. package/src/dynamic-group/node.ts +0 -288
  165. package/src/dynamic-group/utils.ts +0 -46
  166. package/src/index.less +0 -1
  167. package/src/index.ts +0 -45
  168. package/src/insert-node-in-polyline/edge.ts +0 -175
  169. package/src/insert-node-in-polyline/index.ts +0 -187
  170. package/src/materials/curved-edge/__test__/curved-edge.test.ts +0 -46
  171. package/src/materials/curved-edge/index.ts +0 -185
  172. package/src/materials/group/GroupNode.ts +0 -442
  173. package/src/materials/group/index.ts +0 -542
  174. package/src/materials/node-selection/index.ts +0 -380
  175. package/src/mindmap/fakerRoot.ts +0 -19
  176. package/src/mindmap/index.ts +0 -328
  177. package/src/mindmap/markContent.ts +0 -81
  178. package/src/mindmap/markContentOption.ts +0 -81
  179. package/src/mindmap/markEntity.ts +0 -82
  180. package/src/mindmap/markRoot.ts +0 -83
  181. package/src/mindmap/theme.ts +0 -11
  182. package/src/rect-label-node/RectLabelNodeView.ts +0 -33
  183. package/src/rect-label-node/index.ts +0 -15
  184. package/src/style/index.less +0 -342
  185. package/src/style/raw.ts +0 -295
  186. package/src/tools/auto-layout/index.ts +0 -282
  187. package/src/tools/flow-path/index.ts +0 -233
  188. package/src/tools/label/Label.tsx +0 -357
  189. package/src/tools/label/LabelModel.ts +0 -83
  190. package/src/tools/label/LabelOverlay.tsx +0 -158
  191. package/src/tools/label/algorithm.ts +0 -42
  192. package/src/tools/label/index.ts +0 -479
  193. package/src/tools/label/mediumEditor.ts +0 -94
  194. package/src/tools/label/utils.ts +0 -395
  195. package/src/tools/proximity-connect/index.ts +0 -435
  196. package/src/tools/snapshot/README.md +0 -145
  197. package/src/tools/snapshot/index.ts +0 -718
  198. package/src/tools/snapshot/utils.ts +0 -163
  199. package/src/turbo-adapter/index.ts +0 -212
  200. package/stats.html +0 -4842
  201. package/tsconfig.json +0 -18
@@ -1,528 +0,0 @@
1
- /* eslint-disable no-useless-concat */
2
- /* eslint-disable no-template-curly-in-string */
3
- /* eslint-disable no-new */
4
- /* eslint-disable no-undef */
5
- /* eslint-disable no-tabs */
6
- import { BPMNAdapter } from '..'
7
-
8
- describe('Test BPMNAdapter: import xml', () => {
9
- const graphData = {
10
- nodes: [
11
- {
12
- id: 'Event_0rqndvp',
13
- type: 'bpmn:startEvent',
14
- x: 350,
15
- y: 110,
16
- properties: {},
17
- text: {
18
- x: 350,
19
- y: 150,
20
- value: '开始',
21
- },
22
- },
23
- {
24
- id: '121213b3-8fad-4b41-bb1e-a7672e9bfc07',
25
- type: 'bpmn:subProcess',
26
- x: 640,
27
- y: 530,
28
- properties: {},
29
- children: [
30
- 'Activity_383p4ds',
31
- 'Event_3nm6g45',
32
- 'Gateway_10p8112',
33
- 'Gateway_36vu52v',
34
- ],
35
- },
36
- {
37
- id: 'Event_2ffv4vc',
38
- type: 'bpmn:boundaryEvent',
39
- x: 220,
40
- y: 570,
41
- properties: {
42
- attachedToRef: 'Activity_05avavm',
43
- cancelActivity: false,
44
- definitionType: 'bpmn:timerEventDefinition',
45
- timerValue: '',
46
- timerType: '',
47
- definitionId: 'bpmn:timerEventDefinitionEventDefinition_0anvuso',
48
- isBoundaryEvent: true,
49
- },
50
- text: {
51
- x: 220,
52
- y: 610,
53
- value: '时间边界',
54
- },
55
- },
56
- {
57
- id: 'Event_2o2l6ht',
58
- type: 'bpmn:boundaryEvent',
59
- x: 310,
60
- y: 320,
61
- properties: {
62
- attachedToRef: 'Activity_28r64ai',
63
- cancelActivity: false,
64
- definitionType: 'bpmn:timerEventDefinition',
65
- timerValue: 'PT15S',
66
- timerType: 'timeDuration',
67
- definitionId: 'bpmn:timerEventDefinitionEventDefinition_11s0ei9',
68
- isBoundaryEvent: true,
69
- },
70
- text: {
71
- x: 310,
72
- y: 360,
73
- value: '时间边界',
74
- },
75
- },
76
- {
77
- id: 'Event_3nm6g45',
78
- type: 'bpmn:boundaryEvent',
79
- x: 710,
80
- y: 530,
81
- properties: {
82
- attachedToRef: 'Activity_383p4ds',
83
- cancelActivity: false,
84
- definitionType: 'bpmn:timerEventDefinition',
85
- timerValue: 'R5/PT10S',
86
- timerType: 'timeCycle',
87
- definitionId: 'bpmn:timerEventDefinitionEventDefinition_0ukj8qs',
88
- isBoundaryEvent: true,
89
- },
90
- text: {
91
- x: 710,
92
- y: 570,
93
- value: '时间边界',
94
- },
95
- },
96
- {
97
- id: 'Gateway_0ke5iid',
98
- type: 'bpmn:parallelGateway',
99
- x: 500,
100
- y: 140,
101
- properties: {},
102
- text: {
103
- x: 500,
104
- y: 180,
105
- value: '并行网关',
106
- },
107
- },
108
- {
109
- id: 'Gateway_10p8112',
110
- type: 'bpmn:parallelGateway',
111
- x: 490,
112
- y: 530,
113
- properties: {
114
- expr: '${A > B}',
115
- },
116
- text: {
117
- x: 490,
118
- y: 570,
119
- value: '并行网关',
120
- },
121
- },
122
- {
123
- id: 'Activity_05avavm',
124
- type: 'bpmn:userTask',
125
- x: 270,
126
- y: 540,
127
- properties: {},
128
- text: {
129
- x: 270,
130
- y: 540,
131
- value: '人工任务',
132
- },
133
- },
134
- {
135
- id: 'Activity_28r64ai',
136
- type: 'bpmn:userTask',
137
- x: 370,
138
- y: 280,
139
- properties: {},
140
- text: {
141
- x: 370,
142
- y: 280,
143
- value: '人工任务',
144
- },
145
- },
146
- {
147
- id: 'Event_3t9u7bs',
148
- type: 'bpmn:endEvent',
149
- x: 220,
150
- y: 210,
151
- properties: {},
152
- text: {
153
- x: 220,
154
- y: 250,
155
- value: '结束',
156
- },
157
- },
158
- {
159
- id: 'Activity_383p4ds',
160
- type: 'bpmn:serviceTask',
161
- x: 760,
162
- y: 530,
163
- properties: {},
164
- text: {
165
- x: 760,
166
- y: 530,
167
- value: '服务任务',
168
- },
169
- },
170
- {
171
- id: 'Gateway_36vu52v',
172
- type: 'bpmn:inclusiveGateway',
173
- x: 640,
174
- y: 580,
175
- properties: {},
176
- text: {
177
- x: 640,
178
- y: 620,
179
- value: '包容网关',
180
- },
181
- },
182
- ],
183
- edges: [
184
- {
185
- id: 'Flow_19ep598',
186
- type: 'bpmn:sequenceFlow',
187
- sourceNodeId: 'Gateway_0ke5iid',
188
- targetNodeId: 'Event_3t9u7bs',
189
- properties: {},
190
- pointsList: [
191
- {
192
- x: 475,
193
- y: 140,
194
- },
195
- {
196
- x: 445,
197
- y: 140,
198
- },
199
- {
200
- x: 445,
201
- y: 210,
202
- },
203
- {
204
- x: 238,
205
- y: 210,
206
- },
207
- ],
208
- },
209
- {
210
- id: 'Flow_1cju7v0',
211
- type: 'bpmn:sequenceFlow',
212
- sourceNodeId: 'Gateway_0ke5iid',
213
- targetNodeId: '121213b3-8fad-4b41-bb1e-a7672e9bfc07',
214
- properties: {},
215
- pointsList: [
216
- {
217
- x: 500,
218
- y: 165,
219
- },
220
- {
221
- x: 500,
222
- y: 195,
223
- },
224
- {
225
- x: 640,
226
- y: 195,
227
- },
228
- {
229
- x: 640,
230
- y: 430,
231
- },
232
- ],
233
- },
234
- {
235
- id: 'Flow_0phuver',
236
- type: 'bpmn:sequenceFlow',
237
- sourceNodeId: 'Activity_05avavm',
238
- targetNodeId: 'Activity_28r64ai',
239
- properties: {},
240
- pointsList: [
241
- {
242
- x: 220,
243
- y: 540,
244
- },
245
- {
246
- x: 190,
247
- y: 540,
248
- },
249
- {
250
- x: 190,
251
- y: 410,
252
- },
253
- {
254
- x: 450,
255
- y: 410,
256
- },
257
- {
258
- x: 450,
259
- y: 280,
260
- },
261
- {
262
- x: 420,
263
- y: 280,
264
- },
265
- ],
266
- },
267
- {
268
- id: 'Flow_3ql1931',
269
- type: 'bpmn:sequenceFlow',
270
- sourceNodeId: '121213b3-8fad-4b41-bb1e-a7672e9bfc07',
271
- targetNodeId: 'Activity_05avavm',
272
- properties: {},
273
- pointsList: [
274
- {
275
- x: 440,
276
- y: 530,
277
- },
278
- {
279
- x: 380,
280
- y: 530,
281
- },
282
- {
283
- x: 380,
284
- y: 540,
285
- },
286
- {
287
- x: 320,
288
- y: 540,
289
- },
290
- ],
291
- },
292
- {
293
- id: 'Flow_39cdevi',
294
- type: 'bpmn:sequenceFlow',
295
- sourceNodeId: 'Gateway_10p8112',
296
- targetNodeId: 'Activity_383p4ds',
297
- properties: {
298
- expressionType: 'cdata',
299
- condition: 'foo > bar',
300
- },
301
- pointsList: [
302
- {
303
- x: 515,
304
- y: 530,
305
- },
306
- {
307
- x: 545,
308
- y: 530,
309
- },
310
- {
311
- x: 545,
312
- y: 460,
313
- },
314
- {
315
- x: 760,
316
- y: 460,
317
- },
318
- {
319
- x: 760,
320
- y: 490,
321
- },
322
- ],
323
- },
324
- {
325
- id: 'Flow_1mpq63n',
326
- type: 'bpmn:sequenceFlow',
327
- sourceNodeId: 'Gateway_10p8112',
328
- targetNodeId: 'Gateway_36vu52v',
329
- properties: {
330
- isDefaultFlow: true,
331
- },
332
- pointsList: [
333
- {
334
- x: 515,
335
- y: 530,
336
- },
337
- {
338
- x: 565,
339
- y: 530,
340
- },
341
- {
342
- x: 565,
343
- y: 580,
344
- },
345
- {
346
- x: 615,
347
- y: 580,
348
- },
349
- ],
350
- },
351
- ],
352
- }
353
- const xml = ` <bpmn:definitions id="Definitions" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" targetNamespace="http://logic-flow.org" exporter="logicflow" exporterVersion="1.2.10">
354
- <bpmn:process isExecutable="true" id="Process">
355
- <bpmn:startEvent id="Event_0rqndvp" name="开始" />
356
- <bpmn:subProcess id="121213b3-8fad-4b41-bb1e-a7672e9bfc07">
357
- <bpmn:incoming>Flow_1cju7v0</bpmn:incoming>
358
- <bpmn:outgoing>Flow_3ql1931</bpmn:outgoing>
359
- <bpmn:serviceTask id="Activity_383p4ds" name="服务任务">
360
- <bpmn:incoming>Flow_39cdevi</bpmn:incoming>
361
- </bpmn:serviceTask>
362
- <bpmn:boundaryEvent id="Event_3nm6g45" name="时间边界" attachedToRef="Activity_383p4ds" cancelActivity="false" definitionType="bpmn:timerEventDefinition" timerValue="R5/PT10S" timerType="timeCycle" definitionId="bpmn:timerEventDefinitionEventDefinition_0ukj8qs" isBoundaryEvent="true">
363
- <bpmn:timerEventDefinition id="bpmn:timerEventDefinitionEventDefinition_0ukj8qs"><bpmn:timeCycle xsi:type="bpmn:tFormalExpression">R5/PT10S</bpmn:timeCycle></bpmn:timerEventDefinition>
364
- </bpmn:boundaryEvent>
365
- <bpmn:parallelGateway id="Gateway_10p8112" name="并行网关" expr="\${A > B}">
366
- <bpmn:outgoing>Flow_39cdevi</bpmn:outgoing>
367
- <bpmn:outgoing>Flow_1mpq63n</bpmn:outgoing>
368
- </bpmn:parallelGateway>
369
- <bpmn:inclusiveGateway id="Gateway_36vu52v" name="包容网关">
370
- <bpmn:incoming>Flow_1mpq63n</bpmn:incoming>
371
- </bpmn:inclusiveGateway>
372
- <bpmn:sequenceFlow id="Flow_39cdevi" sourceRef="Gateway_10p8112" targetRef="Activity_383p4ds" expressionType="cdata" condition="foo &gt; bar">
373
- <bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[\${foo &gt; bar}]]></bpmn:conditionExpression>
374
- </bpmn:sequenceFlow>
375
- <bpmn:sequenceFlow id="Flow_1mpq63n" sourceRef="Gateway_10p8112" targetRef="Gateway_36vu52v" isDefaultFlow="true" />
376
- </bpmn:subProcess>
377
- <bpmn:boundaryEvent id="Event_2ffv4vc" name="时间边界" attachedToRef="Activity_05avavm" cancelActivity="false" definitionType="bpmn:timerEventDefinition" timerValue="" timerType="" definitionId="bpmn:timerEventDefinitionEventDefinition_0anvuso" isBoundaryEvent="true">
378
- <bpmn:timerEventDefinition id="bpmn:timerEventDefinitionEventDefinition_0anvuso"/>
379
- </bpmn:boundaryEvent>
380
- <bpmn:boundaryEvent id="Event_2o2l6ht" name="时间边界" attachedToRef="Activity_28r64ai" cancelActivity="false" definitionType="bpmn:timerEventDefinition" timerValue="PT15S" timerType="timeDuration" definitionId="bpmn:timerEventDefinitionEventDefinition_11s0ei9" isBoundaryEvent="true">
381
- <bpmn:timerEventDefinition id="bpmn:timerEventDefinitionEventDefinition_11s0ei9"><bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT15S</bpmn:timeDuration></bpmn:timerEventDefinition>
382
- </bpmn:boundaryEvent>
383
- <bpmn:parallelGateway id="Gateway_0ke5iid" name="并行网关">
384
- <bpmn:outgoing>Flow_19ep598</bpmn:outgoing>
385
- <bpmn:outgoing>Flow_1cju7v0</bpmn:outgoing>
386
- </bpmn:parallelGateway>
387
- <bpmn:userTask id="Activity_05avavm" name="人工任务">
388
- <bpmn:incoming>Flow_3ql1931</bpmn:incoming>
389
- <bpmn:outgoing>Flow_0phuver</bpmn:outgoing>
390
- </bpmn:userTask>
391
- <bpmn:userTask id="Activity_28r64ai" name="人工任务">
392
- <bpmn:incoming>Flow_0phuver</bpmn:incoming>
393
- </bpmn:userTask>
394
- <bpmn:endEvent id="Event_3t9u7bs" name="结束">
395
- <bpmn:incoming>Flow_19ep598</bpmn:incoming>
396
- </bpmn:endEvent>
397
- <bpmn:sequenceFlow id="Flow_19ep598" sourceRef="Gateway_0ke5iid" targetRef="Event_3t9u7bs" />
398
- <bpmn:sequenceFlow id="Flow_1cju7v0" sourceRef="Gateway_0ke5iid" targetRef="121213b3-8fad-4b41-bb1e-a7672e9bfc07" />
399
- <bpmn:sequenceFlow id="Flow_0phuver" sourceRef="Activity_05avavm" targetRef="Activity_28r64ai" />
400
- <bpmn:sequenceFlow id="Flow_3ql1931" sourceRef="121213b3-8fad-4b41-bb1e-a7672e9bfc07" targetRef="Activity_05avavm" />
401
- </bpmn:process>
402
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
403
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process">
404
- <bpmndi:BPMNEdge id="Flow_19ep598_di" bpmnElement="Flow_19ep598">
405
- <di:waypoint x="475" y="140" />
406
- <di:waypoint x="445" y="140" />
407
- <di:waypoint x="445" y="210" />
408
- <di:waypoint x="238" y="210" />
409
- </bpmndi:BPMNEdge>
410
- <bpmndi:BPMNEdge id="Flow_1cju7v0_di" bpmnElement="Flow_1cju7v0">
411
- <di:waypoint x="500" y="165" />
412
- <di:waypoint x="500" y="195" />
413
- <di:waypoint x="640" y="195" />
414
- <di:waypoint x="640" y="430" />
415
- </bpmndi:BPMNEdge>
416
- <bpmndi:BPMNEdge id="Flow_0phuver_di" bpmnElement="Flow_0phuver">
417
- <di:waypoint x="220" y="540" />
418
- <di:waypoint x="190" y="540" />
419
- <di:waypoint x="190" y="410" />
420
- <di:waypoint x="450" y="410" />
421
- <di:waypoint x="450" y="280" />
422
- <di:waypoint x="420" y="280" />
423
- </bpmndi:BPMNEdge>
424
- <bpmndi:BPMNEdge id="Flow_3ql1931_di" bpmnElement="Flow_3ql1931">
425
- <di:waypoint x="440" y="530" />
426
- <di:waypoint x="380" y="530" />
427
- <di:waypoint x="380" y="540" />
428
- <di:waypoint x="320" y="540" />
429
- </bpmndi:BPMNEdge>
430
- <bpmndi:BPMNEdge id="Flow_39cdevi_di" bpmnElement="Flow_39cdevi">
431
- <di:waypoint x="515" y="530" />
432
- <di:waypoint x="545" y="530" />
433
- <di:waypoint x="545" y="460" />
434
- <di:waypoint x="760" y="460" />
435
- <di:waypoint x="760" y="490" />
436
- </bpmndi:BPMNEdge>
437
- <bpmndi:BPMNEdge id="Flow_1mpq63n_di" bpmnElement="Flow_1mpq63n">
438
- <di:waypoint x="515" y="530" />
439
- <di:waypoint x="565" y="530" />
440
- <di:waypoint x="565" y="580" />
441
- <di:waypoint x="615" y="580" />
442
- </bpmndi:BPMNEdge>
443
- <bpmndi:BPMNShape id="Event_0rqndvp_di" bpmnElement="Event_0rqndvp">
444
- <dc:Bounds x="330" y="90" width="40" height="40" />
445
- <bpmndi:BPMNLabel>
446
- <dc:Bounds x="340" y="143" width="20" height="14" />
447
- </bpmndi:BPMNLabel>
448
- </bpmndi:BPMNShape>
449
- <bpmndi:BPMNShape id="121213b3-8fad-4b41-bb1e-a7672e9bfc07_di" bpmnElement="121213b3-8fad-4b41-bb1e-a7672e9bfc07">
450
- <dc:Bounds x="590" y="490" width="100" height="80" />
451
- </bpmndi:BPMNShape>
452
- <bpmndi:BPMNShape id="Event_2ffv4vc_di" bpmnElement="Event_2ffv4vc">
453
- <dc:Bounds x="170" y="530" width="100" height="80" />
454
- <bpmndi:BPMNLabel>
455
- <dc:Bounds x="200" y="603" width="40" height="14" />
456
- </bpmndi:BPMNLabel>
457
- </bpmndi:BPMNShape>
458
- <bpmndi:BPMNShape id="Event_2o2l6ht_di" bpmnElement="Event_2o2l6ht">
459
- <dc:Bounds x="260" y="280" width="100" height="80" />
460
- <bpmndi:BPMNLabel>
461
- <dc:Bounds x="290" y="353" width="40" height="14" />
462
- </bpmndi:BPMNLabel>
463
- </bpmndi:BPMNShape>
464
- <bpmndi:BPMNShape id="Event_3nm6g45_di" bpmnElement="Event_3nm6g45">
465
- <dc:Bounds x="660" y="490" width="100" height="80" />
466
- <bpmndi:BPMNLabel>
467
- <dc:Bounds x="690" y="563" width="40" height="14" />
468
- </bpmndi:BPMNLabel>
469
- </bpmndi:BPMNShape>
470
- <bpmndi:BPMNShape id="Gateway_0ke5iid_di" bpmnElement="Gateway_0ke5iid">
471
- <dc:Bounds x="450" y="100" width="100" height="80" />
472
- <bpmndi:BPMNLabel>
473
- <dc:Bounds x="480" y="173" width="40" height="14" />
474
- </bpmndi:BPMNLabel>
475
- </bpmndi:BPMNShape>
476
- <bpmndi:BPMNShape id="Gateway_10p8112_di" bpmnElement="Gateway_10p8112">
477
- <dc:Bounds x="440" y="490" width="100" height="80" />
478
- <bpmndi:BPMNLabel>
479
- <dc:Bounds x="470" y="563" width="40" height="14" />
480
- </bpmndi:BPMNLabel>
481
- </bpmndi:BPMNShape>
482
- <bpmndi:BPMNShape id="Activity_05avavm_di" bpmnElement="Activity_05avavm">
483
- <dc:Bounds x="220" y="500" width="100" height="80" />
484
- <bpmndi:BPMNLabel>
485
- <dc:Bounds x="250" y="533" width="40" height="14" />
486
- </bpmndi:BPMNLabel>
487
- </bpmndi:BPMNShape>
488
- <bpmndi:BPMNShape id="Activity_28r64ai_di" bpmnElement="Activity_28r64ai">
489
- <dc:Bounds x="320" y="240" width="100" height="80" />
490
- <bpmndi:BPMNLabel>
491
- <dc:Bounds x="350" y="273" width="40" height="14" />
492
- </bpmndi:BPMNLabel>
493
- </bpmndi:BPMNShape>
494
- <bpmndi:BPMNShape id="Event_3t9u7bs_di" bpmnElement="Event_3t9u7bs">
495
- <dc:Bounds x="200" y="190" width="40" height="40" />
496
- <bpmndi:BPMNLabel>
497
- <dc:Bounds x="210" y="243" width="20" height="14" />
498
- </bpmndi:BPMNLabel>
499
- </bpmndi:BPMNShape>
500
- <bpmndi:BPMNShape id="Activity_383p4ds_di" bpmnElement="Activity_383p4ds">
501
- <dc:Bounds x="710" y="490" width="100" height="80" />
502
- <bpmndi:BPMNLabel>
503
- <dc:Bounds x="740" y="523" width="40" height="14" />
504
- </bpmndi:BPMNLabel>
505
- </bpmndi:BPMNShape>
506
- <bpmndi:BPMNShape id="Gateway_36vu52v_di" bpmnElement="Gateway_36vu52v">
507
- <dc:Bounds x="590" y="540" width="100" height="80" />
508
- <bpmndi:BPMNLabel>
509
- <dc:Bounds x="620" y="613" width="40" height="14" />
510
- </bpmndi:BPMNLabel>
511
- </bpmndi:BPMNShape>
512
- </bpmndi:BPMNPlane>
513
- </bpmndi:BPMNDiagram>
514
- </bpmn:definitions>`
515
- const lf = {}
516
- const adapter = new BPMNAdapter({ lf })
517
-
518
- // 导入时会处理内部会出boundaryEvents(配合Bpmn节点插件中的task、subProcess使用)但是在这里不需要,所以需要extraProps来过滤掉它
519
- it('should convert bpmn to graph data', () => {
520
- expect(
521
- adapter.adapterXmlIn(xml, {
522
- excludeFields: {
523
- in: ['properties.boundaryEvents'],
524
- },
525
- }),
526
- ).toEqual(graphData)
527
- })
528
- })