Skip to content

Commit

Permalink
feat: support zeebe:VersionTag
Browse files Browse the repository at this point in the history
Closes #59
  • Loading branch information
philippfromme committed Jul 9, 2024
1 parent b87ba33 commit c2e49a9
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 1 deletion.
18 changes: 18 additions & 0 deletions resources/zeebe.json
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,24 @@
"isAttr": true
}
]
},
{
"name": "VersionTag",
"superClass": [
"Element"
],
"meta": {
"allowedIn": [
"bpmn:Process"
]
},
"properties": [
{
"name": "value",
"type": "String",
"isAttr": true
}
]
}
]
}
9 changes: 9 additions & 0 deletions test/fixtures/xml/zeebe-versionTag.part.bpmn
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<bpmn:process
id="process-1"
xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:zeebe="http://camunda.org/schema/zeebe/1.0"
>
<bpmn:extensionElements>
<zeebe:versionTag value="v1.0.0" />
</bpmn:extensionElements>
</bpmn:process>
34 changes: 33 additions & 1 deletion test/spec/xml/read.js
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,6 @@ describe('read', function() {

describe('zeebe:ExecutionListener', function() {


it('on Task', async function() {

// given
Expand Down Expand Up @@ -990,7 +989,40 @@ describe('read', function() {
}
});
});

});


describe('zeebe:VersionTag', function() {

it('on Process', async function() {

// given
var xml = readFile('test/fixtures/xml/zeebe-versionTag.part.bpmn');

// when
const {
rootElement: task
} = await moddle.fromXML(xml, 'bpmn:Process');

// then
expect(task).to.jsonEqual({
$type: 'bpmn:Process',
id: 'process-1',
extensionElements: {
$type: 'bpmn:ExtensionElements',
values: [
{
$type: 'zeebe:VersionTag',
value: 'v1.0.0'
}
]
}
});
});

});

});

});
19 changes: 19 additions & 0 deletions test/spec/xml/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,25 @@ describe('write', function() {
expect(xml).to.eql(expectedXML);
});


it('zeebe:VersionTag', async function() {

// given
const moddleElement = moddle.create('zeebe:VersionTag', {
value: 'v1.0.0'
});

const expectedXML = '<zeebe:versionTag ' +
'xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" ' +
'value="v1.0.0" />';

// when
const xml = await write(moddleElement);

// then
expect(xml).to.eql(expectedXML);
});

});

});

0 comments on commit c2e49a9

Please sign in to comment.