mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-11 17:44:12 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
3ad47af299
@ -6,6 +6,14 @@ All notable changes to [bpmn-js](https://github.com/bpmn-io/bpmn-js) are documen
|
|||||||
|
|
||||||
___Note:__ Yet to be released changes appear here._
|
___Note:__ Yet to be released changes appear here._
|
||||||
|
|
||||||
|
## 6.0.7
|
||||||
|
|
||||||
|
* `FIX`: disable waypoints-cropping after pasting connections ([`9f8a724e`](https://github.com/bpmn-io/bpmn-js/commit/9f8a724e9a3ff66bfce14e06ab38066189111a95))
|
||||||
|
|
||||||
|
## 6.0.6
|
||||||
|
|
||||||
|
* `FIX`: create nested lanes in the correct parent again ([#1256](https://github.com/bpmn-io/bpmn-js/issues/1256), [#1253](https://github.com/bpmn-io/bpmn-js/issues/1253), [#1254](https://github.com/bpmn-io/bpmn-js/issues/1254))
|
||||||
|
|
||||||
## 6.0.5
|
## 6.0.5
|
||||||
|
|
||||||
* `FIX`: only update `Lane#flownNodeRefs` once during paste ([`4455c3fc`](https://github.com/bpmn-io/bpmn-js/commit/4455c3fc35290e51220566fb6539a1efc4d3612f))
|
* `FIX`: only update `Lane#flownNodeRefs` once during paste ([`4455c3fc`](https://github.com/bpmn-io/bpmn-js/commit/4455c3fc35290e51220566fb6539a1efc4d3612f))
|
||||||
|
@ -47,9 +47,10 @@ export default function BpmnUpdater(
|
|||||||
// crop connection ends during create/update
|
// crop connection ends during create/update
|
||||||
function cropConnection(e) {
|
function cropConnection(e) {
|
||||||
var context = e.context,
|
var context = e.context,
|
||||||
|
hints = context.hints || {},
|
||||||
connection;
|
connection;
|
||||||
|
|
||||||
if (!context.cropped) {
|
if (!context.cropped && hints.createElementsBehavior !== false) {
|
||||||
connection = context.connection;
|
connection = context.connection;
|
||||||
connection.waypoints = connectionDocking.getCroppedWaypoints(connection);
|
connection.waypoints = connectionDocking.getCroppedWaypoints(connection);
|
||||||
context.cropped = true;
|
context.cropped = true;
|
||||||
|
@ -12,9 +12,10 @@ export default function CreateBehavior(injector) {
|
|||||||
|
|
||||||
this.preExecute('shape.create', 1500, function(event) {
|
this.preExecute('shape.create', 1500, function(event) {
|
||||||
var context = event.context,
|
var context = event.context,
|
||||||
parent = context.parent;
|
parent = context.parent,
|
||||||
|
shape = context.shape;
|
||||||
|
|
||||||
if (is(parent, 'bpmn:Lane')) {
|
if (is(parent, 'bpmn:Lane') && !is(shape, 'bpmn:Lane')) {
|
||||||
context.parent = getParent(parent, 'bpmn:Participant');
|
context.parent = getParent(parent, 'bpmn:Participant');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bpmn-js",
|
"name": "bpmn-js",
|
||||||
"version": "6.0.5",
|
"version": "6.0.7",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bpmn-js",
|
"name": "bpmn-js",
|
||||||
"version": "6.0.5",
|
"version": "6.0.7",
|
||||||
"description": "A bpmn 2.0 toolkit and web modeler",
|
"description": "A bpmn 2.0 toolkit and web modeler",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"all": "run-s lint test distro test:distro",
|
"all": "run-s lint test distro test:distro",
|
||||||
|
@ -27,6 +27,11 @@
|
|||||||
<bpmn:incoming>SequenceFlow_4</bpmn:incoming>
|
<bpmn:incoming>SequenceFlow_4</bpmn:incoming>
|
||||||
</bpmn:endEvent>
|
</bpmn:endEvent>
|
||||||
<bpmn:sequenceFlow id="SequenceFlow_4" sourceRef="StartEvent_3" targetRef="EndEvent_3" />
|
<bpmn:sequenceFlow id="SequenceFlow_4" sourceRef="StartEvent_3" targetRef="EndEvent_3" />
|
||||||
|
<bpmn:task id="Task_2">
|
||||||
|
<bpmn:incoming>SequenceFlow_5</bpmn:incoming>
|
||||||
|
<bpmn:outgoing>SequenceFlow_5</bpmn:outgoing>
|
||||||
|
</bpmn:task>
|
||||||
|
<bpmn:sequenceFlow id="SequenceFlow_5" sourceRef="Task_2" targetRef="Task_2" />
|
||||||
</bpmn:process>
|
</bpmn:process>
|
||||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
|
||||||
@ -94,6 +99,16 @@
|
|||||||
<dc:Bounds x="314" y="364" width="0" height="0" />
|
<dc:Bounds x="314" y="364" width="0" height="0" />
|
||||||
</bpmndi:BPMNLabel>
|
</bpmndi:BPMNLabel>
|
||||||
</bpmndi:BPMNEdge>
|
</bpmndi:BPMNEdge>
|
||||||
|
<bpmndi:BPMNShape id="Task_15aeig4_di" bpmnElement="Task_2">
|
||||||
|
<dc:Bounds x="258" y="450" width="100" height="80" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNEdge id="SequenceFlow_0giidzv_di" bpmnElement="SequenceFlow_5">
|
||||||
|
<di:waypoint x="308" y="530" />
|
||||||
|
<di:waypoint x="308" y="550" />
|
||||||
|
<di:waypoint x="238" y="550" />
|
||||||
|
<di:waypoint x="238" y="490" />
|
||||||
|
<di:waypoint x="258" y="490" />
|
||||||
|
</bpmndi:BPMNEdge>
|
||||||
</bpmndi:BPMNPlane>
|
</bpmndi:BPMNPlane>
|
||||||
</bpmndi:BPMNDiagram>
|
</bpmndi:BPMNDiagram>
|
||||||
</bpmn:definitions>
|
</bpmn:definitions>
|
||||||
|
@ -117,6 +117,34 @@ describe('features - bpmn-updater', function() {
|
|||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
it('should not crop connection after pasting', inject(
|
||||||
|
function(canvas, copyPaste, elementRegistry, connectionDocking) {
|
||||||
|
|
||||||
|
// given
|
||||||
|
var sequenceFlow = elementRegistry.get('SequenceFlow_5'),
|
||||||
|
target = elementRegistry.get('Task_2'),
|
||||||
|
cropSpy = sinon.spy(connectionDocking, 'getCroppedWaypoints');
|
||||||
|
|
||||||
|
copyPaste.copy([
|
||||||
|
target,
|
||||||
|
sequenceFlow
|
||||||
|
]);
|
||||||
|
|
||||||
|
// when
|
||||||
|
copyPaste.paste({
|
||||||
|
element: canvas.getRootElement(),
|
||||||
|
point: {
|
||||||
|
x: 500,
|
||||||
|
y: 500
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// then
|
||||||
|
expect(cropSpy).not.to.have.been.calledOnce;
|
||||||
|
}
|
||||||
|
));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
44
test/spec/features/modeling/lanes/SplitLane.nested.bpmn
Normal file
44
test/spec/features/modeling/lanes/SplitLane.nested.bpmn
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_0czfmdy" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.5.0">
|
||||||
|
<bpmn:collaboration id="Collaboration_166yin4">
|
||||||
|
<bpmn:participant id="Participant" name="Participant" processRef="Process" />
|
||||||
|
</bpmn:collaboration>
|
||||||
|
<bpmn:process id="Process" isExecutable="true">
|
||||||
|
<bpmn:laneSet id="LaneSet_113taei">
|
||||||
|
<bpmn:lane id="Lane" name="Lane">
|
||||||
|
<bpmn:flowNodeRef>Event</bpmn:flowNodeRef>
|
||||||
|
<bpmn:flowNodeRef>Task</bpmn:flowNodeRef>
|
||||||
|
</bpmn:lane>
|
||||||
|
</bpmn:laneSet>
|
||||||
|
<bpmn:startEvent id="Event" name="Event">
|
||||||
|
<bpmn:outgoing>SequenceFlow_192h0e0</bpmn:outgoing>
|
||||||
|
</bpmn:startEvent>
|
||||||
|
<bpmn:task id="Task" name="Task">
|
||||||
|
<bpmn:incoming>SequenceFlow_192h0e0</bpmn:incoming>
|
||||||
|
</bpmn:task>
|
||||||
|
<bpmn:sequenceFlow id="SequenceFlow_192h0e0" sourceRef="Event" targetRef="Task" />
|
||||||
|
</bpmn:process>
|
||||||
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||||
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_166yin4">
|
||||||
|
<bpmndi:BPMNShape id="Participant_00t6m8v_di" bpmnElement="Participant" isHorizontal="true">
|
||||||
|
<dc:Bounds x="170" y="90" width="791" height="450" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Event">
|
||||||
|
<dc:Bounds x="323" y="152" width="36" height="36" />
|
||||||
|
<bpmndi:BPMNLabel>
|
||||||
|
<dc:Bounds x="327" y="195" width="29" height="14" />
|
||||||
|
</bpmndi:BPMNLabel>
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="Task_05q93nk_di" bpmnElement="Task">
|
||||||
|
<dc:Bounds x="411" y="130" width="100" height="80" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNEdge id="SequenceFlow_192h0e0_di" bpmnElement="SequenceFlow_192h0e0">
|
||||||
|
<di:waypoint x="359" y="170" />
|
||||||
|
<di:waypoint x="411" y="170" />
|
||||||
|
</bpmndi:BPMNEdge>
|
||||||
|
<bpmndi:BPMNShape id="Lane_1f7sfho_di" bpmnElement="Lane" isHorizontal="true">
|
||||||
|
<dc:Bounds x="200" y="90" width="761" height="450" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
</bpmndi:BPMNPlane>
|
||||||
|
</bpmndi:BPMNDiagram>
|
||||||
|
</bpmn:definitions>
|
@ -18,12 +18,13 @@ function getBounds(element) {
|
|||||||
|
|
||||||
describe('features/modeling - SplitLane', function() {
|
describe('features/modeling - SplitLane', function() {
|
||||||
|
|
||||||
|
var testModules = [ coreModule, modelingModule ];
|
||||||
|
|
||||||
|
|
||||||
describe('should split Participant with Lane', function() {
|
describe('should split Participant with Lane', function() {
|
||||||
|
|
||||||
var diagramXML = require('./participant-lane.bpmn');
|
var diagramXML = require('./participant-lane.bpmn');
|
||||||
|
|
||||||
var testModules = [ coreModule, modelingModule ];
|
|
||||||
|
|
||||||
beforeEach(bootstrapModeler(diagramXML, { modules: testModules }));
|
beforeEach(bootstrapModeler(diagramXML, { modules: testModules }));
|
||||||
|
|
||||||
|
|
||||||
@ -124,8 +125,6 @@ describe('features/modeling - SplitLane', function() {
|
|||||||
|
|
||||||
var diagramXML = require('./participant-no-lane.bpmn');
|
var diagramXML = require('./participant-no-lane.bpmn');
|
||||||
|
|
||||||
var testModules = [ coreModule, modelingModule ];
|
|
||||||
|
|
||||||
beforeEach(bootstrapModeler(diagramXML, { modules: testModules }));
|
beforeEach(bootstrapModeler(diagramXML, { modules: testModules }));
|
||||||
|
|
||||||
|
|
||||||
@ -148,7 +147,7 @@ describe('features/modeling - SplitLane', function() {
|
|||||||
expect(participantShape).to.have.bounds(oldBounds);
|
expect(participantShape).to.have.bounds(oldBounds);
|
||||||
|
|
||||||
// and two child lanes
|
// and two child lanes
|
||||||
expect(childLanes.length).to.eql(2);
|
expect(childLanes).to.have.length(2);
|
||||||
|
|
||||||
// with respective bounds
|
// with respective bounds
|
||||||
expect(childLanes[0]).to.have.bounds({
|
expect(childLanes[0]).to.have.bounds({
|
||||||
@ -186,7 +185,7 @@ describe('features/modeling - SplitLane', function() {
|
|||||||
expect(participantShape).to.have.bounds(oldBounds);
|
expect(participantShape).to.have.bounds(oldBounds);
|
||||||
|
|
||||||
// and two child lanes
|
// and two child lanes
|
||||||
expect(childLanes.length).to.eql(3);
|
expect(childLanes).to.have.length(3);
|
||||||
|
|
||||||
// with respective bounds
|
// with respective bounds
|
||||||
expect(childLanes[0]).to.have.bounds({
|
expect(childLanes[0]).to.have.bounds({
|
||||||
@ -213,4 +212,60 @@ describe('features/modeling - SplitLane', function() {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
describe('should split nested Lane', function() {
|
||||||
|
|
||||||
|
var diagramXML = require('./SplitLane.nested.bpmn');
|
||||||
|
|
||||||
|
beforeEach(bootstrapModeler(diagramXML, { modules: testModules }));
|
||||||
|
|
||||||
|
|
||||||
|
it('into two lanes', inject(function(elementRegistry, modeling) {
|
||||||
|
|
||||||
|
// given
|
||||||
|
var laneShape = elementRegistry.get('Lane'),
|
||||||
|
laneBo = laneShape.businessObject,
|
||||||
|
oldBounds = getBounds(laneShape);
|
||||||
|
|
||||||
|
// when
|
||||||
|
modeling.splitLane(laneShape, 2);
|
||||||
|
|
||||||
|
var childLanes = getChildLanes(laneShape);
|
||||||
|
|
||||||
|
var newLaneHeight = Math.round(laneShape.height / 2);
|
||||||
|
|
||||||
|
// then
|
||||||
|
|
||||||
|
// participant has original size
|
||||||
|
expect(laneShape).to.have.bounds(oldBounds);
|
||||||
|
|
||||||
|
// and two child lanes
|
||||||
|
expect(childLanes).to.have.length(2);
|
||||||
|
|
||||||
|
// with respective bounds
|
||||||
|
expect(childLanes[0]).to.have.bounds({
|
||||||
|
x: laneShape.x + 30,
|
||||||
|
y: laneShape.y,
|
||||||
|
width: laneShape.width - 30,
|
||||||
|
height: newLaneHeight
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(childLanes[1]).to.have.bounds({
|
||||||
|
x: laneShape.x + 30,
|
||||||
|
y: laneShape.y + newLaneHeight,
|
||||||
|
width: laneShape.width - 30,
|
||||||
|
height: newLaneHeight
|
||||||
|
});
|
||||||
|
|
||||||
|
// BPMN internals are properly updated
|
||||||
|
expect(laneBo.childLaneSet).to.exist;
|
||||||
|
expect(laneBo.childLaneSet.lanes).to.eql([
|
||||||
|
childLanes[0].businessObject,
|
||||||
|
childLanes[1].businessObject
|
||||||
|
]);
|
||||||
|
|
||||||
|
}));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
@ -1,9 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<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="_2_FUoE-xEeWT0c1N_GlSWA" targetNamespace="http://activiti.org/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.0-dev" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
|
<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="_2_FUoE-xEeWT0c1N_GlSWA" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="2.2.4" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
|
||||||
<bpmn2:collaboration id="_Collaboration_2">
|
<bpmn2:collaboration id="Collaboration">
|
||||||
<bpmn2:participant id="Participant_A" name="Participant_A" processRef="Process_A" />
|
<bpmn2:participant id="Participant_A" name="Participant_A" processRef="Process_A" />
|
||||||
<bpmn2:participant id="Participant_B" name="Participant_B" processRef="Process_B" />
|
<bpmn2:participant id="Participant_B" name="Participant_B" processRef="Process_B" />
|
||||||
<bpmn2:participant id="Participant_0emukbw" name="Participant_C" processRef="Process_1gjk6nk" />
|
<bpmn2:participant id="Participant_C" name="Participant_C" processRef="Process_C" />
|
||||||
|
<bpmn2:participant id="Participant_D" name="Participant_D" processRef="Process_D" />
|
||||||
</bpmn2:collaboration>
|
</bpmn2:collaboration>
|
||||||
<bpmn2:process id="Process_A" isExecutable="false">
|
<bpmn2:process id="Process_A" isExecutable="false">
|
||||||
<bpmn2:laneSet id="LaneSet_1" name="Lane Set 1">
|
<bpmn2:laneSet id="LaneSet_1" name="Lane Set 1">
|
||||||
@ -23,22 +24,37 @@
|
|||||||
<bpmn2:process id="Process_B" isExecutable="false">
|
<bpmn2:process id="Process_B" isExecutable="false">
|
||||||
<bpmn2:task id="Task_B" name="Task_B" />
|
<bpmn2:task id="Task_B" name="Task_B" />
|
||||||
</bpmn2:process>
|
</bpmn2:process>
|
||||||
<bpmn2:process id="Process_1gjk6nk" isExecutable="false">
|
<bpmn2:process id="Process_C" isExecutable="false">
|
||||||
<bpmn2:laneSet id="LaneSet_06y7y48">
|
<bpmn2:laneSet id="LaneSet_06y7y48">
|
||||||
<bpmn2:lane id="Participant_C_Lane_1">
|
<bpmn2:lane id="Participant_C_Lane_1" name="Participant_C_Lane_1">
|
||||||
<bpmn2:flowNodeRef>Task_1</bpmn2:flowNodeRef>
|
<bpmn2:flowNodeRef>Task_C</bpmn2:flowNodeRef>
|
||||||
<bpmn2:flowNodeRef>IntermediateThrowEvent</bpmn2:flowNodeRef>
|
<bpmn2:flowNodeRef>IntermediateThrowEvent</bpmn2:flowNodeRef>
|
||||||
</bpmn2:lane>
|
</bpmn2:lane>
|
||||||
<bpmn2:lane id="Participant_C_Lane_2">
|
<bpmn2:lane id="Participant_C_Lane_2" name="Participant_C_Lane_2">
|
||||||
<bpmn2:flowNodeRef>Task_2</bpmn2:flowNodeRef>
|
<bpmn2:flowNodeRef>Task_D</bpmn2:flowNodeRef>
|
||||||
</bpmn2:lane>
|
</bpmn2:lane>
|
||||||
</bpmn2:laneSet>
|
</bpmn2:laneSet>
|
||||||
<bpmn2:task id="Task_1" />
|
<bpmn2:task id="Task_C" name="Task_C" />
|
||||||
<bpmn2:task id="Task_2" />
|
<bpmn2:task id="Task_D" name="Task_D" />
|
||||||
<bpmn2:intermediateThrowEvent id="IntermediateThrowEvent" />
|
<bpmn2:intermediateThrowEvent id="IntermediateThrowEvent" />
|
||||||
</bpmn2:process>
|
</bpmn2:process>
|
||||||
|
<bpmn2:process id="Process_D" isExecutable="false">
|
||||||
|
<bpmn2:laneSet id="LaneSet_1fp2wy1">
|
||||||
|
<bpmn2:lane id="Lane_D_1" name="Lane_D_1">
|
||||||
|
<bpmn2:flowNodeRef>Task_E</bpmn2:flowNodeRef>
|
||||||
|
<bpmn2:childLaneSet id="LaneSet_10kvuaz">
|
||||||
|
<bpmn2:lane id="Lane_D_1_2" name="Lane_D_1_2" />
|
||||||
|
<bpmn2:lane id="Lane_D_1_1" name="Lane_D_1_1">
|
||||||
|
<bpmn2:flowNodeRef>Task_E</bpmn2:flowNodeRef>
|
||||||
|
</bpmn2:lane>
|
||||||
|
</bpmn2:childLaneSet>
|
||||||
|
</bpmn2:lane>
|
||||||
|
<bpmn2:lane id="Lane_0z1sraf" />
|
||||||
|
</bpmn2:laneSet>
|
||||||
|
<bpmn2:task id="Task_E" name="Task_E" />
|
||||||
|
</bpmn2:process>
|
||||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="_Collaboration_2">
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration">
|
||||||
<bpmndi:BPMNShape id="_BPMNShape_Participant_2" bpmnElement="Participant_A" isHorizontal="true">
|
<bpmndi:BPMNShape id="_BPMNShape_Participant_2" bpmnElement="Participant_A" isHorizontal="true">
|
||||||
<dc:Bounds x="154" y="96" width="540" height="145" />
|
<dc:Bounds x="154" y="96" width="540" height="145" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
@ -67,7 +83,7 @@
|
|||||||
<bpmndi:BPMNShape id="_BPMNShape_Task_3" bpmnElement="Task_B">
|
<bpmndi:BPMNShape id="_BPMNShape_Task_3" bpmnElement="Task_B">
|
||||||
<dc:Bounds x="562" y="339" width="100" height="80" />
|
<dc:Bounds x="562" y="339" width="100" height="80" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="Participant_0emukbw_di" bpmnElement="Participant_0emukbw" isHorizontal="true">
|
<bpmndi:BPMNShape id="Participant_C_di" bpmnElement="Participant_C" isHorizontal="true">
|
||||||
<dc:Bounds x="154" y="475" width="540" height="285" />
|
<dc:Bounds x="154" y="475" width="540" height="285" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="Lane_0lsm3hs_di" bpmnElement="Participant_C_Lane_1" isHorizontal="true">
|
<bpmndi:BPMNShape id="Lane_0lsm3hs_di" bpmnElement="Participant_C_Lane_1" isHorizontal="true">
|
||||||
@ -76,15 +92,33 @@
|
|||||||
<bpmndi:BPMNShape id="Lane_16dmnot_di" bpmnElement="Participant_C_Lane_2" isHorizontal="true">
|
<bpmndi:BPMNShape id="Lane_16dmnot_di" bpmnElement="Participant_C_Lane_2" isHorizontal="true">
|
||||||
<dc:Bounds x="184" y="625" width="510" height="135" />
|
<dc:Bounds x="184" y="625" width="510" height="135" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="Task_1abs8bh_di" bpmnElement="Task_1">
|
<bpmndi:BPMNShape id="Task_1abs8bh_di" bpmnElement="Task_C">
|
||||||
<dc:Bounds x="230" y="510" width="100" height="80" />
|
<dc:Bounds x="230" y="510" width="100" height="80" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="IntermediateThrowEvent_0oto7vx_di" bpmnElement="IntermediateThrowEvent">
|
<bpmndi:BPMNShape id="IntermediateThrowEvent_0oto7vx_di" bpmnElement="IntermediateThrowEvent">
|
||||||
<dc:Bounds x="592" y="532" width="36" height="36" />
|
<dc:Bounds x="592" y="532" width="36" height="36" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="Task_0j7a294_di" bpmnElement="Task_2">
|
<bpmndi:BPMNShape id="Task_0j7a294_di" bpmnElement="Task_D">
|
||||||
<dc:Bounds x="230" y="650" width="100" height="80" />
|
<dc:Bounds x="230" y="650" width="100" height="80" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="Participant_D_di" bpmnElement="Participant_D">
|
||||||
|
<dc:Bounds x="154" y="835" width="539" height="379" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="Lane_1x5l7tv_di" bpmnElement="Lane_D_1">
|
||||||
|
<dc:Bounds x="184" y="835" width="509" height="315" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="Lane_0z1sraf_di" bpmnElement="Lane_0z1sraf">
|
||||||
|
<dc:Bounds x="184" y="1150" width="509" height="64" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="Lane_0l34pdv_di" bpmnElement="Lane_D_1_2">
|
||||||
|
<dc:Bounds x="214" y="835" width="479" height="137" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="Lane_05oigjv_di" bpmnElement="Lane_D_1_1">
|
||||||
|
<dc:Bounds x="214" y="972" width="479" height="178" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="Task_196nq81_di" bpmnElement="Task_E">
|
||||||
|
<dc:Bounds x="358" y="1011" width="100" height="80" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
</bpmndi:BPMNPlane>
|
</bpmndi:BPMNPlane>
|
||||||
</bpmndi:BPMNDiagram>
|
</bpmndi:BPMNDiagram>
|
||||||
</bpmn2:definitions>
|
</bpmn2:definitions>
|
@ -7,12 +7,16 @@ import modelingModule from 'lib/features/modeling';
|
|||||||
import coreModule from 'lib/core';
|
import coreModule from 'lib/core';
|
||||||
import copyPasteModule from 'lib/features/copy-paste';
|
import copyPasteModule from 'lib/features/copy-paste';
|
||||||
|
|
||||||
|
import {
|
||||||
|
find
|
||||||
|
} from 'min-dash';
|
||||||
|
|
||||||
/* global sinon */
|
/* global sinon */
|
||||||
|
|
||||||
|
|
||||||
describe('features/modeling - lanes - flowNodeRefs', function() {
|
describe('features/modeling - lanes - flowNodeRefs', function() {
|
||||||
|
|
||||||
var diagramXML = require('./flowNodeRefs.bpmn');
|
var diagramXML = require('./UpdateFlowNodeRefs.basic.bpmn');
|
||||||
|
|
||||||
beforeEach(bootstrapModeler(diagramXML, {
|
beforeEach(bootstrapModeler(diagramXML, {
|
||||||
modules: [
|
modules: [
|
||||||
@ -279,8 +283,8 @@ describe('features/modeling - lanes - flowNodeRefs', function() {
|
|||||||
// given
|
// given
|
||||||
var eventID = 'IntermediateThrowEvent',
|
var eventID = 'IntermediateThrowEvent',
|
||||||
throwEvent = elementRegistry.get(eventID),
|
throwEvent = elementRegistry.get(eventID),
|
||||||
task1 = elementRegistry.get('Task_1'),
|
task1 = elementRegistry.get('Task_C'),
|
||||||
task2 = elementRegistry.get('Task_2'),
|
task2 = elementRegistry.get('Task_D'),
|
||||||
lane1 = elementRegistry.get('Participant_C_Lane_1').businessObject,
|
lane1 = elementRegistry.get('Participant_C_Lane_1').businessObject,
|
||||||
lane2 = elementRegistry.get('Participant_C_Lane_2').businessObject;
|
lane2 = elementRegistry.get('Participant_C_Lane_2').businessObject;
|
||||||
|
|
||||||
@ -304,7 +308,7 @@ describe('features/modeling - lanes - flowNodeRefs', function() {
|
|||||||
it('execute', inject(function(canvas, eventBus, elementRegistry, copyPaste) {
|
it('execute', inject(function(canvas, eventBus, elementRegistry, copyPaste) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var participant = elementRegistry.get('Participant_A');
|
var participant = elementRegistry.get('Participant_D');
|
||||||
|
|
||||||
var updateRefsSpy = sinon.spy();
|
var updateRefsSpy = sinon.spy();
|
||||||
|
|
||||||
@ -313,7 +317,7 @@ describe('features/modeling - lanes - flowNodeRefs', function() {
|
|||||||
// when
|
// when
|
||||||
copyPaste.copy(participant);
|
copyPaste.copy(participant);
|
||||||
|
|
||||||
copyPaste.paste({
|
var pastedElements = copyPaste.paste({
|
||||||
element: canvas.getRootElement(),
|
element: canvas.getRootElement(),
|
||||||
point: {
|
point: {
|
||||||
x: 350,
|
x: 350,
|
||||||
@ -321,8 +325,18 @@ describe('features/modeling - lanes - flowNodeRefs', function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var pastedLane = find(pastedElements, function(e) {
|
||||||
|
return e.businessObject.name === 'Lane_D_1_1';
|
||||||
|
});
|
||||||
|
|
||||||
|
var pastedTask = find(pastedElements, function(e) {
|
||||||
|
return e.businessObject.name === 'Task_E';
|
||||||
|
});
|
||||||
|
|
||||||
// then
|
// then
|
||||||
expect(updateRefsSpy).to.have.been.calledOnce;
|
expect(updateRefsSpy).to.have.been.calledOnce;
|
||||||
|
|
||||||
|
expect(pastedLane.businessObject.flowNodeRef).to.include(pastedTask.businessObject);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_4bAZoD9WEeWLcNBL4nCk1A" exporter="camunda modeler" exporterVersion="2.6.0" targetNamespace="http://activiti.org/bpmn">
|
<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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_4bAZoD9WEeWLcNBL4nCk1A" exporter="camunda modeler" exporterVersion="2.6.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
|
||||||
<bpmn2:collaboration id="_Collaboration_2">
|
<bpmn2:collaboration id="_Collaboration_2">
|
||||||
<bpmn2:participant id="Participant_Lane" name="Participant_Lane" processRef="Process_Lane"/>
|
<bpmn2:participant id="Participant_Lane" name="Participant_Lane" processRef="Process_Lane"/>
|
||||||
</bpmn2:collaboration>
|
</bpmn2:collaboration>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<bpmn2:definitions xmlns:bpmn2="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="_DjEdwG27EeW3UIoxwJSm9g" targetNamespace="http://activiti.org/bpmn" exporter="camunda modeler" exporterVersion="2.6.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
|
<bpmn2:definitions xmlns:bpmn2="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="_DjEdwG27EeW3UIoxwJSm9g" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="camunda modeler" exporterVersion="2.6.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
|
||||||
<bpmn2:collaboration id="_Collaboration_3">
|
<bpmn2:collaboration id="_Collaboration_3">
|
||||||
<bpmn2:participant id="Participant_Lane" name="Participant_Lane" processRef="Process_Lane" />
|
<bpmn2:participant id="Participant_Lane" name="Participant_Lane" processRef="Process_Lane" />
|
||||||
</bpmn2:collaboration>
|
</bpmn2:collaboration>
|
||||||
@ -24,4 +24,4 @@
|
|||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
</bpmndi:BPMNPlane>
|
</bpmndi:BPMNPlane>
|
||||||
</bpmndi:BPMNDiagram>
|
</bpmndi:BPMNDiagram>
|
||||||
</bpmn2:definitions>
|
</bpmn2:definitions>
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<bpmn2:definitions xmlns:bpmn2="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="_DjEdwG27EeW3UIoxwJSm9g" targetNamespace="http://activiti.org/bpmn" exporter="camunda modeler" exporterVersion="2.6.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
|
<bpmn2:definitions xmlns:bpmn2="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="_DjEdwG27EeW3UIoxwJSm9g" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="camunda modeler" exporterVersion="2.6.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
|
||||||
<bpmn2:collaboration id="_Collaboration_3">
|
<bpmn2:collaboration id="_Collaboration_3">
|
||||||
<bpmn2:participant id="Participant_No_Lane" name="Participant_No_Lane" processRef="Process_No_Lane" />
|
<bpmn2:participant id="Participant_No_Lane" name="Participant_No_Lane" processRef="Process_No_Lane" />
|
||||||
</bpmn2:collaboration>
|
</bpmn2:collaboration>
|
||||||
@ -19,4 +19,4 @@
|
|||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
</bpmndi:BPMNPlane>
|
</bpmndi:BPMNPlane>
|
||||||
</bpmndi:BPMNDiagram>
|
</bpmndi:BPMNDiagram>
|
||||||
</bpmn2:definitions>
|
</bpmn2:definitions>
|
Loading…
x
Reference in New Issue
Block a user