Skip to content

Commit

Permalink
fix: adjusted DataAssociation model to match spec
Browse files Browse the repository at this point in the history
Revert "fix: adjusted DataAssociation model to match spec"

This reverts commit e2f16be.

squash
  • Loading branch information
Skaiir committed Jan 20, 2022
1 parent d7c9683 commit ffc1d6d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
5 changes: 5 additions & 0 deletions resources/bpmn/json/bpmn.json
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,11 @@
"BaseElement"
],
"properties": [
{
"name": "name",
"isAttr": true,
"type": "String"
},
{
"name": "sourceRef",
"type": "ItemAwareElement",
Expand Down
27 changes: 15 additions & 12 deletions tasks/transforms/transformBPMN.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,26 @@ module.exports = async function(results) {
model
);

findProperty('DataAssociation#transformation', model).xml = {
serialize: 'property'
};

const dataAssociation = findType('DataAssociation', model);

dataAssociation.properties.push({
name: 'name',
isAttr: true,
type: 'String'
});

model = orderProperties('DataAssociation', [
'name',
'sourceRef',
'targetRef',
'transformation'
'transformation',
'assignment'
], model);

findProperty('DataAssociation#transformation', model).xml = {
serialize: 'property'
};

findType('Choreography', model).superClass = [ 'Collaboration', 'FlowElementsContainer' ];

model = orderProperties('Activity', [
Expand All @@ -166,13 +176,6 @@ module.exports = async function(results) {
'loopCharacteristics'
], model);

model = orderProperties('DataAssociation', [
'sourceRef',
'targetRef',
'transformation',
'assignment'
], model);

findProperty('CallableElement#supportedInterfaceRefs', model).name = 'supportedInterfaceRef';

findProperty('Participant#interfaceRefs', model).name = 'interfaceRef';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<bpmn:startEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
id="StartEvent_1">
<bpmn:dataOutputAssociation id="DataOutputAssociation_1"></bpmn:dataOutputAssociation>
<bpmn:dataOutputAssociation id="DataOutputAssociation_1" name="DataOutputAssociation_1n"></bpmn:dataOutputAssociation>
</bpmn:startEvent>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<bpmn:endEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
id="EndEvent_1">
<bpmn:dataInputAssociation id="DataInputAssociation_1"></bpmn:dataInputAssociation>
<bpmn:dataInputAssociation id="DataInputAssociation_1" name="DataInputAssociation_1n"></bpmn:dataInputAssociation>
</bpmn:endEvent>
4 changes: 2 additions & 2 deletions test/spec/xml/read.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ describe('bpmn-moddle - read', function() {
id: 'EndEvent_1',

dataInputAssociations: [
{ $type: 'bpmn:DataInputAssociation', id: 'DataInputAssociation_1' }
{ $type: 'bpmn:DataInputAssociation', id: 'DataInputAssociation_1', name: 'DataInputAssociation_1n' }
]
};

Expand All @@ -240,7 +240,7 @@ describe('bpmn-moddle - read', function() {
id: 'StartEvent_1',

dataOutputAssociations: [
{ $type: 'bpmn:DataOutputAssociation', id: 'DataOutputAssociation_1' }
{ $type: 'bpmn:DataOutputAssociation', id: 'DataOutputAssociation_1', name: 'DataOutputAssociation_1n' }
]
};

Expand Down

0 comments on commit ffc1d6d

Please sign in to comment.