zeebe-client 0.12.1 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +2 -3
- data/.rubocop.yml +8 -3
- data/CHANGELOG.md +21 -0
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/lib/zeebe/client/proto/gateway_pb.rb +41 -41
- data/lib/zeebe/client/proto/gateway_services_pb.rb +20 -21
- data/lib/zeebe/client/version.rb +1 -1
- data/proto/gateway.proto +84 -87
- data/zeebe-client.gemspec +5 -3
- metadata +36 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10b904e1976f397aefac10066918b784ed813a81c449b2f8fda9a11a9b21c426
|
4
|
+
data.tar.gz: fafb06bd75910bd2d53bb24d781b8bed30b93e13bb616fbf863b0d34019b0962
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67556895638a8ac8b1fb08099e8a7cd29b454d06ba89ba3f28b85c58e6f7e7c89a0f1a2322b74292a94e42c9e3bcd72ce09bf622415664d5356dcb9bd5cea7c4
|
7
|
+
data.tar.gz: 68c04e572fcc9015e901cabcbcfcba0072cd6a37e5290a15a7af0dd02058068dc4ab613d74000bc437153bab78acd76ad56d0af8d4edd7f36f89a4739e01889d
|
data/.github/workflows/ci.yml
CHANGED
@@ -19,15 +19,14 @@ jobs:
|
|
19
19
|
- '2.5'
|
20
20
|
- '2.6'
|
21
21
|
- '2.7'
|
22
|
+
- '3.0'
|
22
23
|
steps:
|
23
24
|
- uses: actions/checkout@v2
|
24
25
|
- name: Set up Ruby ${{ matrix.ruby-version }}
|
25
26
|
uses: ruby/setup-ruby@v1
|
26
27
|
with:
|
27
28
|
ruby-version: ${{ matrix.ruby-version }}
|
28
|
-
|
29
|
-
run: |
|
30
|
-
bundle
|
29
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
31
30
|
- name: Test
|
32
31
|
run: |
|
33
32
|
bundle exec rake ci
|
data/.rubocop.yml
CHANGED
@@ -1,9 +1,14 @@
|
|
1
1
|
---
|
2
|
+
inherit_mode:
|
3
|
+
merge:
|
4
|
+
- Exclude
|
5
|
+
|
2
6
|
AllCops:
|
3
|
-
TargetRubyVersion: '2.
|
7
|
+
TargetRubyVersion: '2.5'
|
8
|
+
NewCops: enable
|
4
9
|
Exclude:
|
5
|
-
|
6
|
-
|
10
|
+
- 'examples/*'
|
11
|
+
- 'lib/zeebe/client/proto/*'
|
7
12
|
|
8
13
|
Layout/EmptyLineAfterGuardClause:
|
9
14
|
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.14.1 (June 23, 2021)
|
4
|
+
|
5
|
+
- add support for [Zeebe 1.0.1](https://github.com/zeebe-io/zeebe/releases/tag/1.0.1)
|
6
|
+
|
7
|
+
## 0.14.0 (May 17, 2021)
|
8
|
+
|
9
|
+
- add support for [Zeebe 1.0.0](https://github.com/zeebe-io/zeebe/releases/tag/1.0.0), thanks [@EugeneIstomin](https://github.com/zeebe-io/zeebe-client-ruby/pull/69)
|
10
|
+
|
11
|
+
## 0.13.2 (March 30, 2021)
|
12
|
+
|
13
|
+
- add support for [Zeebe 0.26.2](https://github.com/zeebe-io/zeebe/releases/tag/0.26.2)
|
14
|
+
|
15
|
+
## 0.13.1 (February 26, 2021)
|
16
|
+
|
17
|
+
- support Ruby 3.0
|
18
|
+
- add support for [Zeebe 0.26.1](https://github.com/zeebe-io/zeebe/releases/tag/0.26.1)
|
19
|
+
|
20
|
+
## 0.13.0 (February 3, 2021)
|
21
|
+
|
22
|
+
- add support for [Zeebe 0.26.0](https://github.com/zeebe-io/zeebe/releases/tag/0.26.0), thanks [@rusterholz](https://github.com/zeebe-io/zeebe-client-ruby/pull/62)
|
23
|
+
|
3
24
|
## 0.12.1 (December 11, 2020)
|
4
25
|
|
5
26
|
- add support for [Zeebe 0.25.3](https://github.com/zeebe-io/zeebe/releases/tag/0.25.3)
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -13,7 +13,7 @@ task ci: ['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.
|
16
|
+
sh 'docker run -d --name zeebe --rm -p 26500:26500 camunda/zeebe:1.0.1'
|
17
17
|
sleep(10)
|
18
18
|
end
|
19
19
|
|
@@ -19,10 +19,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
19
19
|
add_message "gateway_protocol.ActivatedJob" do
|
20
20
|
optional :key, :int64, 1
|
21
21
|
optional :type, :string, 2
|
22
|
-
optional :
|
22
|
+
optional :processInstanceKey, :int64, 3
|
23
23
|
optional :bpmnProcessId, :string, 4
|
24
|
-
optional :
|
25
|
-
optional :
|
24
|
+
optional :processDefinitionVersion, :int32, 5
|
25
|
+
optional :processDefinitionKey, :int64, 6
|
26
26
|
optional :elementId, :string, 7
|
27
27
|
optional :elementInstanceKey, :int64, 8
|
28
28
|
optional :customHeaders, :string, 9
|
@@ -31,10 +31,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
31
31
|
optional :deadline, :int64, 12
|
32
32
|
optional :variables, :string, 13
|
33
33
|
end
|
34
|
-
add_message "gateway_protocol.
|
35
|
-
optional :
|
34
|
+
add_message "gateway_protocol.CancelProcessInstanceRequest" do
|
35
|
+
optional :processInstanceKey, :int64, 1
|
36
36
|
end
|
37
|
-
add_message "gateway_protocol.
|
37
|
+
add_message "gateway_protocol.CancelProcessInstanceResponse" do
|
38
38
|
end
|
39
39
|
add_message "gateway_protocol.CompleteJobRequest" do
|
40
40
|
optional :jobKey, :int64, 1
|
@@ -42,51 +42,45 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
42
42
|
end
|
43
43
|
add_message "gateway_protocol.CompleteJobResponse" do
|
44
44
|
end
|
45
|
-
add_message "gateway_protocol.
|
46
|
-
optional :
|
45
|
+
add_message "gateway_protocol.CreateProcessInstanceRequest" do
|
46
|
+
optional :processDefinitionKey, :int64, 1
|
47
47
|
optional :bpmnProcessId, :string, 2
|
48
48
|
optional :version, :int32, 3
|
49
49
|
optional :variables, :string, 4
|
50
50
|
end
|
51
|
-
add_message "gateway_protocol.
|
52
|
-
optional :
|
51
|
+
add_message "gateway_protocol.CreateProcessInstanceResponse" do
|
52
|
+
optional :processDefinitionKey, :int64, 1
|
53
53
|
optional :bpmnProcessId, :string, 2
|
54
54
|
optional :version, :int32, 3
|
55
|
-
optional :
|
55
|
+
optional :processInstanceKey, :int64, 4
|
56
56
|
end
|
57
|
-
add_message "gateway_protocol.
|
58
|
-
optional :request, :message, 1, "gateway_protocol.
|
57
|
+
add_message "gateway_protocol.CreateProcessInstanceWithResultRequest" do
|
58
|
+
optional :request, :message, 1, "gateway_protocol.CreateProcessInstanceRequest"
|
59
59
|
optional :requestTimeout, :int64, 2
|
60
60
|
repeated :fetchVariables, :string, 3
|
61
61
|
end
|
62
|
-
add_message "gateway_protocol.
|
63
|
-
optional :
|
62
|
+
add_message "gateway_protocol.CreateProcessInstanceWithResultResponse" do
|
63
|
+
optional :processDefinitionKey, :int64, 1
|
64
64
|
optional :bpmnProcessId, :string, 2
|
65
65
|
optional :version, :int32, 3
|
66
|
-
optional :
|
66
|
+
optional :processInstanceKey, :int64, 4
|
67
67
|
optional :variables, :string, 5
|
68
68
|
end
|
69
|
-
add_message "gateway_protocol.
|
70
|
-
repeated :
|
69
|
+
add_message "gateway_protocol.DeployProcessRequest" do
|
70
|
+
repeated :processes, :message, 1, "gateway_protocol.ProcessRequestObject"
|
71
71
|
end
|
72
|
-
add_message "gateway_protocol.
|
72
|
+
add_message "gateway_protocol.ProcessRequestObject" do
|
73
73
|
optional :name, :string, 1
|
74
|
-
optional :
|
75
|
-
optional :definition, :bytes, 3
|
74
|
+
optional :definition, :bytes, 2
|
76
75
|
end
|
77
|
-
|
78
|
-
value :FILE, 0
|
79
|
-
value :BPMN, 1
|
80
|
-
value :YAML, 2
|
81
|
-
end
|
82
|
-
add_message "gateway_protocol.DeployWorkflowResponse" do
|
76
|
+
add_message "gateway_protocol.DeployProcessResponse" do
|
83
77
|
optional :key, :int64, 1
|
84
|
-
repeated :
|
78
|
+
repeated :processes, :message, 2, "gateway_protocol.ProcessMetadata"
|
85
79
|
end
|
86
|
-
add_message "gateway_protocol.
|
80
|
+
add_message "gateway_protocol.ProcessMetadata" do
|
87
81
|
optional :bpmnProcessId, :string, 1
|
88
82
|
optional :version, :int32, 2
|
89
|
-
optional :
|
83
|
+
optional :processDefinitionKey, :int64, 3
|
90
84
|
optional :resourceName, :string, 4
|
91
85
|
end
|
92
86
|
add_message "gateway_protocol.FailJobRequest" do
|
@@ -137,10 +131,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
137
131
|
add_message "gateway_protocol.Partition" do
|
138
132
|
optional :partitionId, :int32, 1
|
139
133
|
optional :role, :enum, 2, "gateway_protocol.Partition.PartitionBrokerRole"
|
134
|
+
optional :health, :enum, 3, "gateway_protocol.Partition.PartitionBrokerHealth"
|
140
135
|
end
|
141
136
|
add_enum "gateway_protocol.Partition.PartitionBrokerRole" do
|
142
137
|
value :LEADER, 0
|
143
138
|
value :FOLLOWER, 1
|
139
|
+
value :INACTIVE, 2
|
140
|
+
end
|
141
|
+
add_enum "gateway_protocol.Partition.PartitionBrokerHealth" do
|
142
|
+
value :HEALTHY, 0
|
143
|
+
value :UNHEALTHY, 1
|
144
144
|
end
|
145
145
|
add_message "gateway_protocol.UpdateJobRetriesRequest" do
|
146
146
|
optional :jobKey, :int64, 1
|
@@ -163,19 +163,18 @@ module Zeebe::Client::GatewayProtocol
|
|
163
163
|
ActivateJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ActivateJobsRequest").msgclass
|
164
164
|
ActivateJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ActivateJobsResponse").msgclass
|
165
165
|
ActivatedJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ActivatedJob").msgclass
|
166
|
-
|
167
|
-
|
166
|
+
CancelProcessInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CancelProcessInstanceRequest").msgclass
|
167
|
+
CancelProcessInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CancelProcessInstanceResponse").msgclass
|
168
168
|
CompleteJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CompleteJobRequest").msgclass
|
169
169
|
CompleteJobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CompleteJobResponse").msgclass
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
WorkflowMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.WorkflowMetadata").msgclass
|
170
|
+
CreateProcessInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CreateProcessInstanceRequest").msgclass
|
171
|
+
CreateProcessInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CreateProcessInstanceResponse").msgclass
|
172
|
+
CreateProcessInstanceWithResultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CreateProcessInstanceWithResultRequest").msgclass
|
173
|
+
CreateProcessInstanceWithResultResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CreateProcessInstanceWithResultResponse").msgclass
|
174
|
+
DeployProcessRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.DeployProcessRequest").msgclass
|
175
|
+
ProcessRequestObject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ProcessRequestObject").msgclass
|
176
|
+
DeployProcessResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.DeployProcessResponse").msgclass
|
177
|
+
ProcessMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ProcessMetadata").msgclass
|
179
178
|
FailJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.FailJobRequest").msgclass
|
180
179
|
FailJobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.FailJobResponse").msgclass
|
181
180
|
ThrowErrorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ThrowErrorRequest").msgclass
|
@@ -189,6 +188,7 @@ module Zeebe::Client::GatewayProtocol
|
|
189
188
|
BrokerInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.BrokerInfo").msgclass
|
190
189
|
Partition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.Partition").msgclass
|
191
190
|
Partition::PartitionBrokerRole = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.Partition.PartitionBrokerRole").enummodule
|
191
|
+
Partition::PartitionBrokerHealth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.Partition.PartitionBrokerHealth").enummodule
|
192
192
|
UpdateJobRetriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateJobRetriesRequest").msgclass
|
193
193
|
UpdateJobRetriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateJobRetriesResponse").msgclass
|
194
194
|
SetVariablesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.SetVariablesRequest").msgclass
|
@@ -8,7 +8,7 @@ module Zeebe::Client::GatewayProtocol
|
|
8
8
|
module Gateway
|
9
9
|
class Service
|
10
10
|
|
11
|
-
include GRPC::GenericService
|
11
|
+
include ::GRPC::GenericService
|
12
12
|
|
13
13
|
self.marshal_class_method = :encode
|
14
14
|
self.unmarshal_class_method = :decode
|
@@ -26,12 +26,12 @@ module Zeebe::Client::GatewayProtocol
|
|
26
26
|
# - maxJobsToActivate is less than 1
|
27
27
|
rpc :ActivateJobs, ::Zeebe::Client::GatewayProtocol::ActivateJobsRequest, stream(::Zeebe::Client::GatewayProtocol::ActivateJobsResponse)
|
28
28
|
#
|
29
|
-
# Cancels a running
|
29
|
+
# Cancels a running process instance
|
30
30
|
#
|
31
31
|
# Errors:
|
32
32
|
# NOT_FOUND:
|
33
|
-
# - no
|
34
|
-
rpc :
|
33
|
+
# - no process instance exists with the given key
|
34
|
+
rpc :CancelProcessInstance, ::Zeebe::Client::GatewayProtocol::CancelProcessInstanceRequest, ::Zeebe::Client::GatewayProtocol::CancelProcessInstanceResponse
|
35
35
|
#
|
36
36
|
# Completes a job with the given variables, which allows completing the associated service task.
|
37
37
|
#
|
@@ -45,41 +45,40 @@ module Zeebe::Client::GatewayProtocol
|
|
45
45
|
# the job can be activated again and completed.
|
46
46
|
rpc :CompleteJob, ::Zeebe::Client::GatewayProtocol::CompleteJobRequest, ::Zeebe::Client::GatewayProtocol::CompleteJobResponse
|
47
47
|
#
|
48
|
-
# Creates and starts an instance of the specified
|
48
|
+
# Creates and starts an instance of the specified process. The process definition to use to
|
49
49
|
# create the instance can be specified either using its unique key (as returned by
|
50
|
-
#
|
51
|
-
# latest deployed version. Note that only
|
50
|
+
# DeployProcess), or using the BPMN process ID and a version. Pass -1 as the version to use the
|
51
|
+
# latest deployed version. Note that only processes with none start events can be started through
|
52
52
|
# this command.
|
53
53
|
#
|
54
54
|
# Errors:
|
55
55
|
# NOT_FOUND:
|
56
|
-
# - no
|
57
|
-
# - no
|
58
|
-
# - no
|
56
|
+
# - no process with the given key exists (if processDefinitionKey was given)
|
57
|
+
# - no process with the given process ID exists (if bpmnProcessId was given but version was -1)
|
58
|
+
# - no process with the given process ID and version exists (if both bpmnProcessId and version were given)
|
59
59
|
#
|
60
60
|
# FAILED_PRECONDITION:
|
61
|
-
# - the
|
61
|
+
# - the process definition does not contain a none start event; only processes with none
|
62
62
|
# start event can be started manually.
|
63
63
|
#
|
64
64
|
# INVALID_ARGUMENT:
|
65
65
|
# - the given variables argument is not a valid JSON document; it is expected to be a valid
|
66
66
|
# JSON document where the root node is an object.
|
67
|
-
rpc :
|
67
|
+
rpc :CreateProcessInstance, ::Zeebe::Client::GatewayProtocol::CreateProcessInstanceRequest, ::Zeebe::Client::GatewayProtocol::CreateProcessInstanceResponse
|
68
68
|
#
|
69
|
-
# Behaves similarly to `rpc
|
70
|
-
rpc :
|
69
|
+
# Behaves similarly to `rpc CreateProcessInstance`, except that a successful response is received when the process completes successfully.
|
70
|
+
rpc :CreateProcessInstanceWithResult, ::Zeebe::Client::GatewayProtocol::CreateProcessInstanceWithResultRequest, ::Zeebe::Client::GatewayProtocol::CreateProcessInstanceWithResultResponse
|
71
71
|
#
|
72
|
-
# Deploys one or more
|
73
|
-
# i.e. either all
|
72
|
+
# Deploys one or more processes to Zeebe. Note that this is an atomic call,
|
73
|
+
# i.e. either all processes are deployed, or none of them are.
|
74
74
|
#
|
75
75
|
# Errors:
|
76
76
|
# INVALID_ARGUMENT:
|
77
77
|
# - no resources given.
|
78
78
|
# - if at least one resource is invalid. A resource is considered invalid if:
|
79
|
-
# - it is not a BPMN or YAML file (currently detected through the file extension)
|
80
79
|
# - the resource data is not deserializable (e.g. detected as BPMN, but it's broken XML)
|
81
|
-
# - the
|
82
|
-
rpc :
|
80
|
+
# - the process is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task)
|
81
|
+
rpc :DeployProcess, ::Zeebe::Client::GatewayProtocol::DeployProcessRequest, ::Zeebe::Client::GatewayProtocol::DeployProcessResponse
|
83
82
|
#
|
84
83
|
# Marks the job as failed; if the retries argument is positive, then the job will be immediately
|
85
84
|
# activatable again, and a worker could try again to process it. If it is zero or negative however,
|
@@ -95,7 +94,7 @@ module Zeebe::Client::GatewayProtocol
|
|
95
94
|
# - the job is already in a failed state, i.e. ran out of retries
|
96
95
|
rpc :FailJob, ::Zeebe::Client::GatewayProtocol::FailJobRequest, ::Zeebe::Client::GatewayProtocol::FailJobResponse
|
97
96
|
#
|
98
|
-
# Reports a business error (i.e. non-technical) that occurs while processing a job. The error is handled in the
|
97
|
+
# 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.
|
99
98
|
#
|
100
99
|
# Errors:
|
101
100
|
# NOT_FOUND:
|
@@ -122,7 +121,7 @@ module Zeebe::Client::GatewayProtocol
|
|
122
121
|
# - no incident with the given key exists
|
123
122
|
rpc :ResolveIncident, ::Zeebe::Client::GatewayProtocol::ResolveIncidentRequest, ::Zeebe::Client::GatewayProtocol::ResolveIncidentResponse
|
124
123
|
#
|
125
|
-
# Updates all the variables of a particular scope (e.g.
|
124
|
+
# Updates all the variables of a particular scope (e.g. process instance, flow element instance)
|
126
125
|
# from the given JSON document.
|
127
126
|
#
|
128
127
|
# Errors:
|
data/lib/zeebe/client/version.rb
CHANGED
data/proto/gateway.proto
CHANGED
@@ -2,11 +2,11 @@ syntax = 'proto3';
|
|
2
2
|
package gateway_protocol;
|
3
3
|
|
4
4
|
option java_multiple_files = false;
|
5
|
-
option java_package = "io.zeebe.gateway.protocol";
|
6
|
-
option go_package = "pb";
|
5
|
+
option java_package = "io.camunda.zeebe.gateway.protocol";
|
6
|
+
option go_package = "./;pb";
|
7
7
|
|
8
8
|
// For a more complete documentation, refer to Zeebe documentation at:
|
9
|
-
// https://docs.
|
9
|
+
// https://docs.camunda.io/docs/reference/grpc
|
10
10
|
|
11
11
|
message ActivateJobsRequest {
|
12
12
|
// the job type, as defined in the BPMN process (e.g. <zeebe:taskDefinition
|
@@ -38,18 +38,18 @@ message ActivatedJob {
|
|
38
38
|
int64 key = 1;
|
39
39
|
// the type of the job (should match what was requested)
|
40
40
|
string type = 2;
|
41
|
-
// the job's
|
42
|
-
int64
|
43
|
-
// the bpmn process ID of the job
|
41
|
+
// the job's process instance key
|
42
|
+
int64 processInstanceKey = 3;
|
43
|
+
// the bpmn process ID of the job process definition
|
44
44
|
string bpmnProcessId = 4;
|
45
|
-
// the version of the job
|
46
|
-
int32
|
47
|
-
// the key of the job
|
48
|
-
int64
|
45
|
+
// the version of the job process definition
|
46
|
+
int32 processDefinitionVersion = 5;
|
47
|
+
// the key of the job process definition
|
48
|
+
int64 processDefinitionKey = 6;
|
49
49
|
// the associated task element ID
|
50
50
|
string elementId = 7;
|
51
51
|
// the unique key identifying the associated task, unique within the scope of the
|
52
|
-
//
|
52
|
+
// process instance
|
53
53
|
int64 elementInstanceKey = 8;
|
54
54
|
// a set of custom headers defined during modelling; returned as a serialized
|
55
55
|
// JSON document
|
@@ -65,13 +65,13 @@ message ActivatedJob {
|
|
65
65
|
string variables = 13;
|
66
66
|
}
|
67
67
|
|
68
|
-
message
|
69
|
-
// the
|
70
|
-
//
|
71
|
-
int64
|
68
|
+
message CancelProcessInstanceRequest {
|
69
|
+
// the process instance key (as, for example, obtained from
|
70
|
+
// CreateProcessInstanceResponse)
|
71
|
+
int64 processInstanceKey = 1;
|
72
72
|
}
|
73
73
|
|
74
|
-
message
|
74
|
+
message CancelProcessInstanceResponse {
|
75
75
|
}
|
76
76
|
|
77
77
|
message CompleteJobRequest {
|
@@ -84,102 +84,91 @@ message CompleteJobRequest {
|
|
84
84
|
message CompleteJobResponse {
|
85
85
|
}
|
86
86
|
|
87
|
-
message
|
88
|
-
// the unique key identifying the
|
89
|
-
// in the
|
90
|
-
int64
|
91
|
-
// the BPMN process ID of the
|
87
|
+
message CreateProcessInstanceRequest {
|
88
|
+
// the unique key identifying the process definition (e.g. returned from a process
|
89
|
+
// in the DeployProcessResponse message)
|
90
|
+
int64 processDefinitionKey = 1;
|
91
|
+
// the BPMN process ID of the process definition
|
92
92
|
string bpmnProcessId = 2;
|
93
93
|
// the version of the process; set to -1 to use the latest version
|
94
94
|
int32 version = 3;
|
95
95
|
// JSON document that will instantiate the variables for the root variable scope of the
|
96
|
-
//
|
96
|
+
// process instance; it must be a JSON object, as variables will be mapped in a
|
97
97
|
// key-value fashion. e.g. { "a": 1, "b": 2 } will create two variables, named "a" and
|
98
98
|
// "b" respectively, with their associated values. [{ "a": 1, "b": 2 }] would not be a
|
99
99
|
// valid argument, as the root of the JSON document is an array and not an object.
|
100
100
|
string variables = 4;
|
101
101
|
}
|
102
102
|
|
103
|
-
message
|
104
|
-
// the key of the
|
105
|
-
int64
|
106
|
-
// the BPMN process ID of the
|
103
|
+
message CreateProcessInstanceResponse {
|
104
|
+
// the key of the process definition which was used to create the process instance
|
105
|
+
int64 processDefinitionKey = 1;
|
106
|
+
// the BPMN process ID of the process definition which was used to create the process
|
107
107
|
// instance
|
108
108
|
string bpmnProcessId = 2;
|
109
|
-
// the version of the
|
109
|
+
// the version of the process definition which was used to create the process instance
|
110
110
|
int32 version = 3;
|
111
|
-
// the unique identifier of the created
|
112
|
-
// needs a
|
113
|
-
int64
|
111
|
+
// the unique identifier of the created process instance; to be used wherever a request
|
112
|
+
// needs a process instance key (e.g. CancelProcessInstanceRequest)
|
113
|
+
int64 processInstanceKey = 4;
|
114
114
|
}
|
115
115
|
|
116
|
-
message
|
117
|
-
|
118
|
-
// timeout (in ms). the request will be closed if the
|
116
|
+
message CreateProcessInstanceWithResultRequest {
|
117
|
+
CreateProcessInstanceRequest request = 1;
|
118
|
+
// timeout (in ms). the request will be closed if the process is not completed
|
119
119
|
// before the requestTimeout.
|
120
120
|
// if requestTimeout = 0, uses the generic requestTimeout configured in the gateway.
|
121
121
|
int64 requestTimeout = 2;
|
122
|
-
// list of names of variables to be included in `
|
122
|
+
// list of names of variables to be included in `CreateProcessInstanceWithResultResponse.variables`
|
123
123
|
// if empty, all visible variables in the root scope will be returned.
|
124
124
|
repeated string fetchVariables = 3;
|
125
125
|
}
|
126
126
|
|
127
|
-
message
|
128
|
-
// the key of the
|
129
|
-
int64
|
130
|
-
// the BPMN process ID of the
|
127
|
+
message CreateProcessInstanceWithResultResponse {
|
128
|
+
// the key of the process definition which was used to create the process instance
|
129
|
+
int64 processDefinitionKey = 1;
|
130
|
+
// the BPMN process ID of the process definition which was used to create the process
|
131
131
|
// instance
|
132
132
|
string bpmnProcessId = 2;
|
133
|
-
// the version of the
|
133
|
+
// the version of the process definition which was used to create the process instance
|
134
134
|
int32 version = 3;
|
135
|
-
// the unique identifier of the created
|
136
|
-
// needs a
|
137
|
-
int64
|
135
|
+
// the unique identifier of the created process instance; to be used wherever a request
|
136
|
+
// needs a process instance key (e.g. CancelProcessInstanceRequest)
|
137
|
+
int64 processInstanceKey = 4;
|
138
138
|
// JSON document
|
139
139
|
// consists of visible variables in the root scope
|
140
140
|
string variables = 5;
|
141
141
|
|
142
142
|
}
|
143
143
|
|
144
|
-
message
|
145
|
-
// List of
|
146
|
-
repeated
|
144
|
+
message DeployProcessRequest {
|
145
|
+
// List of process resources to deploy
|
146
|
+
repeated ProcessRequestObject processes = 1;
|
147
147
|
}
|
148
148
|
|
149
|
-
message
|
150
|
-
enum ResourceType {
|
151
|
-
// FILE type means the gateway will try to detect the resource type
|
152
|
-
// using the file extension of the name field
|
153
|
-
FILE = 0;
|
154
|
-
BPMN = 1; // extension 'bpmn'
|
155
|
-
YAML = 2; // extension 'yaml'
|
156
|
-
}
|
157
|
-
|
149
|
+
message ProcessRequestObject {
|
158
150
|
// the resource basename, e.g. myProcess.bpmn
|
159
151
|
string name = 1;
|
160
|
-
// the resource type; if set to BPMN or YAML then the file extension
|
161
|
-
// is ignored
|
162
|
-
ResourceType type = 2;
|
163
152
|
// the process definition as a UTF8-encoded string
|
164
|
-
bytes definition =
|
153
|
+
bytes definition = 2;
|
165
154
|
}
|
166
155
|
|
167
|
-
message
|
156
|
+
message DeployProcessResponse {
|
168
157
|
// the unique key identifying the deployment
|
169
158
|
int64 key = 1;
|
170
|
-
// a list of deployed
|
171
|
-
repeated
|
159
|
+
// a list of deployed processes
|
160
|
+
repeated ProcessMetadata processes = 2;
|
172
161
|
}
|
173
162
|
|
174
|
-
message
|
163
|
+
message ProcessMetadata {
|
175
164
|
// the bpmn process ID, as parsed during deployment; together with the version forms a
|
176
|
-
// unique identifier for a specific
|
165
|
+
// unique identifier for a specific process definition
|
177
166
|
string bpmnProcessId = 1;
|
178
167
|
// the assigned process version
|
179
168
|
int32 version = 2;
|
180
|
-
// the assigned key, which acts as a unique identifier for this
|
181
|
-
int64
|
182
|
-
// the resource name (see:
|
169
|
+
// the assigned key, which acts as a unique identifier for this process
|
170
|
+
int64 processDefinitionKey = 3;
|
171
|
+
// the resource name (see: ProcessRequestObject.name) from which this process was
|
183
172
|
// parsed
|
184
173
|
string resourceName = 4;
|
185
174
|
}
|
@@ -272,12 +261,21 @@ message Partition {
|
|
272
261
|
enum PartitionBrokerRole {
|
273
262
|
LEADER = 0;
|
274
263
|
FOLLOWER = 1;
|
264
|
+
INACTIVE = 2;
|
265
|
+
}
|
266
|
+
|
267
|
+
// Describes the current health of the partition
|
268
|
+
enum PartitionBrokerHealth {
|
269
|
+
HEALTHY = 0;
|
270
|
+
UNHEALTHY = 1;
|
275
271
|
}
|
276
272
|
|
277
273
|
// the unique ID of this partition
|
278
274
|
int32 partitionId = 1;
|
279
275
|
// the role of the broker for this partition
|
280
276
|
PartitionBrokerRole role = 2;
|
277
|
+
// the health of this partition
|
278
|
+
PartitionBrokerHealth health = 3;
|
281
279
|
}
|
282
280
|
|
283
281
|
message UpdateJobRetriesRequest {
|
@@ -291,7 +289,7 @@ message UpdateJobRetriesResponse {
|
|
291
289
|
}
|
292
290
|
|
293
291
|
message SetVariablesRequest {
|
294
|
-
// the unique identifier of a particular element; can be the
|
292
|
+
// the unique identifier of a particular element; can be the process instance key (as
|
295
293
|
// obtained during instance creation), or a given element, such as a service task (see
|
296
294
|
// elementInstanceKey on the job message)
|
297
295
|
int64 elementInstanceKey = 1;
|
@@ -329,13 +327,13 @@ service Gateway {
|
|
329
327
|
}
|
330
328
|
|
331
329
|
/*
|
332
|
-
Cancels a running
|
330
|
+
Cancels a running process instance
|
333
331
|
|
334
332
|
Errors:
|
335
333
|
NOT_FOUND:
|
336
|
-
- no
|
334
|
+
- no process instance exists with the given key
|
337
335
|
*/
|
338
|
-
rpc
|
336
|
+
rpc CancelProcessInstance (CancelProcessInstanceRequest) returns (CancelProcessInstanceResponse) {
|
339
337
|
}
|
340
338
|
|
341
339
|
/*
|
@@ -354,48 +352,47 @@ service Gateway {
|
|
354
352
|
}
|
355
353
|
|
356
354
|
/*
|
357
|
-
Creates and starts an instance of the specified
|
355
|
+
Creates and starts an instance of the specified process. The process definition to use to
|
358
356
|
create the instance can be specified either using its unique key (as returned by
|
359
|
-
|
360
|
-
latest deployed version. Note that only
|
357
|
+
DeployProcess), or using the BPMN process ID and a version. Pass -1 as the version to use the
|
358
|
+
latest deployed version. Note that only processes with none start events can be started through
|
361
359
|
this command.
|
362
360
|
|
363
361
|
Errors:
|
364
362
|
NOT_FOUND:
|
365
|
-
- no
|
366
|
-
- no
|
367
|
-
- no
|
363
|
+
- no process with the given key exists (if processDefinitionKey was given)
|
364
|
+
- no process with the given process ID exists (if bpmnProcessId was given but version was -1)
|
365
|
+
- no process with the given process ID and version exists (if both bpmnProcessId and version were given)
|
368
366
|
|
369
367
|
FAILED_PRECONDITION:
|
370
|
-
- the
|
368
|
+
- the process definition does not contain a none start event; only processes with none
|
371
369
|
start event can be started manually.
|
372
370
|
|
373
371
|
INVALID_ARGUMENT:
|
374
372
|
- the given variables argument is not a valid JSON document; it is expected to be a valid
|
375
373
|
JSON document where the root node is an object.
|
376
374
|
*/
|
377
|
-
rpc
|
375
|
+
rpc CreateProcessInstance (CreateProcessInstanceRequest) returns (CreateProcessInstanceResponse) {
|
378
376
|
}
|
379
377
|
|
380
378
|
/*
|
381
|
-
Behaves similarly to `rpc
|
379
|
+
Behaves similarly to `rpc CreateProcessInstance`, except that a successful response is received when the process completes successfully.
|
382
380
|
*/
|
383
|
-
rpc
|
381
|
+
rpc CreateProcessInstanceWithResult (CreateProcessInstanceWithResultRequest) returns (CreateProcessInstanceWithResultResponse) {
|
384
382
|
}
|
385
383
|
|
386
384
|
/*
|
387
|
-
Deploys one or more
|
388
|
-
i.e. either all
|
385
|
+
Deploys one or more processes to Zeebe. Note that this is an atomic call,
|
386
|
+
i.e. either all processes are deployed, or none of them are.
|
389
387
|
|
390
388
|
Errors:
|
391
389
|
INVALID_ARGUMENT:
|
392
390
|
- no resources given.
|
393
391
|
- if at least one resource is invalid. A resource is considered invalid if:
|
394
|
-
- it is not a BPMN or YAML file (currently detected through the file extension)
|
395
392
|
- the resource data is not deserializable (e.g. detected as BPMN, but it's broken XML)
|
396
|
-
- the
|
393
|
+
- the process is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task)
|
397
394
|
*/
|
398
|
-
rpc
|
395
|
+
rpc DeployProcess (DeployProcessRequest) returns (DeployProcessResponse) {
|
399
396
|
}
|
400
397
|
|
401
398
|
/*
|
@@ -416,7 +413,7 @@ service Gateway {
|
|
416
413
|
}
|
417
414
|
|
418
415
|
/*
|
419
|
-
Reports a business error (i.e. non-technical) that occurs while processing a job. The error is handled in the
|
416
|
+
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.
|
420
417
|
|
421
418
|
Errors:
|
422
419
|
NOT_FOUND:
|
@@ -452,7 +449,7 @@ service Gateway {
|
|
452
449
|
}
|
453
450
|
|
454
451
|
/*
|
455
|
-
Updates all the variables of a particular scope (e.g.
|
452
|
+
Updates all the variables of a particular scope (e.g. process instance, flow element instance)
|
456
453
|
from the given JSON document.
|
457
454
|
|
458
455
|
Errors:
|
data/zeebe-client.gemspec
CHANGED
@@ -17,15 +17,17 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
18
18
|
s.require_paths = ['lib']
|
19
19
|
|
20
|
-
s.required_ruby_version = '>= 2.
|
20
|
+
s.required_ruby_version = '>= 2.5'
|
21
21
|
|
22
22
|
s.add_runtime_dependency 'grpc', '~> 1.32'
|
23
23
|
|
24
24
|
s.add_development_dependency 'bundler'
|
25
|
-
s.add_development_dependency 'bundler-audit', '~> 0.
|
25
|
+
s.add_development_dependency 'bundler-audit', '~> 0.8.0'
|
26
26
|
s.add_development_dependency 'grpc-tools', '~> 1.32'
|
27
27
|
s.add_development_dependency 'rake'
|
28
28
|
s.add_development_dependency 'rspec'
|
29
|
-
s.add_development_dependency 'rubocop', '~>
|
29
|
+
s.add_development_dependency 'rubocop', '~> 1.16.0'
|
30
|
+
s.add_development_dependency 'rubocop-rake'
|
31
|
+
s.add_development_dependency 'rubocop-rspec'
|
30
32
|
s.add_development_dependency 'solargraph'
|
31
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zeebe-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.1
|
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: 2021-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.8.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.8.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: grpc-tools
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,42 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 1.16.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 1.16.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop-rake
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop-rspec
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
111
139
|
- !ruby/object:Gem::Dependency
|
112
140
|
name: solargraph
|
113
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -162,14 +190,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
162
190
|
requirements:
|
163
191
|
- - ">="
|
164
192
|
- !ruby/object:Gem::Version
|
165
|
-
version: '2.
|
193
|
+
version: '2.5'
|
166
194
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
195
|
requirements:
|
168
196
|
- - ">="
|
169
197
|
- !ruby/object:Gem::Version
|
170
198
|
version: '0'
|
171
199
|
requirements: []
|
172
|
-
rubygems_version: 3.
|
200
|
+
rubygems_version: 3.2.3
|
173
201
|
signing_key:
|
174
202
|
specification_version: 4
|
175
203
|
summary: Zeebe Client
|