zeebe-client 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/lib/zeebe/client/proto/gateway_pb.rb +119 -118
- data/lib/zeebe/client/proto/gateway_services_pb.rb +132 -9
- data/lib/zeebe/client/version.rb +1 -1
- data/proto/gateway.proto +370 -125
- data/zeebe-client.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4ff45546615505deac91e48ec781bf2e2d6d1ce14805aa2c741687effc38560
|
4
|
+
data.tar.gz: 2d06b409be95371bf28fe16bc620b5de9ffe85adc731d4169bd3bdc74bd9c432
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e70ec2dd314f99110ea372df8c5418379c793f7fb02fdb3ab30bd233b84c05fe58bbf8a295d120715258c1044fb83bac282ac13e5ba29b44a53c3b267dc303b
|
7
|
+
data.tar.gz: 89318c917001d3b54a32b246d391dd23700ed68985837f2c118fe7cd1525cc1e4c74d219e2f7045b15e32829c0b953e5a1abe0c3f82caac3339541faef938839
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -13,7 +13,7 @@ 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.
|
16
|
+
sh 'docker run -d --name zeebe --rm -p 26500:26500 camunda/zeebe:0.15.0'
|
17
17
|
sleep(5)
|
18
18
|
end
|
19
19
|
|
@@ -4,72 +4,38 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
add_message "gateway_protocol.
|
8
|
-
|
9
|
-
|
10
|
-
optional :
|
11
|
-
optional :
|
12
|
-
|
13
|
-
add_enum "gateway_protocol.Partition.PartitionBrokerRole" do
|
14
|
-
value :LEADER, 0
|
15
|
-
value :FOLLOWER, 1
|
16
|
-
end
|
17
|
-
add_message "gateway_protocol.BrokerInfo" do
|
18
|
-
optional :nodeId, :int32, 1
|
19
|
-
optional :host, :string, 2
|
20
|
-
optional :port, :int32, 3
|
21
|
-
repeated :partitions, :message, 4, "gateway_protocol.Partition"
|
22
|
-
end
|
23
|
-
add_message "gateway_protocol.TopologyResponse" do
|
24
|
-
repeated :brokers, :message, 1, "gateway_protocol.BrokerInfo"
|
25
|
-
optional :clusterSize, :int32, 2
|
26
|
-
optional :partitionsCount, :int32, 3
|
27
|
-
optional :replicationFactor, :int32, 4
|
28
|
-
end
|
29
|
-
add_message "gateway_protocol.WorkflowRequestObject" do
|
30
|
-
optional :name, :string, 1
|
31
|
-
optional :type, :enum, 2, "gateway_protocol.WorkflowRequestObject.ResourceType"
|
32
|
-
optional :definition, :bytes, 3
|
33
|
-
end
|
34
|
-
add_enum "gateway_protocol.WorkflowRequestObject.ResourceType" do
|
35
|
-
value :FILE, 0
|
36
|
-
value :BPMN, 1
|
37
|
-
value :YAML, 2
|
38
|
-
end
|
39
|
-
add_message "gateway_protocol.DeployWorkflowRequest" do
|
40
|
-
repeated :workflows, :message, 1, "gateway_protocol.WorkflowRequestObject"
|
7
|
+
add_message "gateway_protocol.ActivateJobsRequest" do
|
8
|
+
optional :type, :string, 1
|
9
|
+
optional :worker, :string, 2
|
10
|
+
optional :timeout, :int64, 3
|
11
|
+
optional :amount, :int32, 4
|
12
|
+
repeated :fetchVariable, :string, 5
|
41
13
|
end
|
42
|
-
add_message "gateway_protocol.
|
43
|
-
|
44
|
-
optional :version, :int32, 2
|
45
|
-
optional :workflowKey, :int64, 3
|
46
|
-
optional :resourceName, :string, 4
|
14
|
+
add_message "gateway_protocol.ActivateJobsResponse" do
|
15
|
+
repeated :jobs, :message, 1, "gateway_protocol.ActivatedJob"
|
47
16
|
end
|
48
|
-
add_message "gateway_protocol.
|
17
|
+
add_message "gateway_protocol.ActivatedJob" do
|
49
18
|
optional :key, :int64, 1
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
optional :
|
54
|
-
optional :
|
55
|
-
optional :
|
56
|
-
optional :
|
57
|
-
optional :payload, :string, 5
|
58
|
-
end
|
59
|
-
add_message "gateway_protocol.PublishMessageResponse" do
|
60
|
-
end
|
61
|
-
add_message "gateway_protocol.UpdateJobRetriesRequest" do
|
62
|
-
optional :jobKey, :int64, 1
|
63
|
-
optional :retries, :int32, 2
|
19
|
+
optional :type, :string, 2
|
20
|
+
optional :jobHeaders, :message, 3, "gateway_protocol.JobHeaders"
|
21
|
+
optional :customHeaders, :string, 4
|
22
|
+
optional :worker, :string, 5
|
23
|
+
optional :retries, :int32, 6
|
24
|
+
optional :deadline, :int64, 7
|
25
|
+
optional :payload, :string, 8
|
64
26
|
end
|
65
|
-
add_message "gateway_protocol.
|
27
|
+
add_message "gateway_protocol.JobHeaders" do
|
28
|
+
optional :workflowInstanceKey, :int64, 1
|
29
|
+
optional :bpmnProcessId, :string, 2
|
30
|
+
optional :workflowDefinitionVersion, :int32, 3
|
31
|
+
optional :workflowKey, :int64, 4
|
32
|
+
optional :elementId, :string, 5
|
33
|
+
optional :elementInstanceKey, :int64, 6
|
66
34
|
end
|
67
|
-
add_message "gateway_protocol.
|
68
|
-
optional :
|
69
|
-
optional :retries, :int32, 2
|
70
|
-
optional :errorMessage, :string, 3
|
35
|
+
add_message "gateway_protocol.CancelWorkflowInstanceRequest" do
|
36
|
+
optional :workflowInstanceKey, :int64, 1
|
71
37
|
end
|
72
|
-
add_message "gateway_protocol.
|
38
|
+
add_message "gateway_protocol.CancelWorkflowInstanceResponse" do
|
73
39
|
end
|
74
40
|
add_message "gateway_protocol.CompleteJobRequest" do
|
75
41
|
optional :jobKey, :int64, 1
|
@@ -89,22 +55,35 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
89
55
|
optional :version, :int32, 3
|
90
56
|
optional :workflowInstanceKey, :int64, 5
|
91
57
|
end
|
92
|
-
add_message "gateway_protocol.
|
93
|
-
|
58
|
+
add_message "gateway_protocol.DeployWorkflowRequest" do
|
59
|
+
repeated :workflows, :message, 1, "gateway_protocol.WorkflowRequestObject"
|
94
60
|
end
|
95
|
-
add_message "gateway_protocol.
|
61
|
+
add_message "gateway_protocol.WorkflowRequestObject" do
|
62
|
+
optional :name, :string, 1
|
63
|
+
optional :type, :enum, 2, "gateway_protocol.WorkflowRequestObject.ResourceType"
|
64
|
+
optional :definition, :bytes, 3
|
96
65
|
end
|
97
|
-
|
98
|
-
|
99
|
-
|
66
|
+
add_enum "gateway_protocol.WorkflowRequestObject.ResourceType" do
|
67
|
+
value :FILE, 0
|
68
|
+
value :BPMN, 1
|
69
|
+
value :YAML, 2
|
100
70
|
end
|
101
|
-
add_message "gateway_protocol.
|
71
|
+
add_message "gateway_protocol.DeployWorkflowResponse" do
|
72
|
+
optional :key, :int64, 1
|
73
|
+
repeated :workflows, :message, 2, "gateway_protocol.WorkflowMetadata"
|
102
74
|
end
|
103
|
-
add_message "gateway_protocol.
|
75
|
+
add_message "gateway_protocol.WorkflowMetadata" do
|
104
76
|
optional :bpmnProcessId, :string, 1
|
77
|
+
optional :version, :int32, 2
|
78
|
+
optional :workflowKey, :int64, 3
|
79
|
+
optional :resourceName, :string, 4
|
105
80
|
end
|
106
|
-
add_message "gateway_protocol.
|
107
|
-
|
81
|
+
add_message "gateway_protocol.FailJobRequest" do
|
82
|
+
optional :jobKey, :int64, 1
|
83
|
+
optional :retries, :int32, 2
|
84
|
+
optional :errorMessage, :string, 3
|
85
|
+
end
|
86
|
+
add_message "gateway_protocol.FailJobResponse" do
|
108
87
|
end
|
109
88
|
add_message "gateway_protocol.GetWorkflowRequest" do
|
110
89
|
optional :workflowKey, :int64, 1
|
@@ -118,73 +97,95 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
118
97
|
optional :resourceName, :string, 4
|
119
98
|
optional :bpmnXml, :string, 5
|
120
99
|
end
|
121
|
-
add_message "gateway_protocol.
|
122
|
-
optional :
|
123
|
-
optional :worker, :string, 2
|
124
|
-
optional :timeout, :int64, 3
|
125
|
-
optional :amount, :int32, 4
|
100
|
+
add_message "gateway_protocol.ListWorkflowsRequest" do
|
101
|
+
optional :bpmnProcessId, :string, 1
|
126
102
|
end
|
127
|
-
add_message "gateway_protocol.
|
128
|
-
|
129
|
-
optional :bpmnProcessId, :string, 2
|
130
|
-
optional :workflowDefinitionVersion, :int32, 3
|
131
|
-
optional :workflowKey, :int64, 4
|
132
|
-
optional :elementId, :string, 5
|
133
|
-
optional :elementInstanceKey, :int64, 6
|
103
|
+
add_message "gateway_protocol.ListWorkflowsResponse" do
|
104
|
+
repeated :workflows, :message, 1, "gateway_protocol.WorkflowMetadata"
|
134
105
|
end
|
135
|
-
add_message "gateway_protocol.
|
136
|
-
optional :
|
137
|
-
optional :
|
138
|
-
optional :
|
139
|
-
optional :
|
140
|
-
optional :
|
141
|
-
optional :retries, :int32, 6
|
142
|
-
optional :deadline, :int64, 7
|
143
|
-
optional :payload, :string, 8
|
106
|
+
add_message "gateway_protocol.PublishMessageRequest" do
|
107
|
+
optional :name, :string, 1
|
108
|
+
optional :correlationKey, :string, 2
|
109
|
+
optional :timeToLive, :int64, 3
|
110
|
+
optional :messageId, :string, 4
|
111
|
+
optional :payload, :string, 5
|
144
112
|
end
|
145
|
-
add_message "gateway_protocol.
|
146
|
-
repeated :jobs, :message, 1, "gateway_protocol.ActivatedJob"
|
113
|
+
add_message "gateway_protocol.PublishMessageResponse" do
|
147
114
|
end
|
148
115
|
add_message "gateway_protocol.ResolveIncidentRequest" do
|
149
116
|
optional :incidentKey, :int64, 1
|
150
117
|
end
|
151
118
|
add_message "gateway_protocol.ResolveIncidentResponse" do
|
152
119
|
end
|
120
|
+
add_message "gateway_protocol.TopologyRequest" do
|
121
|
+
end
|
122
|
+
add_message "gateway_protocol.TopologyResponse" do
|
123
|
+
repeated :brokers, :message, 1, "gateway_protocol.BrokerInfo"
|
124
|
+
optional :clusterSize, :int32, 2
|
125
|
+
optional :partitionsCount, :int32, 3
|
126
|
+
optional :replicationFactor, :int32, 4
|
127
|
+
end
|
128
|
+
add_message "gateway_protocol.BrokerInfo" do
|
129
|
+
optional :nodeId, :int32, 1
|
130
|
+
optional :host, :string, 2
|
131
|
+
optional :port, :int32, 3
|
132
|
+
repeated :partitions, :message, 4, "gateway_protocol.Partition"
|
133
|
+
end
|
134
|
+
add_message "gateway_protocol.Partition" do
|
135
|
+
optional :partitionId, :int32, 1
|
136
|
+
optional :role, :enum, 3, "gateway_protocol.Partition.PartitionBrokerRole"
|
137
|
+
end
|
138
|
+
add_enum "gateway_protocol.Partition.PartitionBrokerRole" do
|
139
|
+
value :LEADER, 0
|
140
|
+
value :FOLLOWER, 1
|
141
|
+
end
|
142
|
+
add_message "gateway_protocol.UpdateJobRetriesRequest" do
|
143
|
+
optional :jobKey, :int64, 1
|
144
|
+
optional :retries, :int32, 2
|
145
|
+
end
|
146
|
+
add_message "gateway_protocol.UpdateJobRetriesResponse" do
|
147
|
+
end
|
148
|
+
add_message "gateway_protocol.UpdateWorkflowInstancePayloadRequest" do
|
149
|
+
optional :elementInstanceKey, :int64, 1
|
150
|
+
optional :payload, :string, 2
|
151
|
+
end
|
152
|
+
add_message "gateway_protocol.UpdateWorkflowInstancePayloadResponse" do
|
153
|
+
end
|
153
154
|
end
|
154
155
|
|
155
156
|
module Zeebe::Client::GatewayProtocol
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
157
|
+
ActivateJobsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ActivateJobsRequest").msgclass
|
158
|
+
ActivateJobsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ActivateJobsResponse").msgclass
|
159
|
+
ActivatedJob = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ActivatedJob").msgclass
|
160
|
+
JobHeaders = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.JobHeaders").msgclass
|
161
|
+
CancelWorkflowInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CancelWorkflowInstanceRequest").msgclass
|
162
|
+
CancelWorkflowInstanceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CancelWorkflowInstanceResponse").msgclass
|
163
|
+
CompleteJobRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CompleteJobRequest").msgclass
|
164
|
+
CompleteJobResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CompleteJobResponse").msgclass
|
165
|
+
CreateWorkflowInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CreateWorkflowInstanceRequest").msgclass
|
166
|
+
CreateWorkflowInstanceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CreateWorkflowInstanceResponse").msgclass
|
167
|
+
DeployWorkflowRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.DeployWorkflowRequest").msgclass
|
161
168
|
WorkflowRequestObject = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.WorkflowRequestObject").msgclass
|
162
169
|
WorkflowRequestObject::ResourceType = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.WorkflowRequestObject.ResourceType").enummodule
|
163
|
-
DeployWorkflowRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.DeployWorkflowRequest").msgclass
|
164
|
-
WorkflowMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.WorkflowMetadata").msgclass
|
165
170
|
DeployWorkflowResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.DeployWorkflowResponse").msgclass
|
166
|
-
|
167
|
-
PublishMessageResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.PublishMessageResponse").msgclass
|
168
|
-
UpdateJobRetriesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateJobRetriesRequest").msgclass
|
169
|
-
UpdateJobRetriesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateJobRetriesResponse").msgclass
|
171
|
+
WorkflowMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.WorkflowMetadata").msgclass
|
170
172
|
FailJobRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.FailJobRequest").msgclass
|
171
173
|
FailJobResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.FailJobResponse").msgclass
|
172
|
-
CompleteJobRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CompleteJobRequest").msgclass
|
173
|
-
CompleteJobResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CompleteJobResponse").msgclass
|
174
|
-
CreateWorkflowInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CreateWorkflowInstanceRequest").msgclass
|
175
|
-
CreateWorkflowInstanceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CreateWorkflowInstanceResponse").msgclass
|
176
|
-
CancelWorkflowInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CancelWorkflowInstanceRequest").msgclass
|
177
|
-
CancelWorkflowInstanceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.CancelWorkflowInstanceResponse").msgclass
|
178
|
-
UpdateWorkflowInstancePayloadRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateWorkflowInstancePayloadRequest").msgclass
|
179
|
-
UpdateWorkflowInstancePayloadResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateWorkflowInstancePayloadResponse").msgclass
|
180
|
-
ListWorkflowsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ListWorkflowsRequest").msgclass
|
181
|
-
ListWorkflowsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ListWorkflowsResponse").msgclass
|
182
174
|
GetWorkflowRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.GetWorkflowRequest").msgclass
|
183
175
|
GetWorkflowResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.GetWorkflowResponse").msgclass
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
176
|
+
ListWorkflowsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ListWorkflowsRequest").msgclass
|
177
|
+
ListWorkflowsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ListWorkflowsResponse").msgclass
|
178
|
+
PublishMessageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.PublishMessageRequest").msgclass
|
179
|
+
PublishMessageResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.PublishMessageResponse").msgclass
|
188
180
|
ResolveIncidentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ResolveIncidentRequest").msgclass
|
189
181
|
ResolveIncidentResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ResolveIncidentResponse").msgclass
|
182
|
+
TopologyRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.TopologyRequest").msgclass
|
183
|
+
TopologyResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.TopologyResponse").msgclass
|
184
|
+
BrokerInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.BrokerInfo").msgclass
|
185
|
+
Partition = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.Partition").msgclass
|
186
|
+
Partition::PartitionBrokerRole = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.Partition.PartitionBrokerRole").enummodule
|
187
|
+
UpdateJobRetriesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateJobRetriesRequest").msgclass
|
188
|
+
UpdateJobRetriesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateJobRetriesResponse").msgclass
|
189
|
+
UpdateWorkflowInstancePayloadRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateWorkflowInstancePayloadRequest").msgclass
|
190
|
+
UpdateWorkflowInstancePayloadResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateWorkflowInstancePayloadResponse").msgclass
|
190
191
|
end
|
@@ -14,19 +14,142 @@ module Zeebe::Client::GatewayProtocol
|
|
14
14
|
self.unmarshal_class_method = :decode
|
15
15
|
self.service_name = 'gateway_protocol.Gateway'
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
#
|
18
|
+
# Iterates through all known partitions in a round-robin and activates up to the requested amount
|
19
|
+
# of jobs and streams them back to the client as they are activated.
|
20
|
+
#
|
21
|
+
# Errors:
|
22
|
+
# INVALID_ARGUMENT:
|
23
|
+
# - type is blank (empty string, null)
|
24
|
+
# - worker is blank (empty string, null)
|
25
|
+
# - timeout less than 1
|
26
|
+
# - amount is less than 1
|
27
|
+
rpc :ActivateJobs, ActivateJobsRequest, stream(ActivateJobsResponse)
|
28
|
+
#
|
29
|
+
# Cancels a running workflow instance
|
30
|
+
#
|
31
|
+
# Errors:
|
32
|
+
# NOT_FOUND:
|
33
|
+
# - no workflow instance exists with the given key
|
34
|
+
rpc :CancelWorkflowInstance, CancelWorkflowInstanceRequest, CancelWorkflowInstanceResponse
|
35
|
+
#
|
36
|
+
# Completes a job with the given payload, which allows completing the associated service task.
|
37
|
+
#
|
38
|
+
# Errors:
|
39
|
+
# NOT_FOUND:
|
40
|
+
# - no job exists with the given job key. Note that since jobs are removed once completed,
|
41
|
+
# it could be that this job did exist at some point.
|
42
|
+
#
|
43
|
+
# FAILED_PRECONDITION:
|
44
|
+
# - the job was marked as failed. In that case, the related incident must be resolved before
|
45
|
+
# the job can be activated again and completed.
|
22
46
|
rpc :CompleteJob, CompleteJobRequest, CompleteJobResponse
|
47
|
+
#
|
48
|
+
# Creates and starts an instance of the specified workflow. The workflow definition to use to
|
49
|
+
# create the instance can be specified either using its unique key (as returned by
|
50
|
+
# DeployWorkflow), or using the BPMN process ID and a version. Pass -1 as the version to use the
|
51
|
+
# latest deployed version. Note that only workflows with none start events can be started through
|
52
|
+
# this command.
|
53
|
+
#
|
54
|
+
# Errors:
|
55
|
+
# NOT_FOUND:
|
56
|
+
# - no workflow with the given key exists (if workflowKey was given)
|
57
|
+
# - no workflow with the given process ID exists (if bpmnProcessId was given but version was -1)
|
58
|
+
# - no workflow with the given process ID and version exists (if both bpmnProcessId and version were given)
|
59
|
+
#
|
60
|
+
# FAILED_PRECONDITION:
|
61
|
+
# - the workflow definition does not contain a none start event; only workflows with none
|
62
|
+
# start event can be started manually.
|
63
|
+
#
|
64
|
+
# INVALID_ARGUMENT:
|
65
|
+
# - the given payload is not a valid JSON document; all payloads are expected to be
|
66
|
+
# valid JSON documents where the root node is an object.
|
23
67
|
rpc :CreateWorkflowInstance, CreateWorkflowInstanceRequest, CreateWorkflowInstanceResponse
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
68
|
+
#
|
69
|
+
# Deploys one or more workflows to Zeebe. Note that this is an atomic call,
|
70
|
+
# i.e. either all workflows are deployed, or none of them are.
|
71
|
+
#
|
72
|
+
# Errors:
|
73
|
+
# INVALID_ARGUMENT:
|
74
|
+
# - no resources given.
|
75
|
+
# - if at least one resource is invalid. A resource is considered invalid if:
|
76
|
+
# - it is not a BPMN or YAML file (currently detected through the file extension)
|
77
|
+
# - the resource data is not deserializable (e.g. detected as BPMN, but it's broken XML)
|
78
|
+
# - the workflow is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task)
|
79
|
+
rpc :DeployWorkflow, DeployWorkflowRequest, DeployWorkflowResponse
|
80
|
+
#
|
81
|
+
# Marks the job as failed; if the retries argument is positive, then the job will be immediately
|
82
|
+
# activatable again, and a worker could try again to process it. If it is zero or negative however,
|
83
|
+
# an incident will be raised, tagged with the given errorMessage, and the job will not be
|
84
|
+
# activatable until the incident is resolved.
|
85
|
+
#
|
86
|
+
# Errors:
|
87
|
+
# NOT_FOUND:
|
88
|
+
# - no job was found with the given key
|
89
|
+
#
|
90
|
+
# FAILED_PRECONDITION:
|
91
|
+
# - the job was not activated
|
92
|
+
# - the job is already in a failed state, i.e. ran out of retries
|
93
|
+
rpc :FailJob, FailJobRequest, FailJobResponse
|
94
|
+
#
|
95
|
+
# Fetches the workflow definition either by workflow key, or BPMN process ID and version.
|
96
|
+
# At least one of workflowKey or bpmnProcessId must be specified.
|
97
|
+
#
|
98
|
+
# Errors:
|
99
|
+
# NOT_FOUND:
|
100
|
+
# - no workflow with the given key exists (if workflowKey was given)
|
101
|
+
# - no workflow with the given process ID exists (if bpmnProcessId was given but version was -1)
|
102
|
+
# - no workflow with the given process ID and version exists (if both bpmnProcessId and version were given)
|
28
103
|
rpc :GetWorkflow, GetWorkflowRequest, GetWorkflowResponse
|
104
|
+
#
|
105
|
+
# Lists all workflows matching the request criteria currently deployed in the cluster.
|
106
|
+
#
|
107
|
+
# Errors:
|
108
|
+
# NOT_FOUND:
|
109
|
+
# - no workflows have been deployed yet (if no bpmnProcessId was given)
|
110
|
+
# - no workflow with the given process ID exists (if bpmnProcessId was given)
|
111
|
+
rpc :ListWorkflows, ListWorkflowsRequest, ListWorkflowsResponse
|
112
|
+
#
|
113
|
+
# Publishes a single message. Messages are published to specific partitions computed from their
|
114
|
+
# correlation keys.
|
115
|
+
#
|
116
|
+
# Errors:
|
117
|
+
# ALREADY_EXISTS:
|
118
|
+
# - a message with the same ID was previously published (and is still alive)
|
119
|
+
rpc :PublishMessage, PublishMessageRequest, PublishMessageResponse
|
120
|
+
#
|
121
|
+
# Resolves a given incident. This simply marks the incident as resolved; most likely a call to
|
122
|
+
# UpdateJobRetries or UpdateWorkflowInstancePayload will be necessary to actually resolve the
|
123
|
+
# problem, following by this call.
|
124
|
+
#
|
125
|
+
# Errors:
|
126
|
+
# NOT_FOUND:
|
127
|
+
# - no incident with the given key exists
|
29
128
|
rpc :ResolveIncident, ResolveIncidentRequest, ResolveIncidentResponse
|
129
|
+
#
|
130
|
+
# Obtains the current topology of the cluster the gateway is part of.
|
131
|
+
rpc :Topology, TopologyRequest, TopologyResponse
|
132
|
+
#
|
133
|
+
# Updates the number of retries a job has left. This is mostly useful for jobs that have run out of
|
134
|
+
# retries, should the underlying problem be solved.
|
135
|
+
#
|
136
|
+
# Errors:
|
137
|
+
# NOT_FOUND:
|
138
|
+
# - no job exists with the given key
|
139
|
+
#
|
140
|
+
# INVALID_ARGUMENT:
|
141
|
+
# - retries is not greater than 0
|
142
|
+
rpc :UpdateJobRetries, UpdateJobRetriesRequest, UpdateJobRetriesResponse
|
143
|
+
#
|
144
|
+
# Updates all the variables in the workflow instance scope from the given JSON document.
|
145
|
+
#
|
146
|
+
# Errors:
|
147
|
+
# NOT_FOUND:
|
148
|
+
# - no element with the given elementInstanceKey exists
|
149
|
+
# INVALID_ARGUMENT:
|
150
|
+
# - the given payload is not a valid JSON document; all payloads are expected to be
|
151
|
+
# valid JSON documents where the root node is an object.
|
152
|
+
rpc :UpdateWorkflowInstancePayload, UpdateWorkflowInstancePayloadRequest, UpdateWorkflowInstancePayloadResponse
|
30
153
|
end
|
31
154
|
|
32
155
|
Stub = Service.rpc_stub_class
|
data/lib/zeebe/client/version.rb
CHANGED
data/proto/gateway.proto
CHANGED
@@ -5,92 +5,80 @@ option java_multiple_files = false;
|
|
5
5
|
option java_package = "io.zeebe.gateway.protocol";
|
6
6
|
option go_package = "pb";
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
message Partition {
|
12
|
-
int32 partitionId = 1;
|
13
|
-
enum PartitionBrokerRole {
|
14
|
-
LEADER = 0;
|
15
|
-
FOLLOWER = 1;
|
16
|
-
}
|
17
|
-
PartitionBrokerRole role = 3;
|
18
|
-
}
|
19
|
-
|
20
|
-
message BrokerInfo {
|
21
|
-
int32 nodeId = 1;
|
22
|
-
string host = 2;
|
23
|
-
int32 port = 3;
|
24
|
-
repeated Partition partitions = 4;
|
25
|
-
}
|
26
|
-
|
27
|
-
message TopologyResponse {
|
28
|
-
repeated BrokerInfo brokers = 1;
|
29
|
-
int32 clusterSize = 2;
|
30
|
-
int32 partitionsCount = 3;
|
31
|
-
int32 replicationFactor = 4;
|
32
|
-
}
|
33
|
-
|
34
|
-
message WorkflowRequestObject {
|
35
|
-
string name = 1;
|
36
|
-
enum ResourceType {
|
37
|
-
// FILE type means the gateway will try to detect the resource type using the file extension of the name
|
38
|
-
FILE = 0;
|
39
|
-
BPMN = 1;
|
40
|
-
YAML = 2;
|
41
|
-
}
|
42
|
-
ResourceType type = 2;
|
43
|
-
bytes definition = 3;
|
44
|
-
}
|
8
|
+
// For a more complete documentation, refer to Zeebe documentation at:
|
9
|
+
// https://docs.zeebe.io/grpc/reference.html
|
45
10
|
|
46
|
-
message
|
47
|
-
|
11
|
+
message ActivateJobsRequest {
|
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 has been reached
|
19
|
+
int64 timeout = 3;
|
20
|
+
// the maximum number of jobs to fetch in a single call
|
21
|
+
int32 amount = 4;
|
22
|
+
// a list of variables to fetch as the job payload; if empty, all visible variables at
|
23
|
+
// the time of activation for the scope of the job will be returned as the job payload
|
24
|
+
repeated string fetchVariable = 5;
|
48
25
|
}
|
49
26
|
|
50
|
-
message
|
51
|
-
|
52
|
-
|
53
|
-
int64 workflowKey = 3;
|
54
|
-
string resourceName = 4;
|
27
|
+
message ActivateJobsResponse {
|
28
|
+
// list of activated jobs
|
29
|
+
repeated ActivatedJob jobs = 1;
|
55
30
|
}
|
56
31
|
|
57
|
-
message
|
32
|
+
message ActivatedJob {
|
33
|
+
// the key, a unique identifier for the job
|
58
34
|
int64 key = 1;
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
int64 jobKey = 1;
|
76
|
-
int32 retries = 2;
|
35
|
+
// the type of the job (should match what was requested)
|
36
|
+
string type = 2;
|
37
|
+
// a set of headers tying the job to a workflow instance/task instance
|
38
|
+
JobHeaders jobHeaders = 3;
|
39
|
+
// a set of custom headers defined during modelling; returned as a serialized
|
40
|
+
// JSON document
|
41
|
+
string customHeaders = 4;
|
42
|
+
// the name of the worker which activated this job
|
43
|
+
string worker = 5;
|
44
|
+
// the amount of retries left to this job (should always be positive)
|
45
|
+
int32 retries = 6;
|
46
|
+
// when the job can be activated again, sent as a UNIX epoch timestamp
|
47
|
+
int64 deadline = 7;
|
48
|
+
// JSON document, computed at activation time, consisting of all visible variables to
|
49
|
+
// the task scope
|
50
|
+
string payload = 8;
|
77
51
|
}
|
78
52
|
|
79
|
-
message
|
53
|
+
message JobHeaders {
|
54
|
+
// the job's workflow instance key
|
55
|
+
int64 workflowInstanceKey = 1;
|
56
|
+
// the bpmn process ID of the job workflow definition
|
57
|
+
string bpmnProcessId = 2;
|
58
|
+
// the version of the job workflow definition
|
59
|
+
int32 workflowDefinitionVersion = 3;
|
60
|
+
// the key of the job workflow definition
|
61
|
+
int64 workflowKey = 4;
|
62
|
+
// the associated task element ID
|
63
|
+
string elementId = 5;
|
64
|
+
// the unique key identifying the associated task, unique within the scope of the
|
65
|
+
// workflow instance
|
66
|
+
int64 elementInstanceKey = 6;
|
80
67
|
}
|
81
68
|
|
82
|
-
message
|
83
|
-
|
84
|
-
|
85
|
-
|
69
|
+
message CancelWorkflowInstanceRequest {
|
70
|
+
// the workflow instance key (as, for example, obtained from
|
71
|
+
// CreateWorkflowInstanceResponse)
|
72
|
+
int64 workflowInstanceKey = 1;
|
86
73
|
}
|
87
74
|
|
88
|
-
message
|
75
|
+
message CancelWorkflowInstanceResponse {
|
89
76
|
}
|
90
77
|
|
91
78
|
message CompleteJobRequest {
|
79
|
+
// the unique job identifier, as obtained from ActivateJobsResponse
|
92
80
|
int64 jobKey = 1;
|
93
|
-
|
81
|
+
// a JSON document representing the variables in the current task scope
|
94
82
|
string payload = 2;
|
95
83
|
}
|
96
84
|
|
@@ -98,128 +86,385 @@ message CompleteJobResponse {
|
|
98
86
|
}
|
99
87
|
|
100
88
|
message CreateWorkflowInstanceRequest {
|
89
|
+
// the unique key identifying the workflow definition (e.g. returned from a workflow
|
90
|
+
// in the DeployWorkflowResponse message)
|
101
91
|
int64 workflowKey = 1;
|
92
|
+
// the BPMN process ID of the workflow definition
|
102
93
|
string bpmnProcessId = 2;
|
103
|
-
|
94
|
+
// the version of the process; set to -1 to use the latest version
|
104
95
|
int32 version = 3;
|
105
|
-
|
96
|
+
// JSON document that will instantiate the variables for the root variable scope of the
|
97
|
+
// workflow instance; it must be a JSON object, as variables will be mapped in a
|
98
|
+
// key-value fashion. e.g. { "a": 1, "b": 2 } will create two variables, named "a" and
|
99
|
+
// "b" respectively, with their associated values. [{ "a": 1, "b": 2 }] would not be a
|
100
|
+
// valid payload, as the root of the JSON document is an array and not an object.
|
106
101
|
string payload = 4;
|
107
102
|
}
|
108
103
|
|
109
104
|
message CreateWorkflowInstanceResponse {
|
105
|
+
// the key of the workflow definition which was used to create the workflow instance
|
110
106
|
int64 workflowKey = 1;
|
107
|
+
// the BPMN process ID of the workflow definition which was used to create the workflow
|
108
|
+
// instance
|
111
109
|
string bpmnProcessId = 2;
|
110
|
+
// the version of the workflow definition which was used to create the workflow instance
|
112
111
|
int32 version = 3;
|
112
|
+
// the unique identifier of the created workflow instance; to be used wherever a request
|
113
|
+
// needs a workflow instance key (e.g. CancelWorkflowInstanceRequest)
|
113
114
|
int64 workflowInstanceKey = 5;
|
114
115
|
}
|
115
116
|
|
116
|
-
message
|
117
|
-
|
117
|
+
message DeployWorkflowRequest {
|
118
|
+
// List of workflow resources to deploy
|
119
|
+
repeated WorkflowRequestObject workflows = 1;
|
118
120
|
}
|
119
121
|
|
120
|
-
message
|
121
|
-
|
122
|
+
message WorkflowRequestObject {
|
123
|
+
enum ResourceType {
|
124
|
+
// FILE type means the gateway will try to detect the resource type
|
125
|
+
// using the file extension of the name field
|
126
|
+
FILE = 0;
|
127
|
+
BPMN = 1; // extension 'bpmn'
|
128
|
+
YAML = 2; // extension 'yaml'
|
129
|
+
}
|
122
130
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
131
|
+
// the resource basename, e.g. myProcess.bpmn
|
132
|
+
string name = 1;
|
133
|
+
// the resource type; if set to BPMN or YAML then the file extension
|
134
|
+
// is ignored
|
135
|
+
ResourceType type = 2;
|
136
|
+
// the process definition as a UTF8-encoded string
|
137
|
+
bytes definition = 3;
|
127
138
|
}
|
128
139
|
|
129
|
-
message
|
140
|
+
message DeployWorkflowResponse {
|
141
|
+
// the unique key identifying the deployment
|
142
|
+
int64 key = 1;
|
143
|
+
// a list of deployed workflows
|
144
|
+
repeated WorkflowMetadata workflows = 2;
|
130
145
|
}
|
131
146
|
|
132
|
-
message
|
133
|
-
|
147
|
+
message WorkflowMetadata {
|
148
|
+
// the bpmn process ID, as parsed during deployment; together with the version forms a
|
149
|
+
// unique identifier for a specific workflow definition
|
134
150
|
string bpmnProcessId = 1;
|
151
|
+
// the assigned process version
|
152
|
+
int32 version = 2;
|
153
|
+
// the assigned key, which acts as a unique identifier for this workflow
|
154
|
+
int64 workflowKey = 3;
|
155
|
+
// the resource name (see: WorkflowRequestObject.name) from which this workflow was
|
156
|
+
// parsed
|
157
|
+
string resourceName = 4;
|
135
158
|
}
|
136
159
|
|
137
|
-
message
|
138
|
-
|
160
|
+
message FailJobRequest {
|
161
|
+
// the unique job identifier, as obtained when activating the job
|
162
|
+
int64 jobKey = 1;
|
163
|
+
// the amount of retries the job should have left
|
164
|
+
int32 retries = 2;
|
165
|
+
// an optional message describing why the job failed
|
166
|
+
// this is particularly useful if a job runs out of retries and an incident is raised,
|
167
|
+
// as it this message can help explain why an incident was raised
|
168
|
+
string errorMessage = 3;
|
169
|
+
}
|
170
|
+
|
171
|
+
message FailJobResponse {
|
139
172
|
}
|
140
173
|
|
141
|
-
/* either workflow key or bpmn process id and version has to be specified*/
|
142
174
|
message GetWorkflowRequest {
|
175
|
+
// the unique key identifying the workflow definition (e.g. returned from a workflow in
|
176
|
+
// the DeployWorkflowResponse message)
|
143
177
|
int64 workflowKey = 1;
|
144
|
-
|
178
|
+
// the version of the process; set to -1 to use the latest version
|
145
179
|
int32 version = 2;
|
180
|
+
// the BPMN process ID of the workflow definition
|
146
181
|
string bpmnProcessId = 3;
|
147
182
|
}
|
148
183
|
|
149
184
|
message GetWorkflowResponse {
|
185
|
+
// the unique key identifying the workflow definition (e.g. returned from a workflow in
|
186
|
+
// the DeployWorkflowResponse message)
|
150
187
|
int64 workflowKey = 1;
|
188
|
+
// the version of the process
|
151
189
|
int32 version = 2;
|
190
|
+
// the BPMN process ID of the workflow definition
|
152
191
|
string bpmnProcessId = 3;
|
192
|
+
// the name of the resource used to deployed the workflow
|
153
193
|
string resourceName = 4;
|
194
|
+
// a BPMN XML representation of the workflow
|
154
195
|
string bpmnXml = 5;
|
155
196
|
}
|
156
197
|
|
157
|
-
message
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
int32 amount = 4;
|
198
|
+
message ListWorkflowsRequest {
|
199
|
+
// optional filter: if specified, only the workflows with this given process ID will be
|
200
|
+
// returned
|
201
|
+
string bpmnProcessId = 1;
|
162
202
|
}
|
163
203
|
|
164
|
-
message
|
165
|
-
|
166
|
-
|
167
|
-
int32 workflowDefinitionVersion = 3;
|
168
|
-
int64 workflowKey = 4;
|
169
|
-
string elementId = 5;
|
170
|
-
int64 elementInstanceKey = 6;
|
204
|
+
message ListWorkflowsResponse {
|
205
|
+
// a list of deployed workflows matching the request criteria (if any)
|
206
|
+
repeated WorkflowMetadata workflows = 1;
|
171
207
|
}
|
172
208
|
|
173
|
-
message
|
174
|
-
|
175
|
-
string
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
//
|
182
|
-
|
183
|
-
|
184
|
-
|
209
|
+
message PublishMessageRequest {
|
210
|
+
// the name of the message
|
211
|
+
string name = 1;
|
212
|
+
// the correlation key of the message
|
213
|
+
string correlationKey = 2;
|
214
|
+
// how long the message should be buffered on the broker, in milliseconds
|
215
|
+
int64 timeToLive = 3;
|
216
|
+
// the unique ID of the message; can be omitted. only useful to ensure only one message
|
217
|
+
// with the given ID will ever be published (during its lifetime)
|
218
|
+
string messageId = 4;
|
219
|
+
// the message payload as a JSON document; see CreateWorkflowInstanceRequest for the
|
220
|
+
// rules about payloads
|
221
|
+
string payload = 5;
|
185
222
|
}
|
186
223
|
|
187
|
-
message
|
188
|
-
repeated ActivatedJob jobs = 1;
|
224
|
+
message PublishMessageResponse {
|
189
225
|
}
|
190
226
|
|
191
227
|
message ResolveIncidentRequest {
|
228
|
+
// the unique ID of the incident to resolve
|
192
229
|
int64 incidentKey = 1;
|
193
230
|
}
|
194
231
|
|
195
232
|
message ResolveIncidentResponse {
|
196
233
|
}
|
197
234
|
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
235
|
+
message TopologyRequest {
|
236
|
+
}
|
237
|
+
message TopologyResponse {
|
238
|
+
// list of brokers part of this cluster
|
239
|
+
repeated BrokerInfo brokers = 1;
|
240
|
+
// how many nodes are in the cluster
|
241
|
+
int32 clusterSize = 2;
|
242
|
+
// how many partitions are spread across the cluster
|
243
|
+
int32 partitionsCount = 3;
|
244
|
+
// configured replication factor for this cluster
|
245
|
+
int32 replicationFactor = 4;
|
246
|
+
}
|
247
|
+
|
248
|
+
message BrokerInfo {
|
249
|
+
// unique (within a cluster) node ID for the broker
|
250
|
+
int32 nodeId = 1;
|
251
|
+
// hostname of the broker
|
252
|
+
string host = 2;
|
253
|
+
// port for the broker
|
254
|
+
int32 port = 3;
|
255
|
+
// list of partitions managed or replicated on this broker
|
256
|
+
repeated Partition partitions = 4;
|
257
|
+
}
|
258
|
+
|
259
|
+
message Partition {
|
260
|
+
// Describes the Raft role of the broker for a given partition
|
261
|
+
enum PartitionBrokerRole {
|
262
|
+
LEADER = 0;
|
263
|
+
FOLLOWER = 1;
|
204
264
|
}
|
205
|
-
|
265
|
+
|
266
|
+
// the unique ID of this partition
|
267
|
+
int32 partitionId = 1;
|
268
|
+
// the role of the broker for this partition
|
269
|
+
PartitionBrokerRole role = 3;
|
270
|
+
}
|
271
|
+
|
272
|
+
message UpdateJobRetriesRequest {
|
273
|
+
// the unique job identifier, as obtained through ActivateJobs
|
274
|
+
int64 jobKey = 1;
|
275
|
+
// the new amount of retries for the job; must be positive
|
276
|
+
int32 retries = 2;
|
277
|
+
}
|
278
|
+
|
279
|
+
message UpdateJobRetriesResponse {
|
280
|
+
}
|
281
|
+
|
282
|
+
message UpdateWorkflowInstancePayloadRequest {
|
283
|
+
// the unique identifier of a particular element; can be the workflow instance key (as
|
284
|
+
// obtained during instance creation), or a given element, such as a service task (see
|
285
|
+
// elementInstanceKey on the JobHeaders message)
|
286
|
+
int64 elementInstanceKey = 1;
|
287
|
+
// the new payload as a JSON document; see CreateWorkflowInstanceRequest for the rules
|
288
|
+
// about payloads
|
289
|
+
string payload = 2;
|
290
|
+
}
|
291
|
+
|
292
|
+
message UpdateWorkflowInstancePayloadResponse {
|
293
|
+
}
|
294
|
+
|
295
|
+
service Gateway {
|
296
|
+
/*
|
297
|
+
Iterates through all known partitions in a round-robin and activates up to the requested amount
|
298
|
+
of jobs and streams them back to the client as they are activated.
|
299
|
+
|
300
|
+
Errors:
|
301
|
+
INVALID_ARGUMENT:
|
302
|
+
- type is blank (empty string, null)
|
303
|
+
- worker is blank (empty string, null)
|
304
|
+
- timeout less than 1
|
305
|
+
- amount is less than 1
|
306
|
+
*/
|
307
|
+
rpc ActivateJobs (ActivateJobsRequest) returns (stream ActivateJobsResponse) {
|
206
308
|
}
|
207
|
-
|
309
|
+
|
310
|
+
/*
|
311
|
+
Cancels a running workflow instance
|
312
|
+
|
313
|
+
Errors:
|
314
|
+
NOT_FOUND:
|
315
|
+
- no workflow instance exists with the given key
|
316
|
+
*/
|
317
|
+
rpc CancelWorkflowInstance (CancelWorkflowInstanceRequest) returns (CancelWorkflowInstanceResponse) {
|
208
318
|
}
|
319
|
+
|
320
|
+
/*
|
321
|
+
Completes a job with the given payload, which allows completing the associated service task.
|
322
|
+
|
323
|
+
Errors:
|
324
|
+
NOT_FOUND:
|
325
|
+
- no job exists with the given job key. Note that since jobs are removed once completed,
|
326
|
+
it could be that this job did exist at some point.
|
327
|
+
|
328
|
+
FAILED_PRECONDITION:
|
329
|
+
- the job was marked as failed. In that case, the related incident must be resolved before
|
330
|
+
the job can be activated again and completed.
|
331
|
+
*/
|
209
332
|
rpc CompleteJob (CompleteJobRequest) returns (CompleteJobResponse) {
|
210
333
|
}
|
334
|
+
|
335
|
+
/*
|
336
|
+
Creates and starts an instance of the specified workflow. The workflow definition to use to
|
337
|
+
create the instance can be specified either using its unique key (as returned by
|
338
|
+
DeployWorkflow), or using the BPMN process ID and a version. Pass -1 as the version to use the
|
339
|
+
latest deployed version. Note that only workflows with none start events can be started through
|
340
|
+
this command.
|
341
|
+
|
342
|
+
Errors:
|
343
|
+
NOT_FOUND:
|
344
|
+
- no workflow with the given key exists (if workflowKey was given)
|
345
|
+
- no workflow with the given process ID exists (if bpmnProcessId was given but version was -1)
|
346
|
+
- no workflow with the given process ID and version exists (if both bpmnProcessId and version were given)
|
347
|
+
|
348
|
+
FAILED_PRECONDITION:
|
349
|
+
- the workflow definition does not contain a none start event; only workflows with none
|
350
|
+
start event can be started manually.
|
351
|
+
|
352
|
+
INVALID_ARGUMENT:
|
353
|
+
- the given payload is not a valid JSON document; all payloads are expected to be
|
354
|
+
valid JSON documents where the root node is an object.
|
355
|
+
*/
|
211
356
|
rpc CreateWorkflowInstance (CreateWorkflowInstanceRequest) returns (CreateWorkflowInstanceResponse) {
|
212
357
|
}
|
213
|
-
|
358
|
+
|
359
|
+
/*
|
360
|
+
Deploys one or more workflows to Zeebe. Note that this is an atomic call,
|
361
|
+
i.e. either all workflows are deployed, or none of them are.
|
362
|
+
|
363
|
+
Errors:
|
364
|
+
INVALID_ARGUMENT:
|
365
|
+
- no resources given.
|
366
|
+
- if at least one resource is invalid. A resource is considered invalid if:
|
367
|
+
- it is not a BPMN or YAML file (currently detected through the file extension)
|
368
|
+
- the resource data is not deserializable (e.g. detected as BPMN, but it's broken XML)
|
369
|
+
- the workflow is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task)
|
370
|
+
*/
|
371
|
+
rpc DeployWorkflow (DeployWorkflowRequest) returns (DeployWorkflowResponse) {
|
214
372
|
}
|
215
|
-
|
373
|
+
|
374
|
+
/*
|
375
|
+
Marks the job as failed; if the retries argument is positive, then the job will be immediately
|
376
|
+
activatable again, and a worker could try again to process it. If it is zero or negative however,
|
377
|
+
an incident will be raised, tagged with the given errorMessage, and the job will not be
|
378
|
+
activatable until the incident is resolved.
|
379
|
+
|
380
|
+
Errors:
|
381
|
+
NOT_FOUND:
|
382
|
+
- no job was found with the given key
|
383
|
+
|
384
|
+
FAILED_PRECONDITION:
|
385
|
+
- the job was not activated
|
386
|
+
- the job is already in a failed state, i.e. ran out of retries
|
387
|
+
*/
|
388
|
+
rpc FailJob (FailJobRequest) returns (FailJobResponse) {
|
216
389
|
}
|
217
|
-
|
390
|
+
|
391
|
+
/*
|
392
|
+
Fetches the workflow definition either by workflow key, or BPMN process ID and version.
|
393
|
+
At least one of workflowKey or bpmnProcessId must be specified.
|
394
|
+
|
395
|
+
Errors:
|
396
|
+
NOT_FOUND:
|
397
|
+
- no workflow with the given key exists (if workflowKey was given)
|
398
|
+
- no workflow with the given process ID exists (if bpmnProcessId was given but version was -1)
|
399
|
+
- no workflow with the given process ID and version exists (if both bpmnProcessId and version were given)
|
400
|
+
*/
|
401
|
+
rpc GetWorkflow (GetWorkflowRequest) returns (GetWorkflowResponse) {
|
218
402
|
}
|
403
|
+
|
404
|
+
/*
|
405
|
+
Lists all workflows matching the request criteria currently deployed in the cluster.
|
406
|
+
|
407
|
+
Errors:
|
408
|
+
NOT_FOUND:
|
409
|
+
- no workflows have been deployed yet (if no bpmnProcessId was given)
|
410
|
+
- no workflow with the given process ID exists (if bpmnProcessId was given)
|
411
|
+
*/
|
219
412
|
rpc ListWorkflows (ListWorkflowsRequest) returns (ListWorkflowsResponse) {
|
220
413
|
}
|
221
|
-
|
414
|
+
|
415
|
+
/*
|
416
|
+
Publishes a single message. Messages are published to specific partitions computed from their
|
417
|
+
correlation keys.
|
418
|
+
|
419
|
+
Errors:
|
420
|
+
ALREADY_EXISTS:
|
421
|
+
- a message with the same ID was previously published (and is still alive)
|
422
|
+
*/
|
423
|
+
rpc PublishMessage (PublishMessageRequest) returns (PublishMessageResponse) {
|
222
424
|
}
|
425
|
+
|
426
|
+
/*
|
427
|
+
Resolves a given incident. This simply marks the incident as resolved; most likely a call to
|
428
|
+
UpdateJobRetries or UpdateWorkflowInstancePayload will be necessary to actually resolve the
|
429
|
+
problem, following by this call.
|
430
|
+
|
431
|
+
Errors:
|
432
|
+
NOT_FOUND:
|
433
|
+
- no incident with the given key exists
|
434
|
+
*/
|
223
435
|
rpc ResolveIncident (ResolveIncidentRequest) returns (ResolveIncidentResponse) {
|
224
436
|
}
|
437
|
+
|
438
|
+
/*
|
439
|
+
Obtains the current topology of the cluster the gateway is part of.
|
440
|
+
*/
|
441
|
+
rpc Topology (TopologyRequest) returns (TopologyResponse) {
|
442
|
+
}
|
443
|
+
|
444
|
+
/*
|
445
|
+
Updates the number of retries a job has left. This is mostly useful for jobs that have run out of
|
446
|
+
retries, should the underlying problem be solved.
|
447
|
+
|
448
|
+
Errors:
|
449
|
+
NOT_FOUND:
|
450
|
+
- no job exists with the given key
|
451
|
+
|
452
|
+
INVALID_ARGUMENT:
|
453
|
+
- retries is not greater than 0
|
454
|
+
*/
|
455
|
+
rpc UpdateJobRetries (UpdateJobRetriesRequest) returns (UpdateJobRetriesResponse) {
|
456
|
+
}
|
457
|
+
|
458
|
+
/*
|
459
|
+
Updates all the variables in the workflow instance scope from the given JSON document.
|
460
|
+
|
461
|
+
Errors:
|
462
|
+
NOT_FOUND:
|
463
|
+
- no element with the given elementInstanceKey exists
|
464
|
+
INVALID_ARGUMENT:
|
465
|
+
- the given payload is not a valid JSON document; all payloads are expected to be
|
466
|
+
valid JSON documents where the root node is an object.
|
467
|
+
*/
|
468
|
+
rpc UpdateWorkflowInstancePayload (UpdateWorkflowInstancePayloadRequest) returns (UpdateWorkflowInstancePayloadResponse) {
|
469
|
+
}
|
225
470
|
}
|
data/zeebe-client.gemspec
CHANGED
@@ -25,6 +25,6 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.add_development_dependency 'bundler'
|
26
26
|
s.add_development_dependency 'rake'
|
27
27
|
s.add_development_dependency 'rspec'
|
28
|
-
s.add_development_dependency 'rubocop', '~> 0.
|
28
|
+
s.add_development_dependency 'rubocop', '~> 0.64.0'
|
29
29
|
s.add_development_dependency 'bundler-audit'
|
30
30
|
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.3.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: 2019-
|
11
|
+
date: 2019-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.64.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: 0.64.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: bundler-audit
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|