@camunda8/sdk 8.4.0 → 8.5.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/.eslintrc.json +31 -0
  2. package/CHANGELOG.md +32 -21
  3. package/CODE_OF_CONDUCT.md +73 -0
  4. package/CONTRIBUTING.md +116 -0
  5. package/LICENSE +3 -3
  6. package/README.md +228 -34
  7. package/dist/admin/index.d.ts +2 -0
  8. package/dist/admin/index.js +30 -0
  9. package/dist/admin/index.js.map +1 -0
  10. package/dist/admin/lib/AdminApiClient.d.ts +121 -0
  11. package/dist/admin/lib/AdminApiClient.js +254 -0
  12. package/dist/admin/lib/AdminApiClient.js.map +1 -0
  13. package/dist/admin/lib/AdminDto.d.ts +98 -0
  14. package/dist/admin/lib/AdminDto.js +3 -0
  15. package/dist/admin/lib/AdminDto.js.map +1 -0
  16. package/dist/c8/index.d.ts +42 -0
  17. package/dist/c8/index.js +92 -0
  18. package/dist/c8/index.js.map +1 -0
  19. package/dist/index.d.ts +15 -14
  20. package/dist/index.js +14 -16
  21. package/dist/index.js.map +1 -1
  22. package/dist/lib/CertificateAuthority.d.ts +2 -0
  23. package/dist/lib/CertificateAuthority.js +15 -0
  24. package/dist/lib/CertificateAuthority.js.map +1 -0
  25. package/dist/lib/ClientConstructor.d.ts +6 -0
  26. package/dist/lib/ClientConstructor.js +3 -0
  27. package/dist/lib/ClientConstructor.js.map +1 -0
  28. package/dist/lib/Configuration.d.ts +113 -0
  29. package/dist/lib/Configuration.js +367 -0
  30. package/dist/lib/Configuration.js.map +1 -0
  31. package/dist/lib/ConstructOAuthProvider.d.ts +3 -0
  32. package/dist/lib/ConstructOAuthProvider.js +14 -0
  33. package/dist/lib/ConstructOAuthProvider.js.map +1 -0
  34. package/dist/lib/CreateUserAgentString.d.ts +2 -0
  35. package/dist/lib/CreateUserAgentString.js +11 -0
  36. package/dist/lib/CreateUserAgentString.js.map +1 -0
  37. package/dist/lib/Delay.d.ts +1 -0
  38. package/dist/lib/Delay.js +6 -0
  39. package/dist/lib/Delay.js.map +1 -0
  40. package/dist/lib/EnvironmentSetup.d.ts +11 -0
  41. package/dist/lib/EnvironmentSetup.js +35 -0
  42. package/dist/lib/EnvironmentSetup.js.map +1 -0
  43. package/dist/lib/GetPackageVersion.d.ts +1 -0
  44. package/dist/lib/GetPackageVersion.js +32 -0
  45. package/dist/lib/GetPackageVersion.js.map +1 -0
  46. package/dist/lib/LosslessJsonParser.d.ts +103 -0
  47. package/dist/lib/LosslessJsonParser.js +252 -0
  48. package/dist/lib/LosslessJsonParser.js.map +1 -0
  49. package/dist/lib/RequireConfiguration.d.ts +2 -0
  50. package/dist/lib/RequireConfiguration.js +11 -0
  51. package/dist/lib/RequireConfiguration.js.map +1 -0
  52. package/dist/lib/SuppressZeebeLogging.d.ts +2 -0
  53. package/dist/lib/SuppressZeebeLogging.js +14 -0
  54. package/dist/lib/SuppressZeebeLogging.js.map +1 -0
  55. package/dist/lib/ValueOrDefault.d.ts +1 -0
  56. package/dist/lib/ValueOrDefault.js +8 -0
  57. package/dist/lib/ValueOrDefault.js.map +1 -0
  58. package/dist/lib/index.d.ts +12 -0
  59. package/dist/lib/index.js +32 -0
  60. package/dist/lib/index.js.map +1 -0
  61. package/dist/modeler/index.d.ts +2 -0
  62. package/dist/modeler/index.js +30 -0
  63. package/dist/modeler/index.js.map +1 -0
  64. package/dist/modeler/lib/ModelerAPIClient.d.ts +210 -0
  65. package/dist/modeler/lib/ModelerAPIClient.js +417 -0
  66. package/dist/modeler/lib/ModelerAPIClient.js.map +1 -0
  67. package/dist/modeler/lib/ModelerDto.d.ts +187 -0
  68. package/dist/modeler/lib/ModelerDto.js +3 -0
  69. package/dist/modeler/lib/ModelerDto.js.map +1 -0
  70. package/dist/oauth/index.d.ts +15 -0
  71. package/dist/oauth/index.js +8 -0
  72. package/dist/oauth/index.js.map +1 -0
  73. package/dist/oauth/lib/IOAuthProvider.d.ts +4 -0
  74. package/dist/oauth/lib/IOAuthProvider.js +3 -0
  75. package/dist/oauth/lib/IOAuthProvider.js.map +1 -0
  76. package/dist/oauth/lib/NullAuthProvider.d.ts +5 -0
  77. package/dist/oauth/lib/NullAuthProvider.js +16 -0
  78. package/dist/oauth/lib/NullAuthProvider.js.map +1 -0
  79. package/dist/oauth/lib/OAuthProvider.d.ts +44 -0
  80. package/dist/oauth/lib/OAuthProvider.js +316 -0
  81. package/dist/oauth/lib/OAuthProvider.js.map +1 -0
  82. package/dist/operate/index.d.ts +2 -0
  83. package/dist/operate/index.js +30 -0
  84. package/dist/operate/index.js.map +1 -0
  85. package/dist/operate/lib/OperateApiClient.d.ts +204 -0
  86. package/dist/operate/lib/OperateApiClient.js +440 -0
  87. package/dist/operate/lib/OperateApiClient.js.map +1 -0
  88. package/dist/operate/lib/OperateDto.d.ts +126 -0
  89. package/dist/operate/lib/OperateDto.js +125 -0
  90. package/dist/operate/lib/OperateDto.js.map +1 -0
  91. package/dist/operate/lib/TestableOperateApiClient.d.ts +7 -0
  92. package/dist/operate/lib/TestableOperateApiClient.js +15 -0
  93. package/dist/operate/lib/TestableOperateApiClient.js.map +1 -0
  94. package/dist/operate/lib/parseSearchResults.d.ts +4 -0
  95. package/dist/operate/lib/parseSearchResults.js +26 -0
  96. package/dist/operate/lib/parseSearchResults.js.map +1 -0
  97. package/dist/optimize/index.d.ts +2 -0
  98. package/dist/optimize/index.js +30 -0
  99. package/dist/optimize/index.js.map +1 -0
  100. package/dist/optimize/lib/APIObjects.d.ts +191 -0
  101. package/dist/optimize/lib/APIObjects.js +3 -0
  102. package/dist/optimize/lib/APIObjects.js.map +1 -0
  103. package/dist/optimize/lib/OptimizeApiClient.d.ts +269 -0
  104. package/dist/optimize/lib/OptimizeApiClient.js +410 -0
  105. package/dist/optimize/lib/OptimizeApiClient.js.map +1 -0
  106. package/dist/optimize/lib/ReportResults.d.ts +23 -0
  107. package/dist/optimize/lib/ReportResults.js +28 -0
  108. package/dist/optimize/lib/ReportResults.js.map +1 -0
  109. package/dist/proto/zeebe.proto +996 -0
  110. package/dist/tasklist/index.d.ts +2 -0
  111. package/dist/tasklist/index.js +30 -0
  112. package/dist/tasklist/index.js.map +1 -0
  113. package/dist/tasklist/lib/TasklistApiClient.d.ts +104 -0
  114. package/dist/tasklist/lib/TasklistApiClient.js +233 -0
  115. package/dist/tasklist/lib/TasklistApiClient.js.map +1 -0
  116. package/dist/tasklist/lib/TasklistDto.d.ts +147 -0
  117. package/dist/tasklist/lib/TasklistDto.js +26 -0
  118. package/dist/tasklist/lib/TasklistDto.js.map +1 -0
  119. package/dist/tasklist/lib/utils.d.ts +15 -0
  120. package/dist/tasklist/lib/utils.js +25 -0
  121. package/dist/tasklist/lib/utils.js.map +1 -0
  122. package/dist/zeebe/index.d.ts +21 -0
  123. package/dist/zeebe/index.js +53 -0
  124. package/dist/zeebe/index.js.map +1 -0
  125. package/dist/zeebe/lib/BpmnParser.d.ts +38 -0
  126. package/dist/zeebe/lib/BpmnParser.js +274 -0
  127. package/dist/zeebe/lib/BpmnParser.js.map +1 -0
  128. package/dist/zeebe/lib/ConnectionFactory.d.ts +25 -0
  129. package/dist/zeebe/lib/ConnectionFactory.js +43 -0
  130. package/dist/zeebe/lib/ConnectionFactory.js.map +1 -0
  131. package/dist/zeebe/lib/ConnectionStatusEvent.d.ts +6 -0
  132. package/dist/zeebe/lib/ConnectionStatusEvent.js +10 -0
  133. package/dist/zeebe/lib/ConnectionStatusEvent.js.map +1 -0
  134. package/dist/zeebe/lib/GetPackageVersion.d.ts +1 -0
  135. package/dist/zeebe/lib/GetPackageVersion.js +32 -0
  136. package/dist/zeebe/lib/GetPackageVersion.js.map +1 -0
  137. package/dist/zeebe/lib/GrpcClient.d.ts +75 -0
  138. package/dist/zeebe/lib/GrpcClient.js +467 -0
  139. package/dist/zeebe/lib/GrpcClient.js.map +1 -0
  140. package/dist/zeebe/lib/GrpcError.d.ts +19 -0
  141. package/dist/zeebe/lib/GrpcError.js +23 -0
  142. package/dist/zeebe/lib/GrpcError.js.map +1 -0
  143. package/dist/zeebe/lib/GrpcMiddleware.d.ts +21 -0
  144. package/dist/zeebe/lib/GrpcMiddleware.js +78 -0
  145. package/dist/zeebe/lib/GrpcMiddleware.js.map +1 -0
  146. package/dist/zeebe/lib/MockStdOut.d.ts +7 -0
  147. package/dist/zeebe/lib/MockStdOut.js +19 -0
  148. package/dist/zeebe/lib/MockStdOut.js.map +1 -0
  149. package/dist/zeebe/lib/Queue.d.ts +8 -0
  150. package/dist/zeebe/lib/Queue.js +15 -0
  151. package/dist/zeebe/lib/Queue.js.map +1 -0
  152. package/dist/zeebe/lib/SimpleLogger.d.ts +8 -0
  153. package/dist/zeebe/lib/SimpleLogger.js +47 -0
  154. package/dist/zeebe/lib/SimpleLogger.js.map +1 -0
  155. package/dist/zeebe/lib/StatefulLogInterceptor.d.ts +29 -0
  156. package/dist/zeebe/lib/StatefulLogInterceptor.js +81 -0
  157. package/dist/zeebe/lib/StatefulLogInterceptor.js.map +1 -0
  158. package/dist/zeebe/lib/TypedEmitter.d.ts +16 -0
  159. package/dist/zeebe/lib/TypedEmitter.js +24 -0
  160. package/dist/zeebe/lib/TypedEmitter.js.map +1 -0
  161. package/dist/zeebe/lib/ZBJsonLogger.d.ts +5 -0
  162. package/dist/zeebe/lib/ZBJsonLogger.js +12 -0
  163. package/dist/zeebe/lib/ZBJsonLogger.js.map +1 -0
  164. package/dist/zeebe/lib/ZBLogger.d.ts +20 -0
  165. package/dist/zeebe/lib/ZBLogger.js +134 -0
  166. package/dist/zeebe/lib/ZBLogger.js.map +1 -0
  167. package/dist/zeebe/lib/ZBWorkerBase.d.ts +78 -0
  168. package/dist/zeebe/lib/ZBWorkerBase.js +417 -0
  169. package/dist/zeebe/lib/ZBWorkerBase.js.map +1 -0
  170. package/dist/zeebe/lib/cancelProcesses.d.ts +1 -0
  171. package/dist/zeebe/lib/cancelProcesses.js +40 -0
  172. package/dist/zeebe/lib/cancelProcesses.js.map +1 -0
  173. package/dist/zeebe/lib/createUniqueTaskType.d.ts +0 -0
  174. package/dist/zeebe/lib/createUniqueTaskType.js +65 -0
  175. package/dist/zeebe/lib/createUniqueTaskType.js.map +1 -0
  176. package/dist/zeebe/lib/index.d.ts +2 -0
  177. package/dist/zeebe/lib/index.js +19 -0
  178. package/dist/zeebe/lib/index.js.map +1 -0
  179. package/dist/zeebe/lib/interfaces-1.0.d.ts +303 -0
  180. package/dist/zeebe/lib/interfaces-1.0.js +5 -0
  181. package/dist/zeebe/lib/interfaces-1.0.js.map +1 -0
  182. package/dist/zeebe/lib/interfaces-grpc-1.0.d.ts +679 -0
  183. package/dist/zeebe/lib/interfaces-grpc-1.0.js +22 -0
  184. package/dist/zeebe/lib/interfaces-grpc-1.0.js.map +1 -0
  185. package/dist/zeebe/lib/interfaces-published-contract.d.ts +67 -0
  186. package/dist/zeebe/lib/interfaces-published-contract.js +3 -0
  187. package/dist/zeebe/lib/interfaces-published-contract.js.map +1 -0
  188. package/dist/zeebe/lib/stringifyVariables.d.ts +18 -0
  189. package/dist/zeebe/lib/stringifyVariables.js +28 -0
  190. package/dist/zeebe/lib/stringifyVariables.js.map +1 -0
  191. package/dist/zeebe/lib/utils.d.ts +7 -0
  192. package/dist/zeebe/lib/utils.js +48 -0
  193. package/dist/zeebe/lib/utils.js.map +1 -0
  194. package/dist/zeebe/types.d.ts +3 -0
  195. package/dist/zeebe/types.js +20 -0
  196. package/dist/zeebe/types.js.map +1 -0
  197. package/dist/zeebe/zb/ZBWorker.d.ts +7 -0
  198. package/dist/zeebe/zb/ZBWorker.js +73 -0
  199. package/dist/zeebe/zb/ZBWorker.js.map +1 -0
  200. package/dist/zeebe/zb/ZeebeGrpcClient.d.ts +587 -0
  201. package/dist/zeebe/zb/ZeebeGrpcClient.js +1021 -0
  202. package/dist/zeebe/zb/ZeebeGrpcClient.js.map +1 -0
  203. package/package.json +130 -30
  204. package/renovate.json +9 -0
  205. package/.github/workflows/build-docs.yml +0 -39
  206. package/.github/workflows/tag-and-publish.yml +0 -48
  207. package/.prettierignore +0 -2
  208. package/img/video.png +0 -0
  209. package/jest.config.js +0 -5
  210. package/src/__tests__/exports.spec.ts +0 -7
  211. package/src/index.ts +0 -17
  212. package/tsconfig.build.json +0 -8
  213. package/tsconfig.json +0 -10
  214. package/tsconfig.tsbuildinfo +0 -1
  215. package/typedoc.json +0 -10
@@ -0,0 +1,996 @@
1
+ syntax = 'proto3';
2
+ package gateway_protocol;
3
+
4
+ option java_multiple_files = false;
5
+ option java_package = "io.camunda.zeebe.gateway.protocol";
6
+ option go_package = "./;pb";
7
+
8
+ // For a more complete documentation, refer to Zeebe documentation at:
9
+ // https://docs.camunda.io/docs/reference/grpc
10
+
11
+ message StreamActivatedJobsRequest {
12
+ // the job type, as defined in the BPMN process (e.g. <zeebe:taskDefinition
13
+ // type="payment-service" />)
14
+ string type = 1;
15
+ // the name of the worker activating the jobs, mostly used for logging purposes
16
+ string worker = 2;
17
+ // a job returned after this call will not be activated by another call until the
18
+ // timeout (in ms) has been reached
19
+ int64 timeout = 3;
20
+ // a list of variables to fetch as the job variables; if empty, all visible variables at
21
+ // the time of activation for the scope of the job will be returned
22
+ repeated string fetchVariable = 5;
23
+ // a list of identifiers of tenants for which to stream jobs
24
+ repeated string tenantIds = 6;
25
+ }
26
+
27
+ message ActivateJobsRequest {
28
+ // the job type, as defined in the BPMN process (e.g. <zeebe:taskDefinition
29
+ // type="payment-service" />)
30
+ string type = 1;
31
+ // the name of the worker activating the jobs, mostly used for logging purposes
32
+ string worker = 2;
33
+ // a job returned after this call will not be activated by another call until the
34
+ // timeout (in ms) has been reached
35
+ int64 timeout = 3;
36
+ // the maximum jobs to activate by this request
37
+ int32 maxJobsToActivate = 4;
38
+ // a list of variables to fetch as the job variables; if empty, all visible variables at
39
+ // the time of activation for the scope of the job will be returned
40
+ repeated string fetchVariable = 5;
41
+ // The request will be completed when at least one job is activated or after the requestTimeout (in ms).
42
+ // if the requestTimeout = 0, a default timeout is used.
43
+ // if the requestTimeout < 0, long polling is disabled and the request is completed immediately, even when no job is activated.
44
+ int64 requestTimeout = 6;
45
+ // a list of IDs of tenants for which to activate jobs
46
+ repeated string tenantIds = 7;
47
+ }
48
+
49
+ message ActivateJobsResponse {
50
+ // list of activated jobs
51
+ repeated ActivatedJob jobs = 1;
52
+ }
53
+
54
+ message ActivatedJob {
55
+ // the key, a unique identifier for the job
56
+ int64 key = 1;
57
+ // the type of the job (should match what was requested)
58
+ string type = 2;
59
+ // the job's process instance key
60
+ int64 processInstanceKey = 3;
61
+ // the bpmn process ID of the job process definition
62
+ string bpmnProcessId = 4;
63
+ // the version of the job process definition
64
+ int32 processDefinitionVersion = 5;
65
+ // the key of the job process definition
66
+ int64 processDefinitionKey = 6;
67
+ // the associated task element ID
68
+ string elementId = 7;
69
+ // the unique key identifying the associated task, unique within the scope of the
70
+ // process instance
71
+ int64 elementInstanceKey = 8;
72
+ // a set of custom headers defined during modelling; returned as a serialized
73
+ // JSON document
74
+ string customHeaders = 9;
75
+ // the name of the worker which activated this job
76
+ string worker = 10;
77
+ // the amount of retries left to this job (should always be positive)
78
+ int32 retries = 11;
79
+ // when the job can be activated again, sent as a UNIX epoch timestamp
80
+ int64 deadline = 12;
81
+ // JSON document, computed at activation time, consisting of all visible variables to
82
+ // the task scope
83
+ string variables = 13;
84
+ // the id of the tenant that owns the job
85
+ string tenantId = 14;
86
+ }
87
+
88
+ message CancelProcessInstanceRequest {
89
+ // the process instance key (as, for example, obtained from
90
+ // CreateProcessInstanceResponse)
91
+ int64 processInstanceKey = 1;
92
+ }
93
+
94
+ message CancelProcessInstanceResponse {
95
+ }
96
+
97
+ message CompleteJobRequest {
98
+ // the unique job identifier, as obtained from ActivateJobsResponse
99
+ int64 jobKey = 1;
100
+ // a JSON document representing the variables in the current task scope
101
+ string variables = 2;
102
+ }
103
+
104
+ message CompleteJobResponse {
105
+ }
106
+
107
+ message CreateProcessInstanceRequest {
108
+ // the unique key identifying the process definition (e.g. returned from a process
109
+ // in the DeployProcessResponse message)
110
+ int64 processDefinitionKey = 1;
111
+ // the BPMN process ID of the process definition
112
+ string bpmnProcessId = 2;
113
+ // the version of the process; set to -1 to use the latest version
114
+ int32 version = 3;
115
+ // JSON document that will instantiate the variables for the root variable scope of the
116
+ // process instance; it must be a JSON object, as variables will be mapped in a
117
+ // key-value fashion. e.g. { "a": 1, "b": 2 } will create two variables, named "a" and
118
+ // "b" respectively, with their associated values. [{ "a": 1, "b": 2 }] would not be a
119
+ // valid argument, as the root of the JSON document is an array and not an object.
120
+ string variables = 4;
121
+ // List of start instructions. If empty (default) the process instance
122
+ // will start at the start event. If non-empty the process instance will apply start
123
+ // instructions after it has been created
124
+ repeated ProcessInstanceCreationStartInstruction startInstructions = 5;
125
+ // the tenant id of the process definition
126
+ string tenantId = 6;
127
+ }
128
+
129
+ message ProcessInstanceCreationStartInstruction {
130
+
131
+ // future extensions might include
132
+ // - different types of start instructions
133
+ // - ability to set local variables for different flow scopes
134
+
135
+ // for now, however, the start instruction is implicitly a
136
+ // "startBeforeElement" instruction
137
+
138
+ // element ID
139
+ string elementId = 1;
140
+ }
141
+
142
+ message CreateProcessInstanceResponse {
143
+ // the key of the process definition which was used to create the process instance
144
+ int64 processDefinitionKey = 1;
145
+ // the BPMN process ID of the process definition which was used to create the process
146
+ // instance
147
+ string bpmnProcessId = 2;
148
+ // the version of the process definition which was used to create the process instance
149
+ int32 version = 3;
150
+ // the unique identifier of the created process instance; to be used wherever a request
151
+ // needs a process instance key (e.g. CancelProcessInstanceRequest)
152
+ int64 processInstanceKey = 4;
153
+ // the tenant identifier of the created process instance
154
+ string tenantId = 5;
155
+ }
156
+
157
+ message CreateProcessInstanceWithResultRequest {
158
+ CreateProcessInstanceRequest request = 1;
159
+ // timeout (in ms). the request will be closed if the process is not completed
160
+ // before the requestTimeout.
161
+ // if requestTimeout = 0, uses the generic requestTimeout configured in the gateway.
162
+ int64 requestTimeout = 2;
163
+ // list of names of variables to be included in `CreateProcessInstanceWithResultResponse.variables`
164
+ // if empty, all visible variables in the root scope will be returned.
165
+ repeated string fetchVariables = 3;
166
+ }
167
+
168
+ message CreateProcessInstanceWithResultResponse {
169
+ // the key of the process definition which was used to create the process instance
170
+ int64 processDefinitionKey = 1;
171
+ // the BPMN process ID of the process definition which was used to create the process
172
+ // instance
173
+ string bpmnProcessId = 2;
174
+ // the version of the process definition which was used to create the process instance
175
+ int32 version = 3;
176
+ // the unique identifier of the created process instance; to be used wherever a request
177
+ // needs a process instance key (e.g. CancelProcessInstanceRequest)
178
+ int64 processInstanceKey = 4;
179
+ // JSON document
180
+ // consists of visible variables in the root scope
181
+ string variables = 5;
182
+ // the tenant identifier of the process definition
183
+ string tenantId = 6;
184
+ }
185
+
186
+ message EvaluateDecisionRequest {
187
+ // the unique key identifying the decision to be evaluated (e.g. returned
188
+ // from a decision in the DeployResourceResponse message)
189
+ int64 decisionKey = 1;
190
+ // the ID of the decision to be evaluated
191
+ string decisionId = 2;
192
+ // JSON document that will instantiate the variables for the decision to be
193
+ // evaluated; it must be a JSON object, as variables will be mapped in a
194
+ // key-value fashion, e.g. { "a": 1, "b": 2 } will create two variables,
195
+ // named "a" and "b" respectively, with their associated values.
196
+ // [{ "a": 1, "b": 2 }] would not be a valid argument, as the root of the
197
+ // JSON document is an array and not an object.
198
+ string variables = 3;
199
+ // the tenant identifier of the decision
200
+ string tenantId = 4;
201
+ }
202
+
203
+ message EvaluateDecisionResponse {
204
+ // the unique key identifying the decision which was evaluated (e.g. returned
205
+ // from a decision in the DeployResourceResponse message)
206
+ int64 decisionKey = 1;
207
+ // the ID of the decision which was evaluated
208
+ string decisionId = 2;
209
+ // the name of the decision which was evaluated
210
+ string decisionName = 3;
211
+ // the version of the decision which was evaluated
212
+ int32 decisionVersion = 4;
213
+ // the ID of the decision requirements graph that the decision which was
214
+ // evaluated is part of.
215
+ string decisionRequirementsId = 5;
216
+ // the unique key identifying the decision requirements graph that the
217
+ // decision which was evaluated is part of.
218
+ int64 decisionRequirementsKey = 6;
219
+ // JSON document that will instantiate the result of the decision which was
220
+ // evaluated; it will be a JSON object, as the result output will be mapped
221
+ // in a key-value fashion, e.g. { "a": 1 }.
222
+ string decisionOutput = 7;
223
+ // a list of decisions that were evaluated within the requested decision evaluation
224
+ repeated EvaluatedDecision evaluatedDecisions = 8;
225
+ // an optional string indicating the ID of the decision which
226
+ // failed during evaluation
227
+ string failedDecisionId = 9;
228
+ // an optional message describing why the decision which was evaluated failed
229
+ string failureMessage = 10;
230
+ // the tenant identifier of the evaluated decision
231
+ string tenantId = 11;
232
+ // the unique key identifying this decision evaluation
233
+ int64 decisionInstanceKey = 12;
234
+ }
235
+
236
+ message EvaluatedDecision {
237
+ // the unique key identifying the decision which was evaluated (e.g. returned
238
+ // from a decision in the DeployResourceResponse message)
239
+ int64 decisionKey = 1;
240
+ // the ID of the decision which was evaluated
241
+ string decisionId = 2;
242
+ // the name of the decision which was evaluated
243
+ string decisionName = 3;
244
+ // the version of the decision which was evaluated
245
+ int32 decisionVersion = 4;
246
+ // the type of the decision which was evaluated
247
+ string decisionType = 5;
248
+ // JSON document that will instantiate the result of the decision which was
249
+ // evaluated; it will be a JSON object, as the result output will be mapped
250
+ // in a key-value fashion, e.g. { "a": 1 }.
251
+ string decisionOutput = 6;
252
+ // the decision rules that matched within this decision evaluation
253
+ repeated MatchedDecisionRule matchedRules = 7;
254
+ // the decision inputs that were evaluated within this decision evaluation
255
+ repeated EvaluatedDecisionInput evaluatedInputs = 8;
256
+ // the tenant identifier of the evaluated decision
257
+ string tenantId = 9;
258
+ }
259
+
260
+ message EvaluatedDecisionInput {
261
+ // the id of the evaluated decision input
262
+ string inputId = 1;
263
+ // the name of the evaluated decision input
264
+ string inputName = 2;
265
+ // the value of the evaluated decision input
266
+ string inputValue = 3;
267
+ }
268
+
269
+ message EvaluatedDecisionOutput {
270
+ // the id of the evaluated decision output
271
+ string outputId = 1;
272
+ // the name of the evaluated decision output
273
+ string outputName = 2;
274
+ // the value of the evaluated decision output
275
+ string outputValue = 3;
276
+ }
277
+
278
+ message MatchedDecisionRule {
279
+ // the id of the matched rule
280
+ string ruleId = 1;
281
+ // the index of the matched rule
282
+ int32 ruleIndex = 2;
283
+ // the evaluated decision outputs
284
+ repeated EvaluatedDecisionOutput evaluatedOutputs = 3;
285
+ }
286
+
287
+ message DeployProcessRequest {
288
+ // since 8, replaced by DeployResourceRequest
289
+ option deprecated = true;
290
+ // List of process resources to deploy
291
+ repeated ProcessRequestObject processes = 1;
292
+ }
293
+
294
+ message ProcessRequestObject {
295
+ // since 8, replaced by Resource
296
+ option deprecated = true;
297
+ // the resource basename, e.g. myProcess.bpmn
298
+ string name = 1;
299
+ // the process definition as a UTF8-encoded string
300
+ bytes definition = 2;
301
+ }
302
+
303
+ message DeployProcessResponse {
304
+ // since 8, replaced by DeployResourceResponse
305
+ option deprecated = true;
306
+ // the unique key identifying the deployment
307
+ int64 key = 1;
308
+ // a list of deployed processes
309
+ repeated ProcessMetadata processes = 2;
310
+ }
311
+
312
+ message DeployResourceRequest {
313
+ // list of resources to deploy
314
+ repeated Resource resources = 1;
315
+ // the tenant id of the resources to deploy
316
+ string tenantId = 2;
317
+ }
318
+
319
+ message Resource {
320
+ // the resource name, e.g. myProcess.bpmn or myDecision.dmn
321
+ string name = 1;
322
+ // the file content as a UTF8-encoded string
323
+ bytes content = 2;
324
+ }
325
+
326
+ message DeployResourceResponse {
327
+ // the unique key identifying the deployment
328
+ int64 key = 1;
329
+ // a list of deployed resources, e.g. processes
330
+ repeated Deployment deployments = 2;
331
+ // the tenant id of the deployed resources
332
+ string tenantId = 3;
333
+ }
334
+
335
+ message Deployment {
336
+ // each deployment has only one metadata
337
+ oneof Metadata {
338
+ // metadata of a deployed process
339
+ ProcessMetadata process = 1;
340
+ // metadata of a deployed decision
341
+ DecisionMetadata decision = 2;
342
+ // metadata of a deployed decision requirements
343
+ DecisionRequirementsMetadata decisionRequirements = 3;
344
+ // metadata of a deployed form
345
+ FormMetadata form = 4;
346
+ }
347
+ }
348
+
349
+ message ProcessMetadata {
350
+ // the bpmn process ID, as parsed during deployment; together with the version forms a
351
+ // unique identifier for a specific process definition
352
+ string bpmnProcessId = 1;
353
+ // the assigned process version
354
+ int32 version = 2;
355
+ // the assigned key, which acts as a unique identifier for this process
356
+ int64 processDefinitionKey = 3;
357
+ // the resource name (see: ProcessRequestObject.name) from which this process was
358
+ // parsed
359
+ string resourceName = 4;
360
+ // the tenant id of the deployed process
361
+ string tenantId = 5;
362
+ }
363
+
364
+ message DecisionMetadata {
365
+ // the dmn decision ID, as parsed during deployment; together with the
366
+ // versions forms a unique identifier for a specific decision
367
+ string dmnDecisionId = 1;
368
+ // the dmn name of the decision, as parsed during deployment
369
+ string dmnDecisionName = 2;
370
+ // the assigned decision version
371
+ int32 version = 3;
372
+ // the assigned decision key, which acts as a unique identifier for this
373
+ // decision
374
+ int64 decisionKey = 4;
375
+ // the dmn ID of the decision requirements graph that this decision is part
376
+ // of, as parsed during deployment
377
+ string dmnDecisionRequirementsId = 5;
378
+ // the assigned key of the decision requirements graph that this decision is
379
+ // part of
380
+ int64 decisionRequirementsKey = 6;
381
+ // the tenant id of the deployed decision
382
+ string tenantId = 7;
383
+ }
384
+
385
+ message DecisionRequirementsMetadata {
386
+ // the dmn decision requirements ID, as parsed during deployment; together
387
+ // with the versions forms a unique identifier for a specific decision
388
+ string dmnDecisionRequirementsId = 1;
389
+ // the dmn name of the decision requirements, as parsed during deployment
390
+ string dmnDecisionRequirementsName = 2;
391
+ // the assigned decision requirements version
392
+ int32 version = 3;
393
+ // the assigned decision requirements key, which acts as a unique identifier
394
+ // for this decision requirements
395
+ int64 decisionRequirementsKey = 4;
396
+ // the resource name (see: Resource.name) from which this decision
397
+ // requirements was parsed
398
+ string resourceName = 5;
399
+ // the tenant id of the deployed decision requirements
400
+ string tenantId = 6;
401
+ }
402
+
403
+ message FormMetadata {
404
+ // the form ID, as parsed during deployment; together with the
405
+ // versions forms a unique identifier for a specific form
406
+ string formId = 1;
407
+ // the assigned form version
408
+ int32 version = 2;
409
+ // the assigned key, which acts as a unique identifier for this form
410
+ int64 formKey = 3;
411
+ // the resource name
412
+ string resourceName = 4;
413
+ // the tenant id of the deployed form
414
+ string tenantId = 5;
415
+ }
416
+
417
+ message FailJobRequest {
418
+ // the unique job identifier, as obtained when activating the job
419
+ int64 jobKey = 1;
420
+ // the amount of retries the job should have left
421
+ int32 retries = 2;
422
+ // an optional message describing why the job failed
423
+ // this is particularly useful if a job runs out of retries and an incident is raised,
424
+ // as it this message can help explain why an incident was raised
425
+ string errorMessage = 3;
426
+ // the backoff timeout (in ms) for the next retry
427
+ int64 retryBackOff = 4;
428
+ // JSON document that will instantiate the variables at the local scope of the
429
+ // job's associated task; it must be a JSON object, as variables will be mapped in a
430
+ // key-value fashion. e.g. { "a": 1, "b": 2 } will create two variables, named "a" and
431
+ // "b" respectively, with their associated values. [{ "a": 1, "b": 2 }] would not be a
432
+ // valid argument, as the root of the JSON document is an array and not an object.
433
+ string variables = 5;
434
+ }
435
+
436
+ message FailJobResponse {
437
+ }
438
+
439
+ message ThrowErrorRequest {
440
+ // the unique job identifier, as obtained when activating the job
441
+ int64 jobKey = 1;
442
+ // the error code that will be matched with an error catch event
443
+ string errorCode = 2;
444
+ // an optional error message that provides additional context
445
+ string errorMessage = 3;
446
+ // JSON document that will instantiate the variables at the local scope of the
447
+ // error catch event that catches the thrown error; it must be a JSON object, as variables will be mapped in a
448
+ // key-value fashion. e.g. { "a": 1, "b": 2 } will create two variables, named "a" and
449
+ // "b" respectively, with their associated values. [{ "a": 1, "b": 2 }] would not be a
450
+ // valid argument, as the root of the JSON document is an array and not an object.
451
+ string variables = 4;
452
+ }
453
+
454
+ message ThrowErrorResponse {
455
+ }
456
+
457
+ message PublishMessageRequest {
458
+ // the name of the message
459
+ string name = 1;
460
+ // the correlation key of the message
461
+ string correlationKey = 2;
462
+ // how long the message should be buffered on the broker, in milliseconds
463
+ int64 timeToLive = 3;
464
+ // the unique ID of the message; can be omitted. only useful to ensure only one message
465
+ // with the given ID will ever be published (during its lifetime)
466
+ string messageId = 4;
467
+ // the message variables as a JSON document; to be valid, the root of the document must be an
468
+ // object, e.g. { "a": "foo" }. [ "foo" ] would not be valid.
469
+ string variables = 5;
470
+ // the tenant id of the message
471
+ string tenantId = 6;
472
+ }
473
+
474
+ message PublishMessageResponse {
475
+ // the unique ID of the message that was published
476
+ int64 key = 1;
477
+ // the tenant id of the message
478
+ string tenantId = 2;
479
+ }
480
+
481
+ message ResolveIncidentRequest {
482
+ // the unique ID of the incident to resolve
483
+ int64 incidentKey = 1;
484
+ }
485
+
486
+ message ResolveIncidentResponse {
487
+ }
488
+
489
+ message TopologyRequest {
490
+ }
491
+
492
+ message TopologyResponse {
493
+ // list of brokers part of this cluster
494
+ repeated BrokerInfo brokers = 1;
495
+ // how many nodes are in the cluster
496
+ int32 clusterSize = 2;
497
+ // how many partitions are spread across the cluster
498
+ int32 partitionsCount = 3;
499
+ // configured replication factor for this cluster
500
+ int32 replicationFactor = 4;
501
+ // gateway version
502
+ string gatewayVersion = 5;
503
+ }
504
+
505
+ message BrokerInfo {
506
+ // unique (within a cluster) node ID for the broker
507
+ int32 nodeId = 1;
508
+ // hostname of the broker
509
+ string host = 2;
510
+ // port for the broker
511
+ int32 port = 3;
512
+ // list of partitions managed or replicated on this broker
513
+ repeated Partition partitions = 4;
514
+ // broker version
515
+ string version = 5;
516
+ }
517
+
518
+ message Partition {
519
+ // Describes the Raft role of the broker for a given partition
520
+ enum PartitionBrokerRole {
521
+ LEADER = 0;
522
+ FOLLOWER = 1;
523
+ INACTIVE = 2;
524
+ }
525
+
526
+ // Describes the current health of the partition
527
+ enum PartitionBrokerHealth {
528
+ HEALTHY = 0;
529
+ UNHEALTHY = 1;
530
+ DEAD = 2;
531
+ }
532
+
533
+ // the unique ID of this partition
534
+ int32 partitionId = 1;
535
+ // the role of the broker for this partition
536
+ PartitionBrokerRole role = 2;
537
+ // the health of this partition
538
+ PartitionBrokerHealth health = 3;
539
+ }
540
+
541
+ message UpdateJobRetriesRequest {
542
+ // the unique job identifier, as obtained through ActivateJobs
543
+ int64 jobKey = 1;
544
+ // the new amount of retries for the job; must be positive
545
+ int32 retries = 2;
546
+ }
547
+
548
+ message UpdateJobRetriesResponse {
549
+ }
550
+
551
+ message UpdateJobTimeoutRequest {
552
+ // the unique job identifier, as obtained from ActivateJobsResponse
553
+ int64 jobKey = 1;
554
+ // the duration of the new timeout in ms, starting from the current moment
555
+ int64 timeout = 2;
556
+ }
557
+
558
+ message UpdateJobTimeoutResponse {
559
+ }
560
+
561
+ message SetVariablesRequest {
562
+ // the unique identifier of a particular element; can be the process instance key (as
563
+ // obtained during instance creation), or a given element, such as a service task (see
564
+ // elementInstanceKey on the job message)
565
+ int64 elementInstanceKey = 1;
566
+ // a JSON serialized document describing variables as key value pairs; the root of the document
567
+ // must be an object
568
+ string variables = 2;
569
+ // if true, the variables will be merged strictly into the local scope (as indicated by
570
+ // elementInstanceKey); this means the variables is not propagated to upper scopes.
571
+ // for example, let's say we have two scopes, '1' and '2', with each having effective variables as:
572
+ // 1 => `{ "foo" : 2 }`, and 2 => `{ "bar" : 1 }`. if we send an update request with
573
+ // elementInstanceKey = 2, variables `{ "foo" : 5 }`, and local is true, then scope 1 will
574
+ // be unchanged, and scope 2 will now be `{ "bar" : 1, "foo" 5 }`. if local was false, however,
575
+ // then scope 1 would be `{ "foo": 5 }`, and scope 2 would be `{ "bar" : 1 }`.
576
+ bool local = 3;
577
+ }
578
+
579
+ message SetVariablesResponse {
580
+ // the unique key of the set variables command
581
+ int64 key = 1;
582
+ }
583
+
584
+ message ModifyProcessInstanceRequest {
585
+ // the key of the process instance that should be modified
586
+ int64 processInstanceKey = 1;
587
+ // instructions describing which elements should be activated in which scopes,
588
+ // and which variables should be created
589
+ repeated ActivateInstruction activateInstructions = 2;
590
+ // instructions describing which elements should be terminated
591
+ repeated TerminateInstruction terminateInstructions = 3;
592
+
593
+ message ActivateInstruction {
594
+ // the id of the element that should be activated
595
+ string elementId = 1;
596
+ // the key of the ancestor scope the element instance should be created in;
597
+ // set to -1 to create the new element instance within an existing element
598
+ // instance of the flow scope
599
+ int64 ancestorElementInstanceKey = 2;
600
+ // instructions describing which variables should be created
601
+ repeated VariableInstruction variableInstructions = 3;
602
+ }
603
+
604
+ message VariableInstruction {
605
+ // JSON document that will instantiate the variables for the root variable scope of the
606
+ // process instance; it must be a JSON object, as variables will be mapped in a
607
+ // key-value fashion. e.g. { "a": 1, "b": 2 } will create two variables, named "a" and
608
+ // "b" respectively, with their associated values. [{ "a": 1, "b": 2 }] would not be a
609
+ // valid argument, as the root of the JSON document is an array and not an object.
610
+ string variables = 1;
611
+ // the id of the element in which scope the variables should be created;
612
+ // leave empty to create the variables in the global scope of the process instance
613
+ string scopeId = 2;
614
+ }
615
+
616
+ message TerminateInstruction {
617
+ // the id of the element that should be terminated
618
+ int64 elementInstanceKey = 1;
619
+ }
620
+ }
621
+
622
+ message ModifyProcessInstanceResponse {
623
+
624
+ }
625
+
626
+ message MigrateProcessInstanceRequest {
627
+ // key of the process instance to migrate
628
+ int64 processInstanceKey = 1;
629
+ // the migration plan that defines target process and element mappings
630
+ MigrationPlan migrationPlan = 2;
631
+
632
+ message MigrationPlan {
633
+ // the key of process definition to migrate the process instance to
634
+ int64 targetProcessDefinitionKey = 1;
635
+ // the mapping instructions describe how to map elements from the source process definition to the target process definition
636
+ repeated MappingInstruction mappingInstructions = 2;
637
+ }
638
+
639
+ message MappingInstruction {
640
+ // the element id to migrate from
641
+ string sourceElementId = 1;
642
+ // the element id to migrate into
643
+ string targetElementId = 2;
644
+ }
645
+ }
646
+
647
+ message MigrateProcessInstanceResponse {
648
+
649
+ }
650
+
651
+ message DeleteResourceRequest {
652
+ // The key of the resource that should be deleted. This can either be the key
653
+ // of a process definition, the key of a decision requirements definition or the key of a form.
654
+ int64 resourceKey = 1;
655
+ }
656
+
657
+ message DeleteResourceResponse {
658
+
659
+ }
660
+
661
+ message BroadcastSignalRequest {
662
+ // The name of the signal
663
+ string signalName = 1;
664
+ // the signal variables as a JSON document; to be valid, the root of the document must be an
665
+ // object, e.g. { "a": "foo" }. [ "foo" ] would not be valid.
666
+ string variables = 2;
667
+ // the id of the tenant that owns the signal.
668
+ string tenantId = 3;
669
+ }
670
+
671
+ message BroadcastSignalResponse {
672
+ // the unique ID of the signal that was broadcasted.
673
+ int64 key = 1;
674
+ // the tenant id of the signal that was broadcasted.
675
+ string tenantId = 2;
676
+ }
677
+
678
+ service Gateway {
679
+ /*
680
+ Iterates through all known partitions round-robin and activates up to the requested
681
+ maximum and streams them back to the client as they are activated.
682
+
683
+ Errors:
684
+ INVALID_ARGUMENT:
685
+ - type is blank (empty string, null)
686
+ - worker is blank (empty string, null)
687
+ - timeout less than 1
688
+ - maxJobsToActivate is less than 1
689
+ */
690
+ rpc ActivateJobs (ActivateJobsRequest) returns (stream ActivateJobsResponse) {
691
+ }
692
+
693
+ /*
694
+ Registers client to a job stream that will stream jobs back to the client as
695
+ they become activatable.
696
+
697
+ Errors:
698
+ INVALID_ARGUMENT:
699
+ - type is blank (empty string, null)
700
+ - timeout less than 1
701
+ - If multi-tenancy is enabled, and tenantIds is empty (empty list)
702
+ - If multi-tenancy is enabled, and an invalid tenant ID is provided. A tenant ID is considered invalid if:
703
+ - The tenant ID is blank (empty string, null)
704
+ - The tenant ID is longer than 31 characters
705
+ - The tenant ID contains anything other than alphanumeric characters, dot (.), dash (-), or underscore (_)
706
+ - If multi-tenancy is disabled, and tenantIds is not empty (empty list), or has an ID other than <default>
707
+ */
708
+ rpc StreamActivatedJobs (StreamActivatedJobsRequest) returns (stream ActivatedJob) {
709
+ }
710
+
711
+ /*
712
+ Cancels a running process instance
713
+
714
+ Errors:
715
+ NOT_FOUND:
716
+ - no process instance exists with the given key
717
+ */
718
+ rpc CancelProcessInstance (CancelProcessInstanceRequest) returns (CancelProcessInstanceResponse) {
719
+ }
720
+
721
+ /*
722
+ Completes a job with the given variables, which allows completing the associated service task.
723
+
724
+ Errors:
725
+ NOT_FOUND:
726
+ - no job exists with the given job key. Note that since jobs are removed once completed,
727
+ it could be that this job did exist at some point.
728
+
729
+ FAILED_PRECONDITION:
730
+ - the job was marked as failed. In that case, the related incident must be resolved before
731
+ the job can be activated again and completed.
732
+ */
733
+ rpc CompleteJob (CompleteJobRequest) returns (CompleteJobResponse) {
734
+ }
735
+
736
+ /*
737
+ Creates and starts an instance of the specified process. The process definition to use to
738
+ create the instance can be specified either using its unique key (as returned by
739
+ DeployProcess), or using the BPMN process ID and a version. Pass -1 as the version to use the
740
+ latest deployed version. Note that only processes with none start events can be started through
741
+ this command.
742
+
743
+ Errors:
744
+ NOT_FOUND:
745
+ - no process with the given key exists (if processDefinitionKey was given)
746
+ - no process with the given process ID exists (if bpmnProcessId was given but version was -1)
747
+ - no process with the given process ID and version exists (if both bpmnProcessId and version were given)
748
+
749
+ FAILED_PRECONDITION:
750
+ - the process definition does not contain a none start event; only processes with none
751
+ start event can be started manually.
752
+
753
+ INVALID_ARGUMENT:
754
+ - the given variables argument is not a valid JSON document; it is expected to be a valid
755
+ JSON document where the root node is an object.
756
+ */
757
+ rpc CreateProcessInstance (CreateProcessInstanceRequest) returns (CreateProcessInstanceResponse) {
758
+ }
759
+
760
+ /*
761
+ Behaves similarly to `rpc CreateProcessInstance`, except that a successful response is received when the process completes successfully.
762
+ */
763
+ rpc CreateProcessInstanceWithResult (CreateProcessInstanceWithResultRequest) returns (CreateProcessInstanceWithResultResponse) {
764
+ }
765
+
766
+ /*
767
+ Evaluates a decision. The decision to evaluate can be specified either by
768
+ using its unique key (as returned by DeployResource), or using the decision
769
+ ID. When using the decision ID, the latest deployed version of the decision
770
+ is used.
771
+
772
+ Errors:
773
+ INVALID_ARGUMENT:
774
+ - no decision with the given key exists (if decisionKey was given)
775
+ - no decision with the given decision ID exists (if decisionId was given)
776
+ - both decision ID and decision KEY were provided, or are missing
777
+ */
778
+ rpc EvaluateDecision (EvaluateDecisionRequest) returns (EvaluateDecisionResponse) {
779
+ }
780
+
781
+ /*
782
+ Deploys one or more processes to Zeebe. Note that this is an atomic call,
783
+ i.e. either all processes are deployed, or none of them are.
784
+
785
+ Errors:
786
+ INVALID_ARGUMENT:
787
+ - no resources given.
788
+ - if at least one resource is invalid. A resource is considered invalid if:
789
+ - the resource data is not deserializable (e.g. detected as BPMN, but it's broken XML)
790
+ - the process is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task)
791
+ */
792
+ rpc DeployProcess (DeployProcessRequest) returns (DeployProcessResponse) {
793
+ // since 8, replaced by DeployResource
794
+ option deprecated = true;
795
+ }
796
+
797
+ /*
798
+ Deploys one or more resources (e.g. processes or decision models) to Zeebe.
799
+ Note that this is an atomic call, i.e. either all resources are deployed, or none of them are.
800
+
801
+ Errors:
802
+ PERMISSION_DENIED:
803
+ - if a deployment to an unauthorized tenant is performed
804
+ INVALID_ARGUMENT:
805
+ - no resources given.
806
+ - if at least one resource is invalid. A resource is considered invalid if:
807
+ - the content is not deserializable (e.g. detected as BPMN, but it's broken XML)
808
+ - the content is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task)
809
+ - if multi-tenancy is enabled, and:
810
+ - a tenant id is not provided
811
+ - a tenant id with an invalid format is provided
812
+ - if multi-tenancy is disabled and a tenant id is provided
813
+ */
814
+ rpc DeployResource (DeployResourceRequest) returns (DeployResourceResponse) {
815
+ }
816
+
817
+
818
+ /*
819
+ Marks the job as failed; if the retries argument is positive, then the job will be immediately
820
+ activatable again, and a worker could try again to process it. If it is zero or negative however,
821
+ an incident will be raised, tagged with the given errorMessage, and the job will not be
822
+ activatable until the incident is resolved.
823
+
824
+ Errors:
825
+ NOT_FOUND:
826
+ - no job was found with the given key
827
+
828
+ FAILED_PRECONDITION:
829
+ - the job was not activated
830
+ - the job is already in a failed state, i.e. ran out of retries
831
+ */
832
+ rpc FailJob (FailJobRequest) returns (FailJobResponse) {
833
+ }
834
+
835
+ /*
836
+ Reports a business error (i.e. non-technical) that occurs while processing a job. The error is handled in the process by an error catch event. If there is no error catch event with the specified errorCode then an incident will be raised instead.
837
+
838
+ Errors:
839
+ NOT_FOUND:
840
+ - no job was found with the given key
841
+
842
+ FAILED_PRECONDITION:
843
+ - the job is not in an activated state
844
+ */
845
+ rpc ThrowError (ThrowErrorRequest) returns (ThrowErrorResponse) {
846
+ }
847
+
848
+ /*
849
+ Publishes a single message. Messages are published to specific partitions computed from their
850
+ correlation keys.
851
+
852
+ Errors:
853
+ ALREADY_EXISTS:
854
+ - a message with the same ID was previously published (and is still alive)
855
+ */
856
+ rpc PublishMessage (PublishMessageRequest) returns (PublishMessageResponse) {
857
+ }
858
+
859
+ /*
860
+ Resolves a given incident. This simply marks the incident as resolved; most likely a call to
861
+ UpdateJobRetries or SetVariables will be necessary to actually resolve the
862
+ problem, following by this call.
863
+
864
+ Errors:
865
+ NOT_FOUND:
866
+ - no incident with the given key exists
867
+ */
868
+ rpc ResolveIncident (ResolveIncidentRequest) returns (ResolveIncidentResponse) {
869
+ }
870
+
871
+ /*
872
+ Updates all the variables of a particular scope (e.g. process instance, flow element instance)
873
+ from the given JSON document.
874
+
875
+ Errors:
876
+ NOT_FOUND:
877
+ - no element with the given elementInstanceKey exists
878
+ INVALID_ARGUMENT:
879
+ - the given variables document is not a valid JSON document; valid documents are expected to
880
+ be JSON documents where the root node is an object.
881
+ */
882
+ rpc SetVariables (SetVariablesRequest) returns (SetVariablesResponse) {
883
+ }
884
+
885
+ /*
886
+ Obtains the current topology of the cluster the gateway is part of.
887
+ */
888
+ rpc Topology (TopologyRequest) returns (TopologyResponse) {
889
+ }
890
+
891
+ /*
892
+ Updates the number of retries a job has left. This is mostly useful for jobs that have run out of
893
+ retries, should the underlying problem be solved.
894
+
895
+ Errors:
896
+ NOT_FOUND:
897
+ - no job exists with the given key
898
+
899
+ INVALID_ARGUMENT:
900
+ - retries is not greater than 0
901
+ */
902
+ rpc UpdateJobRetries (UpdateJobRetriesRequest) returns (UpdateJobRetriesResponse) {
903
+ }
904
+
905
+ /*
906
+ Modifies the process instance. This is done by activating and/or terminating specific elements of the instance.
907
+
908
+ Errors:
909
+ NOT_FOUND:
910
+ - no process instance exists with the given key
911
+
912
+ FAILED_PRECONDITION:
913
+ - trying to activate element inside of a multi-instance
914
+
915
+ INVALID_ARGUMENT:
916
+ - activating or terminating unknown element
917
+ - ancestor of element for activation doesn't exist
918
+ - scope of variable is unknown
919
+ */
920
+ rpc ModifyProcessInstance (ModifyProcessInstanceRequest) returns (ModifyProcessInstanceResponse) {
921
+
922
+ }
923
+
924
+ /*
925
+ Migrates the process instance to the specified process definition.
926
+ In simple terms, this is handled by updating the active element's process.
927
+
928
+ Errors:
929
+ NOT_FOUND:
930
+ - no process instance exists with the given key, or it is not active
931
+ - no process definition exists with the given target definition key
932
+ - no process instance exists with the given key for the tenants the user is authorized to work with.
933
+
934
+ FAILED_PRECONDITION:
935
+ - not all active elements in the given process instance are mapped to the elements in the target process definition
936
+ - a mapping instruction changes the type of an element or event
937
+ - a mapping instruction refers to an unsupported element (i.e. some elements will be supported later on)
938
+ - a mapping instruction refers to element in unsupported scenarios.
939
+ (i.e. migration is not supported when process instance or target process elements contains event subscriptions)
940
+
941
+ INVALID_ARGUMENT:
942
+ - A `sourceElementId` does not refer to an element in the process instance's process definition
943
+ - A `targetElementId` does not refer to an element in the target process definition
944
+ - A `sourceElementId` is mapped by multiple mapping instructions.
945
+ For example, the engine cannot determine how to migrate a process instance when the instructions are: [A->B, A->C].
946
+ */
947
+ rpc MigrateProcessInstance (MigrateProcessInstanceRequest) returns (MigrateProcessInstanceResponse) {
948
+
949
+ }
950
+
951
+ /*
952
+ Updates the deadline of a job using the timeout (in ms) provided. This can be used
953
+ for extending or shortening the job deadline.
954
+
955
+ Errors:
956
+ NOT_FOUND:
957
+ - no job exists with the given key
958
+
959
+ INVALID_STATE:
960
+ - no deadline exists for the given job key
961
+ */
962
+ rpc UpdateJobTimeout (UpdateJobTimeoutRequest) returns (UpdateJobTimeoutResponse) {
963
+ }
964
+
965
+ /*
966
+ Deletes a resource from the state. Once a resource has been deleted it cannot
967
+ be recovered. If the resource needs to be available again, a new deployment
968
+ of the resource is required.
969
+
970
+ Deleting a process will cancel any running instances of this process
971
+ definition. New instances of a deleted process are created using
972
+ the lastest version that hasn't been deleted. Creating a new
973
+ process instance is impossible when all versions have been
974
+ deleted.
975
+
976
+ Deleting a decision requirement definitions could cause incidents in process
977
+ instances referencing these decisions in a business rule task. A decision
978
+ will be evaluated with the latest version that hasn't been deleted. If all
979
+ versions of a decision have been deleted the evaluation is rejected.
980
+
981
+ Errors:
982
+ NOT_FOUND:
983
+ - No resource exists with the given key
984
+
985
+ */
986
+ rpc DeleteResource (DeleteResourceRequest) returns (DeleteResourceResponse) {
987
+
988
+ }
989
+
990
+ /*
991
+ Broadcasts a signal.
992
+ */
993
+ rpc BroadcastSignal (BroadcastSignalRequest) returns (BroadcastSignalResponse) {
994
+
995
+ }
996
+ }