|
| 1 | +export const template = { |
| 2 | + '$schema': 'https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json', |
| 3 | + 'name': 'Reusable Rule Template', |
| 4 | + 'id': 'io.camunda.examples.Decision', |
| 5 | + 'description': 'A reusable rule template', |
| 6 | + 'version': 1, |
| 7 | + 'engines': { |
| 8 | + 'camunda': '^8.6' |
| 9 | + }, |
| 10 | + 'appliesTo': [ |
| 11 | + 'bpmn:Task', |
| 12 | + 'bpmn:BusinessRuleTask' |
| 13 | + ], |
| 14 | + 'elementType': { |
| 15 | + 'value': 'bpmn:BusinessRuleTask' |
| 16 | + }, |
| 17 | + 'properties': [ |
| 18 | + { |
| 19 | + 'type': 'Hidden', |
| 20 | + 'value': 'aReusableRule', |
| 21 | + 'binding': { |
| 22 | + 'type': 'zeebe:calledDecision', |
| 23 | + 'property': 'decisionId' |
| 24 | + } |
| 25 | + }, |
| 26 | + { |
| 27 | + 'type': 'Hidden', |
| 28 | + 'value': 'aResultVariable', |
| 29 | + 'binding': { |
| 30 | + 'type': 'zeebe:calledDecision', |
| 31 | + 'property': 'resultVariable' |
| 32 | + } |
| 33 | + }, |
| 34 | + { |
| 35 | + 'type': 'Dropdown', |
| 36 | + 'value': 'versionTag', |
| 37 | + 'choices': [ |
| 38 | + { |
| 39 | + 'name': 'versionTag', |
| 40 | + 'value': 'versionTag' |
| 41 | + }, |
| 42 | + { |
| 43 | + 'name': 'deployment', |
| 44 | + 'value': 'deployment' |
| 45 | + } |
| 46 | + ], |
| 47 | + 'binding': { |
| 48 | + 'type': 'zeebe:calledDecision', |
| 49 | + 'property': 'bindingType' |
| 50 | + } |
| 51 | + }, |
| 52 | + { |
| 53 | + 'type': 'String', |
| 54 | + 'value': 'vers-1', |
| 55 | + 'binding': { |
| 56 | + 'type': 'zeebe:calledDecision', |
| 57 | + 'property': 'versionTag' |
| 58 | + } |
| 59 | + } |
| 60 | + ] |
| 61 | +}; |
| 62 | + |
| 63 | +export const errors = [ |
| 64 | + { |
| 65 | + keyword: 'errorMessage', |
| 66 | + dataPath: '/properties', |
| 67 | + schemaPath: '#/allOf/1/allOf/7/allOf/1/then/properties/properties/errorMessage', |
| 68 | + params: { |
| 69 | + errors: [ |
| 70 | + { |
| 71 | + keyword: 'const', |
| 72 | + dataPath: '/properties/0/binding/property', |
| 73 | + schemaPath: '#/allOf/1/allOf/7/allOf/1/then/properties/properties/contains/properties/binding/properties/property/const', |
| 74 | + params: { |
| 75 | + allowedValue: 'bindingType' |
| 76 | + }, |
| 77 | + message: 'should be equal to constant', |
| 78 | + emUsed: true |
| 79 | + }, |
| 80 | + { |
| 81 | + keyword: 'const', |
| 82 | + dataPath: '/properties/0/value', |
| 83 | + schemaPath: '#/allOf/1/allOf/7/allOf/1/then/properties/properties/contains/properties/value/const', |
| 84 | + params: { |
| 85 | + allowedValue: 'versionTag' |
| 86 | + }, |
| 87 | + message: 'should be equal to constant', |
| 88 | + emUsed: true |
| 89 | + }, |
| 90 | + { |
| 91 | + keyword: 'const', |
| 92 | + dataPath: '/properties/1/binding/property', |
| 93 | + schemaPath: '#/allOf/1/allOf/7/allOf/1/then/properties/properties/contains/properties/binding/properties/property/const', |
| 94 | + params: { |
| 95 | + allowedValue: 'bindingType' |
| 96 | + }, |
| 97 | + message: 'should be equal to constant', |
| 98 | + emUsed: true |
| 99 | + }, |
| 100 | + { |
| 101 | + keyword: 'const', |
| 102 | + dataPath: '/properties/1/value', |
| 103 | + schemaPath: '#/allOf/1/allOf/7/allOf/1/then/properties/properties/contains/properties/value/const', |
| 104 | + params: { |
| 105 | + allowedValue: 'versionTag' |
| 106 | + }, |
| 107 | + message: 'should be equal to constant', |
| 108 | + emUsed: true |
| 109 | + }, |
| 110 | + { |
| 111 | + keyword: 'const', |
| 112 | + dataPath: '/properties/2/type', |
| 113 | + schemaPath: '#/allOf/1/allOf/7/allOf/1/then/properties/properties/contains/properties/type/const', |
| 114 | + params: { |
| 115 | + allowedValue: 'Hidden' |
| 116 | + }, |
| 117 | + message: 'should be equal to constant', |
| 118 | + emUsed: true |
| 119 | + }, |
| 120 | + { |
| 121 | + keyword: 'const', |
| 122 | + dataPath: '/properties/3/binding/property', |
| 123 | + schemaPath: '#/allOf/1/allOf/7/allOf/1/then/properties/properties/contains/properties/binding/properties/property/const', |
| 124 | + params: { |
| 125 | + allowedValue: 'bindingType' |
| 126 | + }, |
| 127 | + message: 'should be equal to constant', |
| 128 | + emUsed: true |
| 129 | + }, |
| 130 | + { |
| 131 | + keyword: 'const', |
| 132 | + dataPath: '/properties/3/value', |
| 133 | + schemaPath: '#/allOf/1/allOf/7/allOf/1/then/properties/properties/contains/properties/value/const', |
| 134 | + params: { |
| 135 | + allowedValue: 'versionTag' |
| 136 | + }, |
| 137 | + message: 'should be equal to constant', |
| 138 | + emUsed: true |
| 139 | + }, |
| 140 | + { |
| 141 | + keyword: 'const', |
| 142 | + dataPath: '/properties/3/type', |
| 143 | + schemaPath: '#/allOf/1/allOf/7/allOf/1/then/properties/properties/contains/properties/type/const', |
| 144 | + params: { |
| 145 | + allowedValue: 'Hidden' |
| 146 | + }, |
| 147 | + message: 'should be equal to constant', |
| 148 | + emUsed: true |
| 149 | + }, |
| 150 | + { |
| 151 | + keyword: 'contains', |
| 152 | + dataPath: '/properties', |
| 153 | + schemaPath: '#/allOf/1/allOf/7/allOf/1/then/properties/properties/contains', |
| 154 | + params: { |
| 155 | + minContains: 1 |
| 156 | + }, |
| 157 | + message: 'should contain at least 1 valid item(s)', |
| 158 | + emUsed: true |
| 159 | + } |
| 160 | + ] |
| 161 | + }, |
| 162 | + message: 'Binding with property=`bindingType` and value=`versionTag` must be set when using a binding with property=`versionTag`' |
| 163 | + }, |
| 164 | + { |
| 165 | + keyword: 'if', |
| 166 | + dataPath: '', |
| 167 | + schemaPath: '#/allOf/1/allOf/7/allOf/1/if', |
| 168 | + params: { |
| 169 | + failingKeyword: 'then' |
| 170 | + }, |
| 171 | + message: 'should match "then" schema' |
| 172 | + }, |
| 173 | + { |
| 174 | + keyword: 'type', |
| 175 | + dataPath: '', |
| 176 | + schemaPath: '#/oneOf/1/type', |
| 177 | + params: { |
| 178 | + type: 'array' |
| 179 | + }, |
| 180 | + message: 'should be array' |
| 181 | + }, |
| 182 | + { |
| 183 | + keyword: 'oneOf', |
| 184 | + dataPath: '', |
| 185 | + schemaPath: '#/oneOf', |
| 186 | + params: { |
| 187 | + passingSchemas: null |
| 188 | + }, |
| 189 | + message: 'should match exactly one schema in oneOf' |
| 190 | + } |
| 191 | +]; |
0 commit comments