zeebe-client 0.8.0 → 0.11.0
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.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +9 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +25 -14
- data/.solargraph.yml +15 -0
- data/.travis.yml +9 -6
- data/CHANGELOG.md +24 -0
- data/README.md +1 -1
- data/Rakefile +2 -2
- data/lib/zeebe/client.rb +4 -5
- data/lib/zeebe/client/proto/gateway_pb.rb +55 -29
- data/lib/zeebe/client/proto/gateway_services_pb.rb +13 -0
- data/lib/zeebe/client/version.rb +1 -1
- data/proto/gateway.proto +67 -2
- data/spec/spec_helper.rb +5 -0
- data/zeebe-client.gemspec +5 -4
- metadata +32 -23
- data/.rubocop_todo.yml +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c458c30ca89e870cabbead8c0672fdebe62969e28cdf031f64675240eddcb45
|
4
|
+
data.tar.gz: 8c51e32007c3a18bd5adc20d52c6b0d26ae6068866684dec7c809202a92f65e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57cfbc109cc7624026c0a25b1ed7bd87281e6ee04d3f79b591a870715606d5c47c385eba2de63c9a8b6961cd75b1f0255cd622f3c634ff877f5626cd75638947
|
7
|
+
data.tar.gz: 43aa739e75b8bd6123503e464f376f46569fb414ccdc472c04403eb0d535ad102b62ac20075cd38a865861f733e70c2df6d1216a17ed4cb6fe95a4213abb0256
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,17 +1,10 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
---
|
3
2
|
AllCops:
|
4
3
|
TargetRubyVersion: '2.3'
|
5
4
|
Exclude:
|
6
5
|
- 'examples/*'
|
7
6
|
- 'lib/zeebe/client/proto/*'
|
8
7
|
|
9
|
-
Gemspec/OrderedDependencies:
|
10
|
-
Enabled: false
|
11
|
-
|
12
|
-
Layout/AlignHash:
|
13
|
-
Enabled: false
|
14
|
-
|
15
8
|
Layout/EmptyLineAfterGuardClause:
|
16
9
|
Enabled: false
|
17
10
|
|
@@ -19,12 +12,24 @@ Layout/EmptyLineAfterGuardClause:
|
|
19
12
|
Layout/EmptyLinesAroundArguments:
|
20
13
|
Enabled: false
|
21
14
|
|
22
|
-
Layout/
|
15
|
+
Layout/HashAlignment:
|
23
16
|
Enabled: false
|
24
17
|
|
18
|
+
Layout/LeadingEmptyLines:
|
19
|
+
Enabled: false
|
20
|
+
|
21
|
+
Layout/LineLength:
|
22
|
+
Max: 200
|
23
|
+
|
25
24
|
Layout/SpaceInsideHashLiteralBraces:
|
26
25
|
Enabled: false
|
27
26
|
|
27
|
+
Lint/RaiseException:
|
28
|
+
Enabled: true
|
29
|
+
|
30
|
+
Lint/StructNewOverride:
|
31
|
+
Enabled: true
|
32
|
+
|
28
33
|
Metrics/AbcSize:
|
29
34
|
Enabled: false
|
30
35
|
|
@@ -37,19 +42,16 @@ Metrics/ClassLength:
|
|
37
42
|
Metrics/CyclomaticComplexity:
|
38
43
|
Enabled: false
|
39
44
|
|
40
|
-
Metrics/LineLength:
|
41
|
-
Max: 200
|
42
|
-
|
43
45
|
Metrics/MethodLength:
|
44
46
|
Enabled: false
|
45
47
|
|
46
48
|
Metrics/PerceivedComplexity:
|
47
49
|
Enabled: false
|
48
50
|
|
49
|
-
Naming/
|
51
|
+
Naming/MemoizedInstanceVariableName:
|
50
52
|
Enabled: false
|
51
53
|
|
52
|
-
Naming/
|
54
|
+
Naming/MethodParameterName:
|
53
55
|
Enabled: false
|
54
56
|
|
55
57
|
Style/ConditionalAssignment:
|
@@ -67,6 +69,15 @@ Style/FrozenStringLiteralComment:
|
|
67
69
|
Style/GuardClause:
|
68
70
|
Enabled: false
|
69
71
|
|
72
|
+
Style/HashEachMethods:
|
73
|
+
Enabled: true
|
74
|
+
|
75
|
+
Style/HashTransformKeys:
|
76
|
+
Enabled: true
|
77
|
+
|
78
|
+
Style/HashTransformValues:
|
79
|
+
Enabled: true
|
80
|
+
|
70
81
|
Style/IdenticalConditionalBranches:
|
71
82
|
Enabled: false
|
72
83
|
|
data/.solargraph.yml
ADDED
data/.travis.yml
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
---
|
2
|
+
os: linux
|
2
3
|
language: ruby
|
3
4
|
rvm:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
- 2.7
|
6
|
+
- 2.6
|
7
|
+
- 2.5
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
fast_finish: true
|
8
11
|
|
9
12
|
services:
|
10
|
-
|
13
|
+
- docker
|
11
14
|
|
12
15
|
script:
|
13
|
-
|
16
|
+
- bundle exec rake travis
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,29 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.11.0 (July 29, 2020)
|
4
|
+
|
5
|
+
- support Ruby 2.7
|
6
|
+
- drop EOL Ruby 2.4 and older
|
7
|
+
- add support for [Zeebe 0.24.1](https://github.com/zeebe-io/zeebe/releases/tag/0.24.1)
|
8
|
+
|
9
|
+
## 0.10.1 (April 24, 2020)
|
10
|
+
|
11
|
+
- add support for [Zeebe 0.23.1](https://github.com/zeebe-io/zeebe/releases/tag/0.23.1)
|
12
|
+
- improve test setup to allow catching some load order problems like the one from [#47](https://github.com/zeebe-io/zeebe-client-ruby/pull/47)
|
13
|
+
|
14
|
+
## 0.10.0 (April 21, 2020)
|
15
|
+
|
16
|
+
- add support for [Zeebe 0.23.0](https://github.com/zeebe-io/zeebe/releases/tag/0.23.0)
|
17
|
+
- fix load order problem to allow loading the gem successfully [#47](https://github.com/zeebe-io/zeebe-client-ruby/pull/47) (thanks rusterholz)
|
18
|
+
|
19
|
+
## 0.9.1 (March 12, 2020)
|
20
|
+
|
21
|
+
- add support for [Zeebe 0.22.2](https://github.com/zeebe-io/zeebe/releases/tag/0.22.2)
|
22
|
+
|
23
|
+
## 0.9.0 (March 2, 2020)
|
24
|
+
|
25
|
+
- add support for [Zeebe 0.22.1](https://github.com/zeebe-io/zeebe/releases/tag/0.22.1)
|
26
|
+
|
3
27
|
## 0.8.0 (October 9, 2019)
|
4
28
|
|
5
29
|
- add support for [Zeebe 0.21.1](https://github.com/zeebe-io/zeebe/releases/tag/0.21.1)
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -13,8 +13,8 @@ task travis: ['zeebe:start', :default, 'zeebe:stop']
|
|
13
13
|
|
14
14
|
desc 'Starts Zeebe Docker container'
|
15
15
|
task 'zeebe:start' do
|
16
|
-
sh 'docker run -d --name zeebe --rm -p 26500:26500 camunda/zeebe:0.
|
17
|
-
sleep(
|
16
|
+
sh 'docker run -d --name zeebe --rm -p 26500:26500 camunda/zeebe:0.24.1'
|
17
|
+
sleep(10)
|
18
18
|
end
|
19
19
|
|
20
20
|
desc 'Stops Zeebe Docker container'
|
data/lib/zeebe/client.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
|
2
|
-
require 'zeebe/client/proto/gateway_pb'
|
3
|
-
require 'zeebe/client/proto/gateway_services_pb'
|
4
|
-
require 'zeebe/client/version'
|
5
|
-
|
6
1
|
module Zeebe
|
7
2
|
module Client
|
8
3
|
end
|
9
4
|
end
|
5
|
+
|
6
|
+
require 'zeebe/client/proto/gateway_pb'
|
7
|
+
require 'zeebe/client/proto/gateway_services_pb'
|
8
|
+
require 'zeebe/client/version'
|
@@ -54,6 +54,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
54
54
|
optional :version, :int32, 3
|
55
55
|
optional :workflowInstanceKey, :int64, 4
|
56
56
|
end
|
57
|
+
add_message "gateway_protocol.CreateWorkflowInstanceWithResultRequest" do
|
58
|
+
optional :request, :message, 1, "gateway_protocol.CreateWorkflowInstanceRequest"
|
59
|
+
optional :requestTimeout, :int64, 2
|
60
|
+
repeated :fetchVariables, :string, 3
|
61
|
+
end
|
62
|
+
add_message "gateway_protocol.CreateWorkflowInstanceWithResultResponse" do
|
63
|
+
optional :workflowKey, :int64, 1
|
64
|
+
optional :bpmnProcessId, :string, 2
|
65
|
+
optional :version, :int32, 3
|
66
|
+
optional :workflowInstanceKey, :int64, 4
|
67
|
+
optional :variables, :string, 5
|
68
|
+
end
|
57
69
|
add_message "gateway_protocol.DeployWorkflowRequest" do
|
58
70
|
repeated :workflows, :message, 1, "gateway_protocol.WorkflowRequestObject"
|
59
71
|
end
|
@@ -84,6 +96,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
84
96
|
end
|
85
97
|
add_message "gateway_protocol.FailJobResponse" do
|
86
98
|
end
|
99
|
+
add_message "gateway_protocol.ThrowErrorRequest" do
|
100
|
+
optional :jobKey, :int64, 1
|
101
|
+
optional :errorCode, :string, 2
|
102
|
+
optional :errorMessage, :string, 3
|
103
|
+
end
|
104
|
+
add_message "gateway_protocol.ThrowErrorResponse" do
|
105
|
+
end
|
87
106
|
add_message "gateway_protocol.PublishMessageRequest" do
|
88
107
|
optional :name, :string, 1
|
89
108
|
optional :correlationKey, :string, 2
|
@@ -105,12 +124,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
105
124
|
optional :clusterSize, :int32, 2
|
106
125
|
optional :partitionsCount, :int32, 3
|
107
126
|
optional :replicationFactor, :int32, 4
|
127
|
+
optional :gatewayVersion, :string, 5
|
108
128
|
end
|
109
129
|
add_message "gateway_protocol.BrokerInfo" do
|
110
130
|
optional :nodeId, :int32, 1
|
111
131
|
optional :host, :string, 2
|
112
132
|
optional :port, :int32, 3
|
113
133
|
repeated :partitions, :message, 4, "gateway_protocol.Partition"
|
134
|
+
optional :version, :string, 5
|
114
135
|
end
|
115
136
|
add_message "gateway_protocol.Partition" do
|
116
137
|
optional :partitionId, :int32, 1
|
@@ -132,38 +153,43 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
132
153
|
optional :local, :bool, 3
|
133
154
|
end
|
134
155
|
add_message "gateway_protocol.SetVariablesResponse" do
|
156
|
+
optional :key, :int64, 1
|
135
157
|
end
|
136
158
|
end
|
137
159
|
end
|
138
160
|
|
139
161
|
module Zeebe::Client::GatewayProtocol
|
140
|
-
ActivateJobsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ActivateJobsRequest").msgclass
|
141
|
-
ActivateJobsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ActivateJobsResponse").msgclass
|
142
|
-
ActivatedJob = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ActivatedJob").msgclass
|
143
|
-
CancelWorkflowInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CancelWorkflowInstanceRequest").msgclass
|
144
|
-
CancelWorkflowInstanceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CancelWorkflowInstanceResponse").msgclass
|
145
|
-
CompleteJobRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CompleteJobRequest").msgclass
|
146
|
-
CompleteJobResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CompleteJobResponse").msgclass
|
147
|
-
CreateWorkflowInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CreateWorkflowInstanceRequest").msgclass
|
148
|
-
CreateWorkflowInstanceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CreateWorkflowInstanceResponse").msgclass
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
162
|
+
ActivateJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ActivateJobsRequest").msgclass
|
163
|
+
ActivateJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ActivateJobsResponse").msgclass
|
164
|
+
ActivatedJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ActivatedJob").msgclass
|
165
|
+
CancelWorkflowInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CancelWorkflowInstanceRequest").msgclass
|
166
|
+
CancelWorkflowInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CancelWorkflowInstanceResponse").msgclass
|
167
|
+
CompleteJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CompleteJobRequest").msgclass
|
168
|
+
CompleteJobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CompleteJobResponse").msgclass
|
169
|
+
CreateWorkflowInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CreateWorkflowInstanceRequest").msgclass
|
170
|
+
CreateWorkflowInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CreateWorkflowInstanceResponse").msgclass
|
171
|
+
CreateWorkflowInstanceWithResultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CreateWorkflowInstanceWithResultRequest").msgclass
|
172
|
+
CreateWorkflowInstanceWithResultResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CreateWorkflowInstanceWithResultResponse").msgclass
|
173
|
+
DeployWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.DeployWorkflowRequest").msgclass
|
174
|
+
WorkflowRequestObject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.WorkflowRequestObject").msgclass
|
175
|
+
WorkflowRequestObject::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.WorkflowRequestObject.ResourceType").enummodule
|
176
|
+
DeployWorkflowResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.DeployWorkflowResponse").msgclass
|
177
|
+
WorkflowMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.WorkflowMetadata").msgclass
|
178
|
+
FailJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.FailJobRequest").msgclass
|
179
|
+
FailJobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.FailJobResponse").msgclass
|
180
|
+
ThrowErrorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ThrowErrorRequest").msgclass
|
181
|
+
ThrowErrorResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ThrowErrorResponse").msgclass
|
182
|
+
PublishMessageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.PublishMessageRequest").msgclass
|
183
|
+
PublishMessageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.PublishMessageResponse").msgclass
|
184
|
+
ResolveIncidentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ResolveIncidentRequest").msgclass
|
185
|
+
ResolveIncidentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ResolveIncidentResponse").msgclass
|
186
|
+
TopologyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.TopologyRequest").msgclass
|
187
|
+
TopologyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.TopologyResponse").msgclass
|
188
|
+
BrokerInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.BrokerInfo").msgclass
|
189
|
+
Partition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.Partition").msgclass
|
190
|
+
Partition::PartitionBrokerRole = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.Partition.PartitionBrokerRole").enummodule
|
191
|
+
UpdateJobRetriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateJobRetriesRequest").msgclass
|
192
|
+
UpdateJobRetriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateJobRetriesResponse").msgclass
|
193
|
+
SetVariablesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.SetVariablesRequest").msgclass
|
194
|
+
SetVariablesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.SetVariablesResponse").msgclass
|
169
195
|
end
|
@@ -66,6 +66,9 @@ module Zeebe::Client::GatewayProtocol
|
|
66
66
|
# JSON document where the root node is an object.
|
67
67
|
rpc :CreateWorkflowInstance, CreateWorkflowInstanceRequest, CreateWorkflowInstanceResponse
|
68
68
|
#
|
69
|
+
# Behaves similarly to `rpc CreateWorkflowInstance`, except that a successful response is received when the workflow completes successfully.
|
70
|
+
rpc :CreateWorkflowInstanceWithResult, CreateWorkflowInstanceWithResultRequest, CreateWorkflowInstanceWithResultResponse
|
71
|
+
#
|
69
72
|
# Deploys one or more workflows to Zeebe. Note that this is an atomic call,
|
70
73
|
# i.e. either all workflows are deployed, or none of them are.
|
71
74
|
#
|
@@ -92,6 +95,16 @@ module Zeebe::Client::GatewayProtocol
|
|
92
95
|
# - the job is already in a failed state, i.e. ran out of retries
|
93
96
|
rpc :FailJob, FailJobRequest, FailJobResponse
|
94
97
|
#
|
98
|
+
# Reports a business error (i.e. non-technical) that occurs while processing a job. The error is handled in the workflow by an error catch event. If there is no error catch event with the specified errorCode then an incident will be raised instead.
|
99
|
+
#
|
100
|
+
# Errors:
|
101
|
+
# NOT_FOUND:
|
102
|
+
# - no job was found with the given key
|
103
|
+
#
|
104
|
+
# FAILED_PRECONDITION:
|
105
|
+
# - the job is not in an activated state
|
106
|
+
rpc :ThrowError, ThrowErrorRequest, ThrowErrorResponse
|
107
|
+
#
|
95
108
|
# Publishes a single message. Messages are published to specific partitions computed from their
|
96
109
|
# correlation keys.
|
97
110
|
#
|
data/lib/zeebe/client/version.rb
CHANGED
data/proto/gateway.proto
CHANGED
@@ -15,14 +15,14 @@ message ActivateJobsRequest {
|
|
15
15
|
// the name of the worker activating the jobs, mostly used for logging purposes
|
16
16
|
string worker = 2;
|
17
17
|
// a job returned after this call will not be activated by another call until the
|
18
|
-
// timeout has been reached
|
18
|
+
// timeout (in ms) has been reached
|
19
19
|
int64 timeout = 3;
|
20
20
|
// the maximum jobs to activate by this request
|
21
21
|
int32 maxJobsToActivate = 4;
|
22
22
|
// a list of variables to fetch as the job variables; if empty, all visible variables at
|
23
23
|
// the time of activation for the scope of the job will be returned
|
24
24
|
repeated string fetchVariable = 5;
|
25
|
-
// The request will be completed when at least one job is activated or after the requestTimeout.
|
25
|
+
// The request will be completed when at least one job is activated or after the requestTimeout (in ms).
|
26
26
|
// if the requestTimeout = 0, a default timeout is used.
|
27
27
|
// if the requestTimeout < 0, long polling is disabled and the request is completed immediately, even when no job is activated.
|
28
28
|
int64 requestTimeout = 6;
|
@@ -113,6 +113,34 @@ message CreateWorkflowInstanceResponse {
|
|
113
113
|
int64 workflowInstanceKey = 4;
|
114
114
|
}
|
115
115
|
|
116
|
+
message CreateWorkflowInstanceWithResultRequest {
|
117
|
+
CreateWorkflowInstanceRequest request = 1;
|
118
|
+
// timeout (in ms). the request will be closed if the workflow is not completed
|
119
|
+
// before the requestTimeout.
|
120
|
+
// if requestTimeout = 0, uses the generic requestTimeout configured in the gateway.
|
121
|
+
int64 requestTimeout = 2;
|
122
|
+
// list of names of variables to be included in `CreateWorkflowInstanceWithResultResponse.variables`
|
123
|
+
// if empty, all visible variables in the root scope will be returned.
|
124
|
+
repeated string fetchVariables = 3;
|
125
|
+
}
|
126
|
+
|
127
|
+
message CreateWorkflowInstanceWithResultResponse {
|
128
|
+
// the key of the workflow definition which was used to create the workflow instance
|
129
|
+
int64 workflowKey = 1;
|
130
|
+
// the BPMN process ID of the workflow definition which was used to create the workflow
|
131
|
+
// instance
|
132
|
+
string bpmnProcessId = 2;
|
133
|
+
// the version of the workflow definition which was used to create the workflow instance
|
134
|
+
int32 version = 3;
|
135
|
+
// the unique identifier of the created workflow instance; to be used wherever a request
|
136
|
+
// needs a workflow instance key (e.g. CancelWorkflowInstanceRequest)
|
137
|
+
int64 workflowInstanceKey = 4;
|
138
|
+
// JSON document
|
139
|
+
// consists of visible variables in the root scope
|
140
|
+
string variables = 5;
|
141
|
+
|
142
|
+
}
|
143
|
+
|
116
144
|
message DeployWorkflowRequest {
|
117
145
|
// List of workflow resources to deploy
|
118
146
|
repeated WorkflowRequestObject workflows = 1;
|
@@ -170,6 +198,18 @@ message FailJobRequest {
|
|
170
198
|
message FailJobResponse {
|
171
199
|
}
|
172
200
|
|
201
|
+
message ThrowErrorRequest {
|
202
|
+
// the unique job identifier, as obtained when activating the job
|
203
|
+
int64 jobKey = 1;
|
204
|
+
// the error code that will be matched with an error catch event
|
205
|
+
string errorCode = 2;
|
206
|
+
// an optional error message that provides additional context
|
207
|
+
string errorMessage = 3;
|
208
|
+
}
|
209
|
+
|
210
|
+
message ThrowErrorResponse {
|
211
|
+
}
|
212
|
+
|
173
213
|
message PublishMessageRequest {
|
174
214
|
// the name of the message
|
175
215
|
string name = 1;
|
@@ -208,6 +248,8 @@ message TopologyResponse {
|
|
208
248
|
int32 partitionsCount = 3;
|
209
249
|
// configured replication factor for this cluster
|
210
250
|
int32 replicationFactor = 4;
|
251
|
+
// gateway version
|
252
|
+
string gatewayVersion = 5;
|
211
253
|
}
|
212
254
|
|
213
255
|
message BrokerInfo {
|
@@ -219,6 +261,8 @@ message BrokerInfo {
|
|
219
261
|
int32 port = 3;
|
220
262
|
// list of partitions managed or replicated on this broker
|
221
263
|
repeated Partition partitions = 4;
|
264
|
+
// broker version
|
265
|
+
string version = 5;
|
222
266
|
}
|
223
267
|
|
224
268
|
message Partition {
|
@@ -263,6 +307,8 @@ message SetVariablesRequest {
|
|
263
307
|
}
|
264
308
|
|
265
309
|
message SetVariablesResponse {
|
310
|
+
// the unique key of the set variables command
|
311
|
+
int64 key = 1;
|
266
312
|
}
|
267
313
|
|
268
314
|
service Gateway {
|
@@ -329,6 +375,12 @@ service Gateway {
|
|
329
375
|
rpc CreateWorkflowInstance (CreateWorkflowInstanceRequest) returns (CreateWorkflowInstanceResponse) {
|
330
376
|
}
|
331
377
|
|
378
|
+
/*
|
379
|
+
Behaves similarly to `rpc CreateWorkflowInstance`, except that a successful response is received when the workflow completes successfully.
|
380
|
+
*/
|
381
|
+
rpc CreateWorkflowInstanceWithResult (CreateWorkflowInstanceWithResultRequest) returns (CreateWorkflowInstanceWithResultResponse) {
|
382
|
+
}
|
383
|
+
|
332
384
|
/*
|
333
385
|
Deploys one or more workflows to Zeebe. Note that this is an atomic call,
|
334
386
|
i.e. either all workflows are deployed, or none of them are.
|
@@ -361,6 +413,19 @@ service Gateway {
|
|
361
413
|
rpc FailJob (FailJobRequest) returns (FailJobResponse) {
|
362
414
|
}
|
363
415
|
|
416
|
+
/*
|
417
|
+
Reports a business error (i.e. non-technical) that occurs while processing a job. The error is handled in the workflow by an error catch event. If there is no error catch event with the specified errorCode then an incident will be raised instead.
|
418
|
+
|
419
|
+
Errors:
|
420
|
+
NOT_FOUND:
|
421
|
+
- no job was found with the given key
|
422
|
+
|
423
|
+
FAILED_PRECONDITION:
|
424
|
+
- the job is not in an activated state
|
425
|
+
*/
|
426
|
+
rpc ThrowError (ThrowErrorRequest) returns (ThrowErrorResponse) {
|
427
|
+
}
|
428
|
+
|
364
429
|
/*
|
365
430
|
Publishes a single message. Messages are published to specific partitions computed from their
|
366
431
|
correlation keys.
|
data/spec/spec_helper.rb
CHANGED
@@ -2,4 +2,9 @@
|
|
2
2
|
require 'rubygems'
|
3
3
|
require 'bundler/setup'
|
4
4
|
|
5
|
+
# Remove any previous definitions for the constant `Zeebe` (module) that might
|
6
|
+
# already exist e.g. due to how bundler works to test if requiring the gem works
|
7
|
+
# correctly in a nearly-untouched environment and surface load order issues like
|
8
|
+
# the one in https://github.com/zeebe-io/zeebe-client-ruby/pull/47
|
9
|
+
Object.send :remove_const, :Zeebe
|
5
10
|
require 'zeebe/client'
|
data/zeebe-client.gemspec
CHANGED
@@ -19,12 +19,13 @@ Gem::Specification.new do |s|
|
|
19
19
|
|
20
20
|
s.required_ruby_version = '>= 2.3'
|
21
21
|
|
22
|
-
s.add_runtime_dependency 'grpc', '
|
22
|
+
s.add_runtime_dependency 'grpc', '~> 1.28.0'
|
23
23
|
|
24
|
-
s.add_development_dependency 'grpc-tools', '~> 1.24.0'
|
25
24
|
s.add_development_dependency 'bundler'
|
25
|
+
s.add_development_dependency 'bundler-audit', '~> 0.7.0'
|
26
|
+
s.add_development_dependency 'grpc-tools', '~> 1.28.0'
|
26
27
|
s.add_development_dependency 'rake'
|
27
28
|
s.add_development_dependency 'rspec'
|
28
|
-
s.add_development_dependency 'rubocop', '~> 0.
|
29
|
-
s.add_development_dependency '
|
29
|
+
s.add_development_dependency 'rubocop', '~> 0.81.0'
|
30
|
+
s.add_development_dependency 'solargraph'
|
30
31
|
end
|
metadata
CHANGED
@@ -1,63 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zeebe-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Nicolai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.23'
|
20
|
-
- - "<"
|
17
|
+
- - "~>"
|
21
18
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
19
|
+
version: 1.28.0
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.28.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
26
30
|
requirements:
|
27
31
|
- - ">="
|
28
32
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
30
|
-
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
31
39
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
40
|
+
version: '0'
|
33
41
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
42
|
+
name: bundler-audit
|
35
43
|
requirement: !ruby/object:Gem::Requirement
|
36
44
|
requirements:
|
37
45
|
- - "~>"
|
38
46
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
47
|
+
version: 0.7.0
|
40
48
|
type: :development
|
41
49
|
prerelease: false
|
42
50
|
version_requirements: !ruby/object:Gem::Requirement
|
43
51
|
requirements:
|
44
52
|
- - "~>"
|
45
53
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
54
|
+
version: 0.7.0
|
47
55
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
56
|
+
name: grpc-tools
|
49
57
|
requirement: !ruby/object:Gem::Requirement
|
50
58
|
requirements:
|
51
|
-
- - "
|
59
|
+
- - "~>"
|
52
60
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
61
|
+
version: 1.28.0
|
54
62
|
type: :development
|
55
63
|
prerelease: false
|
56
64
|
version_requirements: !ruby/object:Gem::Requirement
|
57
65
|
requirements:
|
58
|
-
- - "
|
66
|
+
- - "~>"
|
59
67
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
68
|
+
version: 1.28.0
|
61
69
|
- !ruby/object:Gem::Dependency
|
62
70
|
name: rake
|
63
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,16 +100,16 @@ dependencies:
|
|
92
100
|
requirements:
|
93
101
|
- - "~>"
|
94
102
|
- !ruby/object:Gem::Version
|
95
|
-
version: 0.
|
103
|
+
version: 0.81.0
|
96
104
|
type: :development
|
97
105
|
prerelease: false
|
98
106
|
version_requirements: !ruby/object:Gem::Requirement
|
99
107
|
requirements:
|
100
108
|
- - "~>"
|
101
109
|
- !ruby/object:Gem::Version
|
102
|
-
version: 0.
|
110
|
+
version: 0.81.0
|
103
111
|
- !ruby/object:Gem::Dependency
|
104
|
-
name:
|
112
|
+
name: solargraph
|
105
113
|
requirement: !ruby/object:Gem::Requirement
|
106
114
|
requirements:
|
107
115
|
- - ">="
|
@@ -121,9 +129,10 @@ executables: []
|
|
121
129
|
extensions: []
|
122
130
|
extra_rdoc_files: []
|
123
131
|
files:
|
132
|
+
- ".github/dependabot.yml"
|
124
133
|
- ".gitignore"
|
125
134
|
- ".rubocop.yml"
|
126
|
-
- ".
|
135
|
+
- ".solargraph.yml"
|
127
136
|
- ".travis.yml"
|
128
137
|
- CHANGELOG.md
|
129
138
|
- CODE_OF_CONDUCT.md
|
@@ -160,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
169
|
- !ruby/object:Gem::Version
|
161
170
|
version: '0'
|
162
171
|
requirements: []
|
163
|
-
rubygems_version: 3.0.
|
172
|
+
rubygems_version: 3.0.8
|
164
173
|
signing_key:
|
165
174
|
specification_version: 4
|
166
175
|
summary: Zeebe Client
|
data/.rubocop_todo.yml
DELETED
File without changes
|