Skip to content

Commit d0a08a0

Browse files
committed
feat: support activeElementsCollection property on zeebe:adHoc
Related to camunda/tmp-camunda-modeler-adhoc-subprocess#2
1 parent 8233625 commit d0a08a0

File tree

5 files changed

+65
-46
lines changed

5 files changed

+65
-46
lines changed

packages/zeebe-element-templates-json-schema/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ All notable changes to [@camunda/zeebe-element-templates-json-schema](https://gi
66

77
___Note:__ Yet to be released changes appear here._
88

9+
## 0.31.0
10+
11+
* `FEAT`: support `activeElementsCollection` property on `zeebe:adHoc`
12+
913
## 0.30.0
1014

1115
* `FEAT`: support `zeebe:taskSchedule` ([#190](https://github.com/camunda/element-templates-json-schema/pull/190))

packages/zeebe-element-templates-json-schema/src/defs/properties/binding/adHoc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"properties": {
1414
"property": {
1515
"enum": [
16+
"activeElementsCollection",
1617
"outputCollection",
1718
"outputElement"
1819
]

packages/zeebe-element-templates-json-schema/test/fixtures/ad-hoc/invalid-bpmn-ad-hoc-impl-properties.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -100,27 +100,6 @@ export const errors = [
100100
},
101101
message: 'should match "then" schema'
102102
},
103-
{
104-
keyword: 'enum',
105-
dataPath: '/properties/3/binding/property',
106-
schemaPath: '#/allOf/1/items/properties/binding/allOf/11/then/properties/property/enum',
107-
params: {
108-
allowedValues: [
109-
'outputCollection',
110-
'outputElement'
111-
]
112-
},
113-
message: 'should be equal to one of the allowed values'
114-
},
115-
{
116-
keyword: 'if',
117-
dataPath: '/properties/3/binding',
118-
schemaPath: '#/allOf/1/items/properties/binding/allOf/11/if',
119-
params: {
120-
failingKeyword: 'then'
121-
},
122-
message: 'should match "then" schema'
123-
},
124103
{
125104
keyword: 'type',
126105
dataPath: '',

packages/zeebe-element-templates-json-schema/test/fixtures/ad-hoc/invalid-property.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export const errors = [
3737
schemaPath: '#/allOf/1/items/properties/binding/allOf/11/then/properties/property/enum',
3838
params: {
3939
allowedValues: [
40+
'activeElementsCollection',
4041
'outputCollection',
4142
'outputElement'
4243
]
Lines changed: 59 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,61 @@
1-
export const template = {
2-
'$schema': 'https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json',
3-
'name': 'AdHoc Template',
4-
'id': 'io.camunda.examples.AdHoc.Valid',
5-
'version': 1,
6-
'appliesTo': [ 'bpmn:AdHocSubProcess' ],
7-
'elementType': { 'value': 'bpmn:AdHocSubProcess' },
8-
'properties': [
9-
{
10-
'type': 'Hidden',
11-
'binding': { 'type': 'zeebe:taskDefinition', 'property': 'type' },
12-
'value': 'io.camunda.agenticai:aiagent-job-worker:1'
13-
},
14-
{
15-
'type': 'Hidden',
16-
'binding': { 'type': 'zeebe:adHoc', 'property': 'outputCollection' },
17-
'value': 'toolCallResults'
18-
},
19-
{
20-
'type': 'Hidden',
21-
'binding': { 'type': 'zeebe:adHoc', 'property': 'outputElement' },
22-
'value': '={ id: toolCall._meta.id, name: toolCall._meta.name, content: toolCallResult }'
23-
}
24-
]
25-
};
1+
export const template = [
2+
{
3+
'$schema': 'https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json',
4+
'name': 'AdHoc Template',
5+
'id': 'io.camunda.examples.AdHoc.Valid',
6+
'version': 1,
7+
'appliesTo': [ 'bpmn:AdHocSubProcess' ],
8+
'elementType': { 'value': 'bpmn:AdHocSubProcess' },
9+
'properties': [
10+
{
11+
'type': 'Hidden',
12+
'binding': { 'type': 'zeebe:taskDefinition', 'property': 'type' },
13+
'value': 'io.camunda.agenticai:aiagent-job-worker:1'
14+
},
15+
{
16+
'type': 'Hidden',
17+
'binding': { 'type': 'zeebe:adHoc', 'property': 'outputCollection' },
18+
'value': 'toolCallResults'
19+
},
20+
{
21+
'type': 'Hidden',
22+
'binding': { 'type': 'zeebe:adHoc', 'property': 'outputElement' },
23+
'value': '={ id: toolCall._meta.id, name: toolCall._meta.name, content: toolCallResult }'
24+
}
25+
]
26+
},
27+
{
28+
'$schema': 'https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json',
29+
'name': 'AdHoc Template - BPMN implementation',
30+
'id': 'io.camunda.examples.AdHoc.Valid.BPMN',
31+
'description': 'activeElementsCollection, completionCondition, and cancelRemainingInstances',
32+
'version': 1,
33+
'appliesTo': [ 'bpmn:AdHocSubProcess' ],
34+
'elementType': { 'value': 'bpmn:AdHocSubProcess' },
35+
'properties': [
36+
{
37+
'type': 'Hidden',
38+
'binding': {
39+
'type': 'property',
40+
'name': 'cancelRemainingInstances'
41+
},
42+
'value': 'false'
43+
},
44+
{
45+
'type': 'String',
46+
'feel': 'required',
47+
'binding': {
48+
'type': 'property',
49+
'name': 'completionCondition'
50+
}
51+
},
52+
{
53+
'type': 'Hidden',
54+
'binding': { 'type': 'zeebe:adHoc', 'property': 'activeElementsCollection' },
55+
'value': '=anActiveElementsCollection'
56+
}
57+
]
58+
}
59+
];
2660

2761
export const errors = null;

0 commit comments

Comments
 (0)