Skip to content

Commit

Permalink
chore: use commen parent element
Browse files Browse the repository at this point in the history
  • Loading branch information
marstamm committed Jan 7, 2025
1 parent 597c052 commit d530c1d
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 38 deletions.
41 changes: 41 additions & 0 deletions resources/zeebe.json
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,47 @@
}
]
},
{
"name": "LinkedResources",
"superClass": [
"Element"
],
"meta": {
"allowedIn": [
"bpmn:ServiceTask"
]
},
"properties": [
{
"name": "values",
"type": "LinkedResource",
"isMany": true
}
]
},
{
"name": "LinkedResource",
"superClass": [
"Element"
],
"properties": [
{
"name": "resourceId",
"type": "String",
"isAttr": true
},
{
"name": "resourceType",
"type": "String",
"isAttr": true
},
{
"name": "linkName",
"type": "String",
"isAttr": true
}
]
},
{
"name": "UserTask",
"superClass": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@
xmlns:zeebe="http://camunda.org/schema/zeebe/1.0"
>
<bpmn:extensionElements>
<zeebe:linkedResource
resourceId="=myScript"
resourceType="RPA"
bindingType="latest"
></zeebe:linkedResource>
<zeebe:linkedResource
resourceId="=myScript"
resourceType="RPA"
bindingType="versionTag"
versionTag="v1"
></zeebe:linkedResource>
<zeebe:linkedResource
resourceId="=myScript"
resourceType="RPA"
bindingType="versionTag"
versionTag="v1"
linkName="myScript"
></zeebe:linkedResource>
<zeebe:linkedResources>
<zeebe:linkedResource
resourceId="=myScript"
resourceType="RPA"
bindingType="latest"
></zeebe:linkedResource>
<zeebe:linkedResource
resourceId="=myScript"
resourceType="RPA"
bindingType="versionTag"
versionTag="v1"
></zeebe:linkedResource>
<zeebe:linkedResource
resourceId="=myScript"
resourceType="RPA"
bindingType="versionTag"
versionTag="v1"
linkName="myScript"
></zeebe:linkedResource>
</zeebe:linkedResources>
</bpmn:extensionElements>
</bpmn:serviceTask>
46 changes: 26 additions & 20 deletions test/spec/xml/read.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ describe('read', function() {

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

it.only('on ServiceTask', async function() {
it('on ServiceTask', async function() {

// given
var xml = readFile('test/fixtures/xml/zeebe-service-task/serviceTask-zeebe-linkedResource.part.bpmn');
Expand All @@ -338,26 +338,32 @@ describe('read', function() {
$type: 'bpmn:ExtensionElements',
values: [
{
$type: 'zeebe:LinkedResource',
resourceId:'=myScript',
resourceType:'RPA',
bindingType:'latest'
},
{
$type: 'zeebe:LinkedResource',
resourceId: '=myScript',
resourceType: 'RPA',
bindingType: 'versionTag',
versionTag: 'v1'
},
{
$type: 'zeebe:LinkedResource',
resourceId: '=myScript',
resourceType: 'RPA',
bindingType: 'versionTag',
versionTag: 'v1',
linkName: 'myScript'
$type: 'zeebe:LinkedResources',
values: [
{
$type: 'zeebe:LinkedResource',
resourceId:'=myScript',
resourceType:'RPA',
bindingType:'latest'
},
{
$type: 'zeebe:LinkedResource',
resourceId: '=myScript',
resourceType: 'RPA',
bindingType: 'versionTag',
versionTag: 'v1'
},
{
$type: 'zeebe:LinkedResource',
resourceId: '=myScript',
resourceType: 'RPA',
bindingType: 'versionTag',
versionTag: 'v1',
linkName: 'myScript'
}
]
}

]
}
});
Expand Down

0 comments on commit d530c1d

Please sign in to comment.