bpmn-js 0.20.7 → 0.21.0

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.
@@ -373,18 +373,34 @@ BpmnSnapping.prototype.addTargetSnaps = function(snapPoints, shape, target) {
373
373
 
374
374
  var siblings = this.getSiblings(shape, target) || [];
375
375
 
376
- forEach(siblings, function(s) {
376
+ forEach(siblings, function(sibling) {
377
377
 
378
378
  // do not snap to lanes
379
- if (is(s, 'bpmn:Lane')) {
379
+ if (is(sibling, 'bpmn:Lane')) {
380
380
  return;
381
381
  }
382
382
 
383
- snapPoints.add('mid', mid(s));
383
+ if (sibling.waypoints) {
384
+ forEach(sibling.waypoints, function(waypoint, i) {
385
+ var nextWaypoint = sibling.waypoints[i+1];
384
386
 
385
- if (is(s, 'bpmn:Participant')) {
386
- snapPoints.add('top-left', topLeft(s));
387
- snapPoints.add('bottom-right', bottomRight(s));
387
+ if (!nextWaypoint) {
388
+ return;
389
+ }
390
+
391
+ if (nextWaypoint.x === waypoint.x || nextWaypoint.y === waypoint.y) {
392
+ snapPoints.add('mid', waypoint);
393
+ }
394
+ });
395
+
396
+ return;
397
+ }
398
+
399
+ snapPoints.add('mid', mid(sibling));
400
+
401
+ if (is(sibling, 'bpmn:Participant')) {
402
+ snapPoints.add('top-left', topLeft(sibling));
403
+ snapPoints.add('bottom-right', bottomRight(sibling));
388
404
  }
389
405
  });
390
406
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmn-js",
3
- "version": "0.20.7",
3
+ "version": "0.21.0",
4
4
  "description": "A bpmn 2.0 toolkit and web modeler",
5
5
  "scripts": {
6
6
  "all": "grunt",
@@ -73,9 +73,9 @@
73
73
  },
74
74
  "dependencies": {
75
75
  "bpmn-moddle": "^0.14.0",
76
- "diagram-js": "^0.19.6",
77
- "diagram-js-direct-editing": "^0.17.1",
78
- "diagram-js-origin": "^0.15.1",
76
+ "diagram-js": "^0.20.0",
77
+ "diagram-js-direct-editing": "^0.18.0",
78
+ "diagram-js-origin": "^0.15.2",
79
79
  "ids": "^0.2.0",
80
80
  "inherits": "^2.0.1",
81
81
  "lodash": "^3.0.1",
@@ -7,7 +7,7 @@ TestHelper.insertCSS('diagram-js.css', require('diagram-js/assets/diagram-js.css
7
7
  TestHelper.insertCSS('bpmn-embedded.css', require('../assets/bpmn-font/css/bpmn-embedded.css'));
8
8
 
9
9
  TestHelper.insertCSS('diagram-js-testing.css',
10
- '.test-container .result { height: 500px; }' + '.test-container > div'
10
+ '.test-container .result { height: 500px; }' + '.test-container { height: 1000px !important }'
11
11
  );
12
12
 
13
13
 
@@ -1,248 +1,178 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="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" id="_w9Yc0PLSEeOqh_cnoUOA7A" targetNamespace="http://activiti.org/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0-nightly" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
3
- <bpmn2:collaboration id="_Collaboration_2">
4
- <bpmn2:participant id="expanded-pool" name="A" processRef="Process_1" />
5
- <bpmn2:participant id="collapsed-pool" name="A" />
6
- <bpmn2:messageFlow id="message-flow" name="A" sourceRef="task-nested-embedded" targetRef="collapsed-pool" />
7
- <bpmn2:messageFlow id="message-flow-unlabeled" name="" sourceRef="collapsed-pool" targetRef="expanded-pool" />
8
- <bpmn2:textAnnotation id="text-annotation"> <bpmn2:text>A</bpmn2:text>
9
- </bpmn2:textAnnotation>
10
- </bpmn2:collaboration>
11
- <bpmn2:process id="Process_1" isExecutable="false">
12
- <bpmn2:ioSpecification id="InputOutputSpecification_1">
13
- <bpmn2:dataInput id="data-input" />
14
- <bpmn2:dataOutput id="data-output" />
15
- </bpmn2:ioSpecification>
16
- <bpmn2:laneSet id="LaneSet_1" name="Lane Set 1">
17
- <bpmn2:lane id="lane-1" name="A">
18
- <bpmn2:flowNodeRef>intermediate-throw-event</bpmn2:flowNodeRef>
19
- <bpmn2:flowNodeRef>empty-task</bpmn2:flowNodeRef>
20
- <bpmn2:childLaneSet xsi:type="bpmn2:tLaneSet" id="LaneSet_2">
21
- <bpmn2:lane id="nested-lane-1-1" name="A">
22
- <bpmn2:flowNodeRef>start-event</bpmn2:flowNodeRef>
23
- <bpmn2:flowNodeRef>exclusive-gateway</bpmn2:flowNodeRef>
24
- <bpmn2:flowNodeRef>intermediate-throw-event</bpmn2:flowNodeRef>
25
- <bpmn2:flowNodeRef>empty-task</bpmn2:flowNodeRef>
26
- </bpmn2:lane>
27
- <bpmn2:lane id="nested-lane-1-2" name="A">
28
- <bpmn2:flowNodeRef>call-activity</bpmn2:flowNodeRef>
29
- <bpmn2:flowNodeRef>user-task</bpmn2:flowNodeRef>
30
- </bpmn2:lane>
31
- </bpmn2:childLaneSet>
32
- </bpmn2:lane>
33
- <bpmn2:lane id="lane-2" name="A">
34
- <bpmn2:childLaneSet xsi:type="bpmn2:tLaneSet" id="LaneSet_3">
35
- <bpmn2:lane id="nested-lane-no-label" name="">
36
- <bpmn2:flowNodeRef>subprocess-expanded</bpmn2:flowNodeRef>
37
- <bpmn2:flowNodeRef>subprocess-collapsed</bpmn2:flowNodeRef>
38
- </bpmn2:lane>
39
- </bpmn2:childLaneSet>
40
- </bpmn2:lane>
41
- </bpmn2:laneSet>
42
- <bpmn2:subProcess id="subprocess-expanded" name="A">
43
- <bpmn2:dataInputAssociation id="DataInputAssociation_1">
44
- <bpmn2:sourceRef>data-input</bpmn2:sourceRef>
45
- </bpmn2:dataInputAssociation>
46
- <bpmn2:dataOutputAssociation id="DataOutputAssociation_1">
47
- <bpmn2:targetRef>data-output</bpmn2:targetRef>
48
- </bpmn2:dataOutputAssociation>
49
- <bpmn2:task id="task-nested-embedded" name="A" />
50
- </bpmn2:subProcess>
51
- <bpmn2:subProcess id="subprocess-collapsed" name="A" triggeredByEvent="true">
52
- <bpmn2:dataInputAssociation id="DataInputAssociation_2">
53
- <bpmn2:sourceRef>data-store-reference</bpmn2:sourceRef>
54
- </bpmn2:dataInputAssociation>
55
- <bpmn2:startEvent id="nested-embedded-start-event" name="start event" isInterrupting="false" />
56
- </bpmn2:subProcess>
57
- <bpmn2:callActivity id="call-activity" name="A">
58
- <bpmn2:incoming>sequence-flow-no</bpmn2:incoming>
59
- </bpmn2:callActivity>
60
- <bpmn2:userTask id="user-task" name="A" />
61
- <bpmn2:boundaryEvent id="boundary-event" name="A" attachedToRef="user-task" />
62
- <bpmn2:startEvent id="start-event">
63
- <bpmn2:outgoing>sequenceflow-unlabeled</bpmn2:outgoing>
64
- </bpmn2:startEvent>
65
- <bpmn2:sequenceFlow id="sequenceflow-unlabeled" name="" sourceRef="start-event" targetRef="exclusive-gateway" />
66
- <bpmn2:exclusiveGateway id="exclusive-gateway" name="A">
67
- <bpmn2:incoming>sequenceflow-unlabeled</bpmn2:incoming>
68
- <bpmn2:outgoing>sequence-flow-no</bpmn2:outgoing>
69
- <bpmn2:outgoing>sequence-flow-yes</bpmn2:outgoing>
70
- </bpmn2:exclusiveGateway>
71
- <bpmn2:sequenceFlow id="sequence-flow-no" name="A" sourceRef="exclusive-gateway" targetRef="call-activity" />
72
- <bpmn2:sequenceFlow id="sequence-flow-yes" name="A" sourceRef="exclusive-gateway" targetRef="intermediate-throw-event" />
73
- <bpmn2:dataStoreReference id="data-store-reference" name="A" dataStoreRef="DataStore_1" />
74
- <bpmn2:dataObject id="DataObject_1" name="Data Object 1" />
75
- <bpmn2:dataObjectReference id="data-object-reference" name="A" dataObjectRef="DataObject_1" />
76
- <bpmn2:intermediateThrowEvent id="intermediate-throw-event" name="A">
77
- <bpmn2:incoming>sequence-flow-yes</bpmn2:incoming>
78
- <bpmn2:outgoing>SequenceFlow_1r751z0</bpmn2:outgoing>
79
- </bpmn2:intermediateThrowEvent>
80
- <bpmn2:task id="empty-task">
81
- <bpmn2:incoming>SequenceFlow_1r751z0</bpmn2:incoming>
82
- </bpmn2:task>
83
- <bpmn2:sequenceFlow id="SequenceFlow_1r751z0" sourceRef="intermediate-throw-event" targetRef="empty-task" />
84
- <bpmn2:association id="Association_1" sourceRef="text-annotation" targetRef="subprocess-expanded" />
85
- </bpmn2:process>
86
- <bpmn2:dataStore id="DataStore_1" name="Data Store 1" />
2
+ <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:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.6.0">
3
+ <bpmn:collaboration id="Collaboration_1o0amh9">
4
+ <bpmn:participant id="Participant_1" name="FOO BAR" processRef="Process_1" />
5
+ <bpmn:participant id="Participant_2" />
6
+ <bpmn:messageFlow id="MessageFlow_1" name="FOO" sourceRef="Task_1fo1fvh" targetRef="Participant_2" />
7
+ <bpmn:textAnnotation id="TextAnnotation_1"> <bpmn:text>FOO</bpmn:text>
8
+ </bpmn:textAnnotation>
9
+ </bpmn:collaboration>
10
+ <bpmn:process id="Process_1" isExecutable="false">
11
+ <bpmn:laneSet>
12
+ <bpmn:lane id="Lane_2">
13
+ <bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
14
+ <bpmn:flowNodeRef>SubProcess_1</bpmn:flowNodeRef>
15
+ </bpmn:lane>
16
+ <bpmn:lane id="Lane_1" name="FOO BAR">
17
+ <bpmn:flowNodeRef>Task_1</bpmn:flowNodeRef>
18
+ <bpmn:flowNodeRef>StartEvent_08jn2xd</bpmn:flowNodeRef>
19
+ <bpmn:flowNodeRef>Task_1fo1fvh</bpmn:flowNodeRef>
20
+ <bpmn:flowNodeRef>ExclusiveGateway_1</bpmn:flowNodeRef>
21
+ <bpmn:flowNodeRef>EndEvent_1</bpmn:flowNodeRef>
22
+ </bpmn:lane>
23
+ </bpmn:laneSet>
24
+ <bpmn:startEvent id="StartEvent_1" name="FOO">
25
+ <bpmn:outgoing>SequenceFlow_2</bpmn:outgoing>
26
+ </bpmn:startEvent>
27
+ <bpmn:sequenceFlow id="SequenceFlow_2" sourceRef="StartEvent_1" targetRef="SubProcess_1" />
28
+ <bpmn:subProcess id="SubProcess_1" name="FOO">
29
+ <bpmn:incoming>SequenceFlow_2</bpmn:incoming>
30
+ <bpmn:outgoing>SequenceFlow_14kuv1e</bpmn:outgoing>
31
+ </bpmn:subProcess>
32
+ <bpmn:startEvent id="StartEvent_08jn2xd" name="FOO&#10;BAR">
33
+ <bpmn:outgoing>SequenceFlow_1</bpmn:outgoing>
34
+ </bpmn:startEvent>
35
+ <bpmn:task id="Task_1" name="FOO">
36
+ <bpmn:incoming>SequenceFlow_1</bpmn:incoming>
37
+ <bpmn:incoming>SequenceFlow_14kuv1e</bpmn:incoming>
38
+ <bpmn:outgoing>SequenceFlow_13rjp44</bpmn:outgoing>
39
+ <bpmn:outgoing>SequenceFlow_0kmqqm9</bpmn:outgoing>
40
+ </bpmn:task>
41
+ <bpmn:sequenceFlow id="SequenceFlow_1" name="FOO" sourceRef="StartEvent_08jn2xd" targetRef="Task_1" />
42
+ <bpmn:sequenceFlow id="SequenceFlow_14kuv1e" sourceRef="SubProcess_1" targetRef="Task_1" />
43
+ <bpmn:task id="Task_1fo1fvh" name="FOO&#10;BAR">
44
+ <bpmn:incoming>SequenceFlow_13rjp44</bpmn:incoming>
45
+ <bpmn:outgoing>SequenceFlow_1h7vuvi</bpmn:outgoing>
46
+ </bpmn:task>
47
+ <bpmn:sequenceFlow id="SequenceFlow_13rjp44" sourceRef="Task_1" targetRef="Task_1fo1fvh" />
48
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1" name="FOO">
49
+ <bpmn:incoming>SequenceFlow_1h7vuvi</bpmn:incoming>
50
+ </bpmn:exclusiveGateway>
51
+ <bpmn:sequenceFlow id="SequenceFlow_1h7vuvi" sourceRef="Task_1fo1fvh" targetRef="ExclusiveGateway_1" />
52
+ <bpmn:endEvent id="EndEvent_1">
53
+ <bpmn:incoming>SequenceFlow_0kmqqm9</bpmn:incoming>
54
+ </bpmn:endEvent>
55
+ <bpmn:sequenceFlow id="SequenceFlow_0kmqqm9" sourceRef="Task_1" targetRef="EndEvent_1" />
56
+ <bpmn:dataObjectReference id="DataObjectReference_1" dataObjectRef="DataObject_1rq8hb8" />
57
+ <bpmn:dataObject id="DataObject_1rq8hb8" />
58
+ <bpmn:dataStoreReference id="DataStoreReference_1" />
59
+ <bpmn:association id="Association_0ckvfj2" sourceRef="SubProcess_1" targetRef="TextAnnotation_1" />
60
+ </bpmn:process>
87
61
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
88
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="_Collaboration_2">
89
- <bpmndi:BPMNShape id="_BPMNShape_Participant_2" bpmnElement="expanded-pool" isHorizontal="true">
90
- <dc:Bounds x="60" y="48" width="540" height="613" />
62
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1o0amh9">
63
+ <bpmndi:BPMNShape id="Participant_15tkgjw_di" bpmnElement="Participant_1">
64
+ <dc:Bounds x="160" y="122" width="600" height="477" />
91
65
  </bpmndi:BPMNShape>
92
- <bpmndi:BPMNShape id="_BPMNShape_Lane_2" bpmnElement="lane-1" isHorizontal="true">
93
- <dc:Bounds x="90" y="48" width="510" height="277" />
66
+ <bpmndi:BPMNShape id="Lane_00fz5ca_di" bpmnElement="Lane_2">
67
+ <dc:Bounds x="190" y="122" width="570" height="250" />
94
68
  </bpmndi:BPMNShape>
95
- <bpmndi:BPMNShape id="_BPMNShape_Lane_3" bpmnElement="nested-lane-1-1" isHorizontal="true">
96
- <dc:Bounds x="120" y="48" width="480" height="133" />
69
+ <bpmndi:BPMNShape id="Lane_1qi2aws_di" bpmnElement="Lane_1">
70
+ <dc:Bounds x="190" y="372" width="570" height="227" />
97
71
  </bpmndi:BPMNShape>
98
- <bpmndi:BPMNShape id="_BPMNShape_Lane_4" bpmnElement="nested-lane-1-2" isHorizontal="true">
99
- <dc:Bounds x="120" y="180" width="480" height="145" />
72
+ <bpmndi:BPMNShape id="SubProcess_194zznr_di" bpmnElement="SubProcess_1" isExpanded="true">
73
+ <dc:Bounds x="311" y="147" width="350" height="200" />
100
74
  </bpmndi:BPMNShape>
101
- <bpmndi:BPMNShape id="_BPMNShape_Lane_5" bpmnElement="lane-2" isHorizontal="true">
102
- <dc:Bounds x="90" y="324" width="510" height="337" />
103
- </bpmndi:BPMNShape>
104
- <bpmndi:BPMNShape id="_BPMNShape_Lane_6" bpmnElement="nested-lane-no-label" isHorizontal="true">
105
- <dc:Bounds x="120" y="324" width="480" height="337" />
106
- </bpmndi:BPMNShape>
107
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_2" bpmnElement="subprocess-expanded" isExpanded="true">
108
- <dc:Bounds x="359" y="364" width="200" height="150" />
109
- </bpmndi:BPMNShape>
110
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_3" bpmnElement="subprocess-collapsed">
111
- <dc:Bounds x="156" y="364" width="100" height="80" />
112
- </bpmndi:BPMNShape>
113
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="nested-embedded-start-event">
114
- <dc:Bounds x="188" y="386" width="36" height="36" />
75
+ <bpmndi:BPMNShape id="StartEvent_0909sti_di" bpmnElement="StartEvent_1">
76
+ <dc:Bounds x="223" y="229" width="36" height="36" />
115
77
  <bpmndi:BPMNLabel>
116
- <dc:Bounds x="173" y="427" width="66" height="22" />
78
+ <dc:Bounds x="228" y="265" width="25" height="12" />
117
79
  </bpmndi:BPMNLabel>
118
80
  </bpmndi:BPMNShape>
119
- <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="task-nested-embedded">
120
- <dc:Bounds x="432" y="408" width="100" height="80" />
121
- </bpmndi:BPMNShape>
122
- <bpmndi:BPMNShape id="_BPMNShape_Participant_3" bpmnElement="collapsed-pool" isHorizontal="true">
123
- <dc:Bounds x="672" y="336" width="385" height="100" />
124
- </bpmndi:BPMNShape>
125
- <bpmndi:BPMNShape id="_BPMNShape_TextAnnotation_2" bpmnElement="text-annotation">
126
- <dc:Bounds x="60" y="669" width="147" height="98" />
127
- </bpmndi:BPMNShape>
128
- <bpmndi:BPMNEdge id="BPMNEdge_Association_1" bpmnElement="Association_1" sourceElement="_BPMNShape_TextAnnotation_2" targetElement="_BPMNShape_SubProcess_2">
129
- <di:waypoint xsi:type="dc:Point" x="190" y="669" />
130
- <di:waypoint xsi:type="dc:Point" x="371" y="514" />
131
- </bpmndi:BPMNEdge>
132
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_2" bpmnElement="call-activity">
133
- <dc:Bounds x="422" y="202" width="100" height="80" />
134
- </bpmndi:BPMNShape>
135
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_3" bpmnElement="start-event">
136
- <dc:Bounds x="168" y="96" width="36" height="36" />
81
+ <bpmndi:BPMNEdge id="SequenceFlow_140ewlr_di" bpmnElement="SequenceFlow_2">
82
+ <di:waypoint xsi:type="dc:Point" x="259" y="247" />
83
+ <di:waypoint xsi:type="dc:Point" x="311" y="247" />
137
84
  <bpmndi:BPMNLabel>
138
- <dc:Bounds x="153" y="137" width="66" height="22" />
85
+ <dc:Bounds x="285" y="232" width="0" height="0" />
139
86
  </bpmndi:BPMNLabel>
87
+ </bpmndi:BPMNEdge>
88
+ <bpmndi:BPMNShape id="TextAnnotation_0vwfagl_di" bpmnElement="TextAnnotation_1">
89
+ <dc:Bounds x="814" y="122" width="100" height="30" />
140
90
  </bpmndi:BPMNShape>
141
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_2" bpmnElement="intermediate-throw-event">
142
- <dc:Bounds x="397" y="96" width="36" height="36" />
91
+ <bpmndi:BPMNEdge id="Association_0ckvfj2_di" bpmnElement="Association_0ckvfj2">
92
+ <di:waypoint xsi:type="dc:Point" x="661" y="196" />
93
+ <di:waypoint xsi:type="dc:Point" x="814" y="152" />
94
+ </bpmndi:BPMNEdge>
95
+ <bpmndi:BPMNShape id="StartEvent_08jn2xd_di" bpmnElement="StartEvent_08jn2xd">
96
+ <dc:Bounds x="223" y="416" width="36" height="36" />
143
97
  <bpmndi:BPMNLabel>
144
- <dc:Bounds x="371" y="137" width="90" height="38" />
98
+ <dc:Bounds x="228" y="452" width="25" height="24" />
145
99
  </bpmndi:BPMNLabel>
146
100
  </bpmndi:BPMNShape>
147
- <bpmndi:BPMNShape id="_BPMNShape_UserTask_2" bpmnElement="user-task">
148
- <dc:Bounds x="180" y="192" width="100" height="80" />
149
- </bpmndi:BPMNShape>
150
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_2" bpmnElement="boundary-event">
151
- <dc:Bounds x="228" y="254" width="36" height="36" />
152
- <bpmndi:BPMNLabel>
153
- <dc:Bounds x="200" y="295" width="93" height="22" />
154
- </bpmndi:BPMNLabel>
101
+ <bpmndi:BPMNShape id="Task_1i068gk_di" bpmnElement="Task_1">
102
+ <dc:Bounds x="436" y="394" width="100" height="80" />
155
103
  </bpmndi:BPMNShape>
156
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_2" bpmnElement="exclusive-gateway" isMarkerVisible="true">
157
- <dc:Bounds x="312" y="89" width="50" height="50" />
104
+ <bpmndi:BPMNEdge id="SequenceFlow_088kva8_di" bpmnElement="SequenceFlow_1">
105
+ <di:waypoint xsi:type="dc:Point" x="259" y="434" />
106
+ <di:waypoint xsi:type="dc:Point" x="436" y="434" />
158
107
  <bpmndi:BPMNLabel>
159
- <dc:Bounds x="306" y="48" width="64" height="38" />
108
+ <dc:Bounds x="335" y="409" width="25" height="12" />
160
109
  </bpmndi:BPMNLabel>
161
- </bpmndi:BPMNShape>
162
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="sequenceflow-unlabeled" sourceElement="_BPMNShape_StartEvent_3" targetElement="_BPMNShape_ExclusiveGateway_2">
163
- <di:waypoint xsi:type="dc:Point" x="204" y="114" />
164
- <di:waypoint xsi:type="dc:Point" x="312" y="114" />
110
+ </bpmndi:BPMNEdge>
111
+ <bpmndi:BPMNEdge id="SequenceFlow_14kuv1e_di" bpmnElement="SequenceFlow_14kuv1e">
112
+ <di:waypoint xsi:type="dc:Point" x="486" y="347" />
113
+ <di:waypoint xsi:type="dc:Point" x="486" y="394" />
165
114
  <bpmndi:BPMNLabel>
166
- <dc:Bounds x="243" y="114" width="6" height="6" />
115
+ <dc:Bounds x="501" y="360.5" width="0" height="0" />
167
116
  </bpmndi:BPMNLabel>
168
117
  </bpmndi:BPMNEdge>
169
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="sequence-flow-no" sourceElement="_BPMNShape_ExclusiveGateway_2" targetElement="_BPMNShape_CallActivity_2">
170
- <di:waypoint xsi:type="dc:Point" x="337" y="139" />
171
- <di:waypoint xsi:type="dc:Point" x="337" y="242" />
172
- <di:waypoint xsi:type="dc:Point" x="422" y="242" />
118
+ <bpmndi:BPMNShape id="Task_1fo1fvh_di" bpmnElement="Task_1fo1fvh">
119
+ <dc:Bounds x="436" y="500" width="100" height="80" />
120
+ </bpmndi:BPMNShape>
121
+ <bpmndi:BPMNEdge id="SequenceFlow_13rjp44_di" bpmnElement="SequenceFlow_13rjp44">
122
+ <di:waypoint xsi:type="dc:Point" x="486" y="474" />
123
+ <di:waypoint xsi:type="dc:Point" x="486" y="500" />
173
124
  <bpmndi:BPMNLabel>
174
- <dc:Bounds x="342" y="204" width="20" height="22" />
125
+ <dc:Bounds x="501" y="477" width="0" height="0" />
175
126
  </bpmndi:BPMNLabel>
176
127
  </bpmndi:BPMNEdge>
177
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="sequence-flow-yes" sourceElement="_BPMNShape_ExclusiveGateway_2" targetElement="_BPMNShape_IntermediateThrowEvent_2">
178
- <di:waypoint xsi:type="dc:Point" x="362" y="114" />
179
- <di:waypoint xsi:type="dc:Point" x="397" y="114" />
128
+ <bpmndi:BPMNShape id="ExclusiveGateway_1dulwbf_di" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
129
+ <dc:Bounds x="578" y="515" width="50" height="50" />
180
130
  <bpmndi:BPMNLabel>
181
- <dc:Bounds x="335.49989765458423" y="114" width="90" height="22" />
131
+ <dc:Bounds x="590" y="565" width="25" height="12" />
182
132
  </bpmndi:BPMNLabel>
183
- </bpmndi:BPMNEdge>
184
- <bpmndi:BPMNEdge id="BPMNEdge_MessageFlow_1" bpmnElement="message-flow" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_Participant_3">
185
- <di:waypoint xsi:type="dc:Point" x="532" y="448" />
186
- <di:waypoint xsi:type="dc:Point" x="632" y="448" />
187
- <di:waypoint xsi:type="dc:Point" x="632" y="386" />
188
- <di:waypoint xsi:type="dc:Point" x="672" y="386" />
133
+ </bpmndi:BPMNShape>
134
+ <bpmndi:BPMNEdge id="SequenceFlow_1h7vuvi_di" bpmnElement="SequenceFlow_1h7vuvi">
135
+ <di:waypoint xsi:type="dc:Point" x="536" y="540" />
136
+ <di:waypoint xsi:type="dc:Point" x="578" y="540" />
189
137
  <bpmndi:BPMNLabel>
190
- <dc:Bounds x="612" y="456" width="91" height="38" />
138
+ <dc:Bounds x="557" y="515" width="0" height="0" />
191
139
  </bpmndi:BPMNLabel>
192
140
  </bpmndi:BPMNEdge>
193
- <bpmndi:BPMNShape id="_BPMNShape_DataStoreReference_2" bpmnElement="data-store-reference">
194
- <dc:Bounds x="156" y="547" width="50" height="50" />
141
+ <bpmndi:BPMNShape id="EndEvent_0c4s9zs_di" bpmnElement="EndEvent_1">
142
+ <dc:Bounds x="585" y="416" width="36" height="36" />
195
143
  <bpmndi:BPMNLabel>
196
- <dc:Bounds x="149" y="602" width="64" height="22" />
144
+ <dc:Bounds x="603" y="452" width="0" height="0" />
197
145
  </bpmndi:BPMNLabel>
198
146
  </bpmndi:BPMNShape>
199
- <bpmndi:BPMNShape id="_BPMNShape_DataObjectReference_2" bpmnElement="data-object-reference">
200
- <dc:Bounds x="267" y="547" width="36" height="50" />
147
+ <bpmndi:BPMNEdge id="SequenceFlow_0kmqqm9_di" bpmnElement="SequenceFlow_0kmqqm9">
148
+ <di:waypoint xsi:type="dc:Point" x="536" y="434" />
149
+ <di:waypoint xsi:type="dc:Point" x="585" y="434" />
201
150
  <bpmndi:BPMNLabel>
202
- <dc:Bounds x="245" y="602" width="80" height="38" />
151
+ <dc:Bounds x="561" y="409" width="0" height="0" />
203
152
  </bpmndi:BPMNLabel>
204
- </bpmndi:BPMNShape>
205
- <bpmndi:BPMNShape id="_BPMNShape_DataInput_2" bpmnElement="data-input">
206
- <dc:Bounds x="372" y="547" width="36" height="50" />
153
+ </bpmndi:BPMNEdge>
154
+ <bpmndi:BPMNShape id="DataObjectReference_024w45b_di" bpmnElement="DataObjectReference_1">
155
+ <dc:Bounds x="223" y="515" width="36" height="50" />
207
156
  <bpmndi:BPMNLabel>
208
- <dc:Bounds x="390" y="602" width="0" height="0" />
157
+ <dc:Bounds x="241" y="565" width="0" height="0" />
209
158
  </bpmndi:BPMNLabel>
210
159
  </bpmndi:BPMNShape>
211
- <bpmndi:BPMNShape id="_BPMNShape_DataOutput_2" bpmnElement="data-output">
212
- <dc:Bounds x="504" y="547" width="36" height="50" />
160
+ <bpmndi:BPMNShape id="DataStoreReference_0b4jv9b_di" bpmnElement="DataStoreReference_1">
161
+ <dc:Bounds x="315.54926829268294" y="515" width="50" height="50" />
213
162
  <bpmndi:BPMNLabel>
214
- <dc:Bounds x="522" y="602" width="0" height="0" />
163
+ <dc:Bounds x="341" y="565" width="0" height="0" />
215
164
  </bpmndi:BPMNLabel>
216
165
  </bpmndi:BPMNShape>
217
- <bpmndi:BPMNEdge id="BPMNEdge_DataInputAssociation_1" bpmnElement="DataInputAssociation_1" sourceElement="_BPMNShape_DataInput_2" targetElement="_BPMNShape_SubProcess_2">
218
- <di:waypoint xsi:type="dc:Point" x="403" y="547" />
219
- <di:waypoint xsi:type="dc:Point" x="420" y="514" />
220
- </bpmndi:BPMNEdge>
221
- <bpmndi:BPMNEdge id="BPMNEdge_DataOutputAssociation_1" bpmnElement="DataOutputAssociation_1" sourceElement="_BPMNShape_SubProcess_2" targetElement="_BPMNShape_DataOutput_2">
222
- <di:waypoint xsi:type="dc:Point" x="495" y="514" />
223
- <di:waypoint xsi:type="dc:Point" x="510" y="547" />
224
- </bpmndi:BPMNEdge>
225
- <bpmndi:BPMNEdge id="BPMNEdge_DataInputAssociation_2" bpmnElement="DataInputAssociation_2" sourceElement="_BPMNShape_DataStoreReference_2" targetElement="_BPMNShape_SubProcess_3">
226
- <di:waypoint xsi:type="dc:Point" x="185" y="547" />
227
- <di:waypoint xsi:type="dc:Point" x="200" y="444" />
228
- </bpmndi:BPMNEdge>
229
- <bpmndi:BPMNEdge id="BPMNEdge_MessageFlow_2" bpmnElement="message-flow-unlabeled" sourceElement="_BPMNShape_Participant_3" targetElement="_BPMNShape_Participant_2">
230
- <di:waypoint xsi:type="dc:Point" x="672" y="386" />
231
- <di:waypoint xsi:type="dc:Point" x="600" y="386" />
166
+ <bpmndi:BPMNEdge id="MessageFlow_0pmpiw7_di" bpmnElement="MessageFlow_1">
167
+ <di:waypoint xsi:type="dc:Point" x="486" y="580" />
168
+ <di:waypoint xsi:type="dc:Point" x="486" y="646" />
232
169
  <bpmndi:BPMNLabel>
233
- <dc:Bounds x="591" y="368" width="90" height="6" />
170
+ <dc:Bounds x="488" y="603" width="25" height="13" />
234
171
  </bpmndi:BPMNLabel>
235
172
  </bpmndi:BPMNEdge>
236
- <bpmndi:BPMNShape id="Task_0da8ze1_di" bpmnElement="empty-task">
237
- <dc:Bounds x="472" y="74" width="100" height="80" />
173
+ <bpmndi:BPMNShape id="Participant_0kzj58d_di" bpmnElement="Participant_2">
174
+ <dc:Bounds x="161" y="646" width="600" height="250" />
238
175
  </bpmndi:BPMNShape>
239
- <bpmndi:BPMNEdge id="SequenceFlow_1r751z0_di" bpmnElement="SequenceFlow_1r751z0">
240
- <di:waypoint xsi:type="dc:Point" x="433" y="114" />
241
- <di:waypoint xsi:type="dc:Point" x="472" y="114" />
242
- <bpmndi:BPMNLabel>
243
- <dc:Bounds x="407.5" y="89" width="90" height="20" />
244
- </bpmndi:BPMNLabel>
245
- </bpmndi:BPMNEdge>
246
176
  </bpmndi:BPMNPlane>
247
177
  </bpmndi:BPMNDiagram>
248
- </bpmn2:definitions>
178
+ </bpmn:definitions>
@@ -58,7 +58,7 @@ describe('features/copy-paste', function() {
58
58
  });
59
59
 
60
60
 
61
- it('should forbid multi paste', inject(
61
+ it('should paste twice', inject(
62
62
  function(elementRegistry, canvas, copyPaste) {
63
63
  // given
64
64
  var element = elementRegistry.get('SubProcess_1kd6ist'),
@@ -70,7 +70,7 @@ describe('features/copy-paste', function() {
70
70
  copyPaste.paste({
71
71
  element: rootElement,
72
72
  point: {
73
- x: 600,
73
+ x: 1000,
74
74
  y: 100
75
75
  }
76
76
  });
@@ -78,14 +78,19 @@ describe('features/copy-paste', function() {
78
78
  copyPaste.paste({
79
79
  element: rootElement,
80
80
  point: {
81
- x: 600,
81
+ x: 1500,
82
82
  y: 275
83
83
  }
84
84
  });
85
85
 
86
86
  // then
87
- // pasted was only once
88
- expect(rootElement.children).to.have.length(2);
87
+ expect(rootElement.children).to.have.length(3);
88
+
89
+ var pastedElements = elementRegistry.filter(function(e) {
90
+ return e !== element && is(e, 'bpmn:SubProcess');
91
+ });
92
+
93
+ expect(pastedElements[0].id).to.not.equal(pastedElements[1].id);
89
94
  }
90
95
  ));
91
96