diff --git a/resources/zeebe.json b/resources/zeebe.json index 6c02515..69da819 100644 --- a/resources/zeebe.json +++ b/resources/zeebe.json @@ -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": [ diff --git a/test/fixtures/xml/zeebe-service-task/serviceTask-zeebe-linkedResource.part.bpmn b/test/fixtures/xml/zeebe-service-task/serviceTask-zeebe-linkedResource.part.bpmn index 1b4dcc1..95a33e8 100644 --- a/test/fixtures/xml/zeebe-service-task/serviceTask-zeebe-linkedResource.part.bpmn +++ b/test/fixtures/xml/zeebe-service-task/serviceTask-zeebe-linkedResource.part.bpmn @@ -4,23 +4,25 @@ xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" > - - - + + + + + \ No newline at end of file diff --git a/test/spec/xml/read.js b/test/spec/xml/read.js index b72f5ca..b4b824e 100644 --- a/test/spec/xml/read.js +++ b/test/spec/xml/read.js @@ -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'); @@ -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' + } + ] } + ] } });