From 01ce44df55cf351ea9989bcd50e5be9ab4c5f26b Mon Sep 17 00:00:00 2001 From: cn Date: Fri, 19 Jan 2024 14:35:38 +0100 Subject: [PATCH] client: update to Zeebe 8.4.x --- CHANGELOG.md | 4 + README.md | 2 +- Rakefile | 2 +- lib/zeebe/client/proto/gateway_pb.rb | 10 +- lib/zeebe/client/proto/gateway_services_pb.rb | 49 ++++++ lib/zeebe/client/version.rb | 2 +- proto/gateway.proto | 163 +++++++++++++++++- 7 files changed, 226 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 072de97..bfc0964 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.20.0 + +- add support for [Zeebe 8.4.0](https://github.com/camunda/zeebe/releases/tag/8.4.0) + ## 0.19.0 (June 5th, 2023) - add support for [Zeebe 8.2.5](https://github.com/camunda/zeebe/releases/tag/8.2.5) diff --git a/README.md b/README.md index edec899..558a664 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Install the gem: Run a Zeebe instance locally: ```sh -docker run -it --rm -p 26500:26500 camunda/zeebe:8.2.5 +docker run -it --rm -p 26500:26500 camunda/zeebe:8.4.0 ``` And then try the available [demo script](examples/demo.rb). diff --git a/Rakefile b/Rakefile index 9b039e9..5f664fe 100644 --- a/Rakefile +++ b/Rakefile @@ -13,7 +13,7 @@ task ci: ['zeebe:start', :default, 'zeebe:stop'] desc 'Starts Zeebe Docker container' task 'zeebe:start' do - sh 'docker run -d --name zeebe --rm -p 26500:26500 camunda/zeebe:8.2.5' + sh 'docker run -d --name zeebe --rm -p 26500:26500 camunda/zeebe:8.4.0' sleep(10) end diff --git a/lib/zeebe/client/proto/gateway_pb.rb b/lib/zeebe/client/proto/gateway_pb.rb index b15ed62..55c6819 100644 --- a/lib/zeebe/client/proto/gateway_pb.rb +++ b/lib/zeebe/client/proto/gateway_pb.rb @@ -5,7 +5,7 @@ require 'google/protobuf' -descriptor_data = "\n\x13proto/gateway.proto\x12\x10gateway_protocol\"\x8e\x01\n\x13\x41\x63tivateJobsRequest\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0e\n\x06worker\x18\x02 \x01(\t\x12\x0f\n\x07timeout\x18\x03 \x01(\x03\x12\x19\n\x11maxJobsToActivate\x18\x04 \x01(\x05\x12\x15\n\rfetchVariable\x18\x05 \x03(\t\x12\x16\n\x0erequestTimeout\x18\x06 \x01(\x03\"D\n\x14\x41\x63tivateJobsResponse\x12,\n\x04jobs\x18\x01 \x03(\x0b\x32\x1e.gateway_protocol.ActivatedJob\"\xa8\x02\n\x0c\x41\x63tivatedJob\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x1a\n\x12processInstanceKey\x18\x03 \x01(\x03\x12\x15\n\rbpmnProcessId\x18\x04 \x01(\t\x12 \n\x18processDefinitionVersion\x18\x05 \x01(\x05\x12\x1c\n\x14processDefinitionKey\x18\x06 \x01(\x03\x12\x11\n\telementId\x18\x07 \x01(\t\x12\x1a\n\x12\x65lementInstanceKey\x18\x08 \x01(\x03\x12\x15\n\rcustomHeaders\x18\t \x01(\t\x12\x0e\n\x06worker\x18\n \x01(\t\x12\x0f\n\x07retries\x18\x0b \x01(\x05\x12\x10\n\x08\x64\x65\x61\x64line\x18\x0c \x01(\x03\x12\x11\n\tvariables\x18\r \x01(\t\":\n\x1c\x43\x61ncelProcessInstanceRequest\x12\x1a\n\x12processInstanceKey\x18\x01 \x01(\x03\"\x1f\n\x1d\x43\x61ncelProcessInstanceResponse\"7\n\x12\x43ompleteJobRequest\x12\x0e\n\x06jobKey\x18\x01 \x01(\x03\x12\x11\n\tvariables\x18\x02 \x01(\t\"\x15\n\x13\x43ompleteJobResponse\"\xcd\x01\n\x1c\x43reateProcessInstanceRequest\x12\x1c\n\x14processDefinitionKey\x18\x01 \x01(\x03\x12\x15\n\rbpmnProcessId\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\x05\x12\x11\n\tvariables\x18\x04 \x01(\t\x12T\n\x11startInstructions\x18\x05 \x03(\x0b\x32\x39.gateway_protocol.ProcessInstanceCreationStartInstruction\"<\n\'ProcessInstanceCreationStartInstruction\x12\x11\n\telementId\x18\x01 \x01(\t\"\x81\x01\n\x1d\x43reateProcessInstanceResponse\x12\x1c\n\x14processDefinitionKey\x18\x01 \x01(\x03\x12\x15\n\rbpmnProcessId\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\x05\x12\x1a\n\x12processInstanceKey\x18\x04 \x01(\x03\"\x99\x01\n&CreateProcessInstanceWithResultRequest\x12?\n\x07request\x18\x01 \x01(\x0b\x32..gateway_protocol.CreateProcessInstanceRequest\x12\x16\n\x0erequestTimeout\x18\x02 \x01(\x03\x12\x16\n\x0e\x66\x65tchVariables\x18\x03 \x03(\t\"\x9e\x01\n\'CreateProcessInstanceWithResultResponse\x12\x1c\n\x14processDefinitionKey\x18\x01 \x01(\x03\x12\x15\n\rbpmnProcessId\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\x05\x12\x1a\n\x12processInstanceKey\x18\x04 \x01(\x03\x12\x11\n\tvariables\x18\x05 \x01(\t\"U\n\x17\x45valuateDecisionRequest\x12\x13\n\x0b\x64\x65\x63isionKey\x18\x01 \x01(\x03\x12\x12\n\ndecisionId\x18\x02 \x01(\t\x12\x11\n\tvariables\x18\x03 \x01(\t\"\xbe\x02\n\x18\x45valuateDecisionResponse\x12\x13\n\x0b\x64\x65\x63isionKey\x18\x01 \x01(\x03\x12\x12\n\ndecisionId\x18\x02 \x01(\t\x12\x14\n\x0c\x64\x65\x63isionName\x18\x03 \x01(\t\x12\x17\n\x0f\x64\x65\x63isionVersion\x18\x04 \x01(\x05\x12\x1e\n\x16\x64\x65\x63isionRequirementsId\x18\x05 \x01(\t\x12\x1f\n\x17\x64\x65\x63isionRequirementsKey\x18\x06 \x01(\x03\x12\x16\n\x0e\x64\x65\x63isionOutput\x18\x07 \x01(\t\x12?\n\x12\x65valuatedDecisions\x18\x08 \x03(\x0b\x32#.gateway_protocol.EvaluatedDecision\x12\x18\n\x10\x66\x61iledDecisionId\x18\t \x01(\t\x12\x16\n\x0e\x66\x61ilureMessage\x18\n \x01(\t\"\x99\x02\n\x11\x45valuatedDecision\x12\x13\n\x0b\x64\x65\x63isionKey\x18\x01 \x01(\x03\x12\x12\n\ndecisionId\x18\x02 \x01(\t\x12\x14\n\x0c\x64\x65\x63isionName\x18\x03 \x01(\t\x12\x17\n\x0f\x64\x65\x63isionVersion\x18\x04 \x01(\x05\x12\x14\n\x0c\x64\x65\x63isionType\x18\x05 \x01(\t\x12\x16\n\x0e\x64\x65\x63isionOutput\x18\x06 \x01(\t\x12;\n\x0cmatchedRules\x18\x07 \x03(\x0b\x32%.gateway_protocol.MatchedDecisionRule\x12\x41\n\x0f\x65valuatedInputs\x18\x08 \x03(\x0b\x32(.gateway_protocol.EvaluatedDecisionInput\"P\n\x16\x45valuatedDecisionInput\x12\x0f\n\x07inputId\x18\x01 \x01(\t\x12\x11\n\tinputName\x18\x02 \x01(\t\x12\x12\n\ninputValue\x18\x03 \x01(\t\"T\n\x17\x45valuatedDecisionOutput\x12\x10\n\x08outputId\x18\x01 \x01(\t\x12\x12\n\noutputName\x18\x02 \x01(\t\x12\x13\n\x0boutputValue\x18\x03 \x01(\t\"}\n\x13MatchedDecisionRule\x12\x0e\n\x06ruleId\x18\x01 \x01(\t\x12\x11\n\truleIndex\x18\x02 \x01(\x05\x12\x43\n\x10\x65valuatedOutputs\x18\x03 \x03(\x0b\x32).gateway_protocol.EvaluatedDecisionOutput\"U\n\x14\x44\x65ployProcessRequest\x12\x39\n\tprocesses\x18\x01 \x03(\x0b\x32&.gateway_protocol.ProcessRequestObject:\x02\x18\x01\"<\n\x14ProcessRequestObject\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ndefinition\x18\x02 \x01(\x0c:\x02\x18\x01\"^\n\x15\x44\x65ployProcessResponse\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x34\n\tprocesses\x18\x02 \x03(\x0b\x32!.gateway_protocol.ProcessMetadata:\x02\x18\x01\"F\n\x15\x44\x65ployResourceRequest\x12-\n\tresources\x18\x01 \x03(\x0b\x32\x1a.gateway_protocol.Resource\")\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"X\n\x16\x44\x65ployResourceResponse\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x31\n\x0b\x64\x65ployments\x18\x02 \x03(\x0b\x32\x1c.gateway_protocol.Deployment\"\xd6\x01\n\nDeployment\x12\x34\n\x07process\x18\x01 \x01(\x0b\x32!.gateway_protocol.ProcessMetadataH\x00\x12\x36\n\x08\x64\x65\x63ision\x18\x02 \x01(\x0b\x32\".gateway_protocol.DecisionMetadataH\x00\x12N\n\x14\x64\x65\x63isionRequirements\x18\x03 \x01(\x0b\x32..gateway_protocol.DecisionRequirementsMetadataH\x00\x42\n\n\x08Metadata\"m\n\x0fProcessMetadata\x12\x15\n\rbpmnProcessId\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\x05\x12\x1c\n\x14processDefinitionKey\x18\x03 \x01(\x03\x12\x14\n\x0cresourceName\x18\x04 \x01(\t\"\xac\x01\n\x10\x44\x65\x63isionMetadata\x12\x15\n\rdmnDecisionId\x18\x01 \x01(\t\x12\x17\n\x0f\x64mnDecisionName\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\x05\x12\x13\n\x0b\x64\x65\x63isionKey\x18\x04 \x01(\x03\x12!\n\x19\x64mnDecisionRequirementsId\x18\x05 \x01(\t\x12\x1f\n\x17\x64\x65\x63isionRequirementsKey\x18\x06 \x01(\x03\"\xae\x01\n\x1c\x44\x65\x63isionRequirementsMetadata\x12!\n\x19\x64mnDecisionRequirementsId\x18\x01 \x01(\t\x12#\n\x1b\x64mnDecisionRequirementsName\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\x05\x12\x1f\n\x17\x64\x65\x63isionRequirementsKey\x18\x04 \x01(\x03\x12\x14\n\x0cresourceName\x18\x05 \x01(\t\"p\n\x0e\x46\x61ilJobRequest\x12\x0e\n\x06jobKey\x18\x01 \x01(\x03\x12\x0f\n\x07retries\x18\x02 \x01(\x05\x12\x14\n\x0c\x65rrorMessage\x18\x03 \x01(\t\x12\x14\n\x0cretryBackOff\x18\x04 \x01(\x03\x12\x11\n\tvariables\x18\x05 \x01(\t\"\x11\n\x0f\x46\x61ilJobResponse\"_\n\x11ThrowErrorRequest\x12\x0e\n\x06jobKey\x18\x01 \x01(\x03\x12\x11\n\terrorCode\x18\x02 \x01(\t\x12\x14\n\x0c\x65rrorMessage\x18\x03 \x01(\t\x12\x11\n\tvariables\x18\x04 \x01(\t\"\x14\n\x12ThrowErrorResponse\"w\n\x15PublishMessageRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\x0e\x63orrelationKey\x18\x02 \x01(\t\x12\x12\n\ntimeToLive\x18\x03 \x01(\x03\x12\x11\n\tmessageId\x18\x04 \x01(\t\x12\x11\n\tvariables\x18\x05 \x01(\t\"%\n\x16PublishMessageResponse\x12\x0b\n\x03key\x18\x01 \x01(\x03\"-\n\x16ResolveIncidentRequest\x12\x13\n\x0bincidentKey\x18\x01 \x01(\x03\"\x19\n\x17ResolveIncidentResponse\"\x11\n\x0fTopologyRequest\"\xa2\x01\n\x10TopologyResponse\x12-\n\x07\x62rokers\x18\x01 \x03(\x0b\x32\x1c.gateway_protocol.BrokerInfo\x12\x13\n\x0b\x63lusterSize\x18\x02 \x01(\x05\x12\x17\n\x0fpartitionsCount\x18\x03 \x01(\x05\x12\x19\n\x11replicationFactor\x18\x04 \x01(\x05\x12\x16\n\x0egatewayVersion\x18\x05 \x01(\t\"z\n\nBrokerInfo\x12\x0e\n\x06nodeId\x18\x01 \x01(\x05\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\x05\x12/\n\npartitions\x18\x04 \x03(\x0b\x32\x1b.gateway_protocol.Partition\x12\x0f\n\x07version\x18\x05 \x01(\t\"\xa0\x02\n\tPartition\x12\x13\n\x0bpartitionId\x18\x01 \x01(\x05\x12=\n\x04role\x18\x02 \x01(\x0e\x32/.gateway_protocol.Partition.PartitionBrokerRole\x12\x41\n\x06health\x18\x03 \x01(\x0e\x32\x31.gateway_protocol.Partition.PartitionBrokerHealth\"=\n\x13PartitionBrokerRole\x12\n\n\x06LEADER\x10\x00\x12\x0c\n\x08\x46OLLOWER\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"=\n\x15PartitionBrokerHealth\x12\x0b\n\x07HEALTHY\x10\x00\x12\r\n\tUNHEALTHY\x10\x01\x12\x08\n\x04\x44\x45\x41\x44\x10\x02\":\n\x17UpdateJobRetriesRequest\x12\x0e\n\x06jobKey\x18\x01 \x01(\x03\x12\x0f\n\x07retries\x18\x02 \x01(\x05\"\x1a\n\x18UpdateJobRetriesResponse\"S\n\x13SetVariablesRequest\x12\x1a\n\x12\x65lementInstanceKey\x18\x01 \x01(\x03\x12\x11\n\tvariables\x18\x02 \x01(\t\x12\r\n\x05local\x18\x03 \x01(\x08\"#\n\x14SetVariablesResponse\x12\x0b\n\x03key\x18\x01 \x01(\x03\"\xa0\x04\n\x1cModifyProcessInstanceRequest\x12\x1a\n\x12processInstanceKey\x18\x01 \x01(\x03\x12`\n\x14\x61\x63tivateInstructions\x18\x02 \x03(\x0b\x32\x42.gateway_protocol.ModifyProcessInstanceRequest.ActivateInstruction\x12\x62\n\x15terminateInstructions\x18\x03 \x03(\x0b\x32\x43.gateway_protocol.ModifyProcessInstanceRequest.TerminateInstruction\x1a\xae\x01\n\x13\x41\x63tivateInstruction\x12\x11\n\telementId\x18\x01 \x01(\t\x12\"\n\x1a\x61ncestorElementInstanceKey\x18\x02 \x01(\x03\x12`\n\x14variableInstructions\x18\x03 \x03(\x0b\x32\x42.gateway_protocol.ModifyProcessInstanceRequest.VariableInstruction\x1a\x39\n\x13VariableInstruction\x12\x11\n\tvariables\x18\x01 \x01(\t\x12\x0f\n\x07scopeId\x18\x02 \x01(\t\x1a\x32\n\x14TerminateInstruction\x12\x1a\n\x12\x65lementInstanceKey\x18\x01 \x01(\x03\"\x1f\n\x1dModifyProcessInstanceResponse\",\n\x15\x44\x65leteResourceRequest\x12\x13\n\x0bresourceKey\x18\x01 \x01(\x03\"\x18\n\x16\x44\x65leteResourceResponse\"?\n\x16\x42roadcastSignalRequest\x12\x12\n\nsignalName\x18\x01 \x01(\t\x12\x11\n\tvariables\x18\x02 \x01(\t\"&\n\x17\x42roadcastSignalResponse\x12\x0b\n\x03key\x18\x01 \x01(\x03\x32\x86\x0f\n\x07Gateway\x12\x61\n\x0c\x41\x63tivateJobs\x12%.gateway_protocol.ActivateJobsRequest\x1a&.gateway_protocol.ActivateJobsResponse\"\x00\x30\x01\x12z\n\x15\x43\x61ncelProcessInstance\x12..gateway_protocol.CancelProcessInstanceRequest\x1a/.gateway_protocol.CancelProcessInstanceResponse\"\x00\x12\\\n\x0b\x43ompleteJob\x12$.gateway_protocol.CompleteJobRequest\x1a%.gateway_protocol.CompleteJobResponse\"\x00\x12z\n\x15\x43reateProcessInstance\x12..gateway_protocol.CreateProcessInstanceRequest\x1a/.gateway_protocol.CreateProcessInstanceResponse\"\x00\x12\x98\x01\n\x1f\x43reateProcessInstanceWithResult\x12\x38.gateway_protocol.CreateProcessInstanceWithResultRequest\x1a\x39.gateway_protocol.CreateProcessInstanceWithResultResponse\"\x00\x12k\n\x10\x45valuateDecision\x12).gateway_protocol.EvaluateDecisionRequest\x1a*.gateway_protocol.EvaluateDecisionResponse\"\x00\x12\x65\n\rDeployProcess\x12&.gateway_protocol.DeployProcessRequest\x1a\'.gateway_protocol.DeployProcessResponse\"\x03\x88\x02\x01\x12\x65\n\x0e\x44\x65ployResource\x12\'.gateway_protocol.DeployResourceRequest\x1a(.gateway_protocol.DeployResourceResponse\"\x00\x12P\n\x07\x46\x61ilJob\x12 .gateway_protocol.FailJobRequest\x1a!.gateway_protocol.FailJobResponse\"\x00\x12Y\n\nThrowError\x12#.gateway_protocol.ThrowErrorRequest\x1a$.gateway_protocol.ThrowErrorResponse\"\x00\x12\x65\n\x0ePublishMessage\x12\'.gateway_protocol.PublishMessageRequest\x1a(.gateway_protocol.PublishMessageResponse\"\x00\x12h\n\x0fResolveIncident\x12(.gateway_protocol.ResolveIncidentRequest\x1a).gateway_protocol.ResolveIncidentResponse\"\x00\x12_\n\x0cSetVariables\x12%.gateway_protocol.SetVariablesRequest\x1a&.gateway_protocol.SetVariablesResponse\"\x00\x12S\n\x08Topology\x12!.gateway_protocol.TopologyRequest\x1a\".gateway_protocol.TopologyResponse\"\x00\x12k\n\x10UpdateJobRetries\x12).gateway_protocol.UpdateJobRetriesRequest\x1a*.gateway_protocol.UpdateJobRetriesResponse\"\x00\x12z\n\x15ModifyProcessInstance\x12..gateway_protocol.ModifyProcessInstanceRequest\x1a/.gateway_protocol.ModifyProcessInstanceResponse\"\x00\x12\x65\n\x0e\x44\x65leteResource\x12\'.gateway_protocol.DeleteResourceRequest\x1a(.gateway_protocol.DeleteResourceResponse\"\x00\x12h\n\x0f\x42roadcastSignal\x12(.gateway_protocol.BroadcastSignalRequest\x1a).gateway_protocol.BroadcastSignalResponse\"\x00\x42,\n!io.camunda.zeebe.gateway.protocolP\x00Z\x05./;pbb\x06proto3" +descriptor_data = "\n\x13proto/gateway.proto\x12\x10gateway_protocol\"u\n\x1aStreamActivatedJobsRequest\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0e\n\x06worker\x18\x02 \x01(\t\x12\x0f\n\x07timeout\x18\x03 \x01(\x03\x12\x15\n\rfetchVariable\x18\x05 \x03(\t\x12\x11\n\ttenantIds\x18\x06 \x03(\t\"\xa1\x01\n\x13\x41\x63tivateJobsRequest\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0e\n\x06worker\x18\x02 \x01(\t\x12\x0f\n\x07timeout\x18\x03 \x01(\x03\x12\x19\n\x11maxJobsToActivate\x18\x04 \x01(\x05\x12\x15\n\rfetchVariable\x18\x05 \x03(\t\x12\x16\n\x0erequestTimeout\x18\x06 \x01(\x03\x12\x11\n\ttenantIds\x18\x07 \x03(\t\"D\n\x14\x41\x63tivateJobsResponse\x12,\n\x04jobs\x18\x01 \x03(\x0b\x32\x1e.gateway_protocol.ActivatedJob\"\xba\x02\n\x0c\x41\x63tivatedJob\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x1a\n\x12processInstanceKey\x18\x03 \x01(\x03\x12\x15\n\rbpmnProcessId\x18\x04 \x01(\t\x12 \n\x18processDefinitionVersion\x18\x05 \x01(\x05\x12\x1c\n\x14processDefinitionKey\x18\x06 \x01(\x03\x12\x11\n\telementId\x18\x07 \x01(\t\x12\x1a\n\x12\x65lementInstanceKey\x18\x08 \x01(\x03\x12\x15\n\rcustomHeaders\x18\t \x01(\t\x12\x0e\n\x06worker\x18\n \x01(\t\x12\x0f\n\x07retries\x18\x0b \x01(\x05\x12\x10\n\x08\x64\x65\x61\x64line\x18\x0c \x01(\x03\x12\x11\n\tvariables\x18\r \x01(\t\x12\x10\n\x08tenantId\x18\x0e \x01(\t\":\n\x1c\x43\x61ncelProcessInstanceRequest\x12\x1a\n\x12processInstanceKey\x18\x01 \x01(\x03\"\x1f\n\x1d\x43\x61ncelProcessInstanceResponse\"7\n\x12\x43ompleteJobRequest\x12\x0e\n\x06jobKey\x18\x01 \x01(\x03\x12\x11\n\tvariables\x18\x02 \x01(\t\"\x15\n\x13\x43ompleteJobResponse\"\xdf\x01\n\x1c\x43reateProcessInstanceRequest\x12\x1c\n\x14processDefinitionKey\x18\x01 \x01(\x03\x12\x15\n\rbpmnProcessId\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\x05\x12\x11\n\tvariables\x18\x04 \x01(\t\x12T\n\x11startInstructions\x18\x05 \x03(\x0b\x32\x39.gateway_protocol.ProcessInstanceCreationStartInstruction\x12\x10\n\x08tenantId\x18\x06 \x01(\t\"<\n\'ProcessInstanceCreationStartInstruction\x12\x11\n\telementId\x18\x01 \x01(\t\"\x93\x01\n\x1d\x43reateProcessInstanceResponse\x12\x1c\n\x14processDefinitionKey\x18\x01 \x01(\x03\x12\x15\n\rbpmnProcessId\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\x05\x12\x1a\n\x12processInstanceKey\x18\x04 \x01(\x03\x12\x10\n\x08tenantId\x18\x05 \x01(\t\"\x99\x01\n&CreateProcessInstanceWithResultRequest\x12?\n\x07request\x18\x01 \x01(\x0b\x32..gateway_protocol.CreateProcessInstanceRequest\x12\x16\n\x0erequestTimeout\x18\x02 \x01(\x03\x12\x16\n\x0e\x66\x65tchVariables\x18\x03 \x03(\t\"\xb0\x01\n\'CreateProcessInstanceWithResultResponse\x12\x1c\n\x14processDefinitionKey\x18\x01 \x01(\x03\x12\x15\n\rbpmnProcessId\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\x05\x12\x1a\n\x12processInstanceKey\x18\x04 \x01(\x03\x12\x11\n\tvariables\x18\x05 \x01(\t\x12\x10\n\x08tenantId\x18\x06 \x01(\t\"g\n\x17\x45valuateDecisionRequest\x12\x13\n\x0b\x64\x65\x63isionKey\x18\x01 \x01(\x03\x12\x12\n\ndecisionId\x18\x02 \x01(\t\x12\x11\n\tvariables\x18\x03 \x01(\t\x12\x10\n\x08tenantId\x18\x04 \x01(\t\"\xd0\x02\n\x18\x45valuateDecisionResponse\x12\x13\n\x0b\x64\x65\x63isionKey\x18\x01 \x01(\x03\x12\x12\n\ndecisionId\x18\x02 \x01(\t\x12\x14\n\x0c\x64\x65\x63isionName\x18\x03 \x01(\t\x12\x17\n\x0f\x64\x65\x63isionVersion\x18\x04 \x01(\x05\x12\x1e\n\x16\x64\x65\x63isionRequirementsId\x18\x05 \x01(\t\x12\x1f\n\x17\x64\x65\x63isionRequirementsKey\x18\x06 \x01(\x03\x12\x16\n\x0e\x64\x65\x63isionOutput\x18\x07 \x01(\t\x12?\n\x12\x65valuatedDecisions\x18\x08 \x03(\x0b\x32#.gateway_protocol.EvaluatedDecision\x12\x18\n\x10\x66\x61iledDecisionId\x18\t \x01(\t\x12\x16\n\x0e\x66\x61ilureMessage\x18\n \x01(\t\x12\x10\n\x08tenantId\x18\x0b \x01(\t\"\xab\x02\n\x11\x45valuatedDecision\x12\x13\n\x0b\x64\x65\x63isionKey\x18\x01 \x01(\x03\x12\x12\n\ndecisionId\x18\x02 \x01(\t\x12\x14\n\x0c\x64\x65\x63isionName\x18\x03 \x01(\t\x12\x17\n\x0f\x64\x65\x63isionVersion\x18\x04 \x01(\x05\x12\x14\n\x0c\x64\x65\x63isionType\x18\x05 \x01(\t\x12\x16\n\x0e\x64\x65\x63isionOutput\x18\x06 \x01(\t\x12;\n\x0cmatchedRules\x18\x07 \x03(\x0b\x32%.gateway_protocol.MatchedDecisionRule\x12\x41\n\x0f\x65valuatedInputs\x18\x08 \x03(\x0b\x32(.gateway_protocol.EvaluatedDecisionInput\x12\x10\n\x08tenantId\x18\t \x01(\t\"P\n\x16\x45valuatedDecisionInput\x12\x0f\n\x07inputId\x18\x01 \x01(\t\x12\x11\n\tinputName\x18\x02 \x01(\t\x12\x12\n\ninputValue\x18\x03 \x01(\t\"T\n\x17\x45valuatedDecisionOutput\x12\x10\n\x08outputId\x18\x01 \x01(\t\x12\x12\n\noutputName\x18\x02 \x01(\t\x12\x13\n\x0boutputValue\x18\x03 \x01(\t\"}\n\x13MatchedDecisionRule\x12\x0e\n\x06ruleId\x18\x01 \x01(\t\x12\x11\n\truleIndex\x18\x02 \x01(\x05\x12\x43\n\x10\x65valuatedOutputs\x18\x03 \x03(\x0b\x32).gateway_protocol.EvaluatedDecisionOutput\"U\n\x14\x44\x65ployProcessRequest\x12\x39\n\tprocesses\x18\x01 \x03(\x0b\x32&.gateway_protocol.ProcessRequestObject:\x02\x18\x01\"<\n\x14ProcessRequestObject\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ndefinition\x18\x02 \x01(\x0c:\x02\x18\x01\"^\n\x15\x44\x65ployProcessResponse\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x34\n\tprocesses\x18\x02 \x03(\x0b\x32!.gateway_protocol.ProcessMetadata:\x02\x18\x01\"X\n\x15\x44\x65ployResourceRequest\x12-\n\tresources\x18\x01 \x03(\x0b\x32\x1a.gateway_protocol.Resource\x12\x10\n\x08tenantId\x18\x02 \x01(\t\")\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"j\n\x16\x44\x65ployResourceResponse\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x31\n\x0b\x64\x65ployments\x18\x02 \x03(\x0b\x32\x1c.gateway_protocol.Deployment\x12\x10\n\x08tenantId\x18\x03 \x01(\t\"\x86\x02\n\nDeployment\x12\x34\n\x07process\x18\x01 \x01(\x0b\x32!.gateway_protocol.ProcessMetadataH\x00\x12\x36\n\x08\x64\x65\x63ision\x18\x02 \x01(\x0b\x32\".gateway_protocol.DecisionMetadataH\x00\x12N\n\x14\x64\x65\x63isionRequirements\x18\x03 \x01(\x0b\x32..gateway_protocol.DecisionRequirementsMetadataH\x00\x12.\n\x04\x66orm\x18\x04 \x01(\x0b\x32\x1e.gateway_protocol.FormMetadataH\x00\x42\n\n\x08Metadata\"\x7f\n\x0fProcessMetadata\x12\x15\n\rbpmnProcessId\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\x05\x12\x1c\n\x14processDefinitionKey\x18\x03 \x01(\x03\x12\x14\n\x0cresourceName\x18\x04 \x01(\t\x12\x10\n\x08tenantId\x18\x05 \x01(\t\"\xbe\x01\n\x10\x44\x65\x63isionMetadata\x12\x15\n\rdmnDecisionId\x18\x01 \x01(\t\x12\x17\n\x0f\x64mnDecisionName\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\x05\x12\x13\n\x0b\x64\x65\x63isionKey\x18\x04 \x01(\x03\x12!\n\x19\x64mnDecisionRequirementsId\x18\x05 \x01(\t\x12\x1f\n\x17\x64\x65\x63isionRequirementsKey\x18\x06 \x01(\x03\x12\x10\n\x08tenantId\x18\x07 \x01(\t\"\xc0\x01\n\x1c\x44\x65\x63isionRequirementsMetadata\x12!\n\x19\x64mnDecisionRequirementsId\x18\x01 \x01(\t\x12#\n\x1b\x64mnDecisionRequirementsName\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\x05\x12\x1f\n\x17\x64\x65\x63isionRequirementsKey\x18\x04 \x01(\x03\x12\x14\n\x0cresourceName\x18\x05 \x01(\t\x12\x10\n\x08tenantId\x18\x06 \x01(\t\"h\n\x0c\x46ormMetadata\x12\x0e\n\x06\x66ormId\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\x05\x12\x0f\n\x07\x66ormKey\x18\x03 \x01(\x03\x12\x14\n\x0cresourceName\x18\x04 \x01(\t\x12\x10\n\x08tenantId\x18\x05 \x01(\t\"p\n\x0e\x46\x61ilJobRequest\x12\x0e\n\x06jobKey\x18\x01 \x01(\x03\x12\x0f\n\x07retries\x18\x02 \x01(\x05\x12\x14\n\x0c\x65rrorMessage\x18\x03 \x01(\t\x12\x14\n\x0cretryBackOff\x18\x04 \x01(\x03\x12\x11\n\tvariables\x18\x05 \x01(\t\"\x11\n\x0f\x46\x61ilJobResponse\"_\n\x11ThrowErrorRequest\x12\x0e\n\x06jobKey\x18\x01 \x01(\x03\x12\x11\n\terrorCode\x18\x02 \x01(\t\x12\x14\n\x0c\x65rrorMessage\x18\x03 \x01(\t\x12\x11\n\tvariables\x18\x04 \x01(\t\"\x14\n\x12ThrowErrorResponse\"\x89\x01\n\x15PublishMessageRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\x0e\x63orrelationKey\x18\x02 \x01(\t\x12\x12\n\ntimeToLive\x18\x03 \x01(\x03\x12\x11\n\tmessageId\x18\x04 \x01(\t\x12\x11\n\tvariables\x18\x05 \x01(\t\x12\x10\n\x08tenantId\x18\x06 \x01(\t\"7\n\x16PublishMessageResponse\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x10\n\x08tenantId\x18\x02 \x01(\t\"-\n\x16ResolveIncidentRequest\x12\x13\n\x0bincidentKey\x18\x01 \x01(\x03\"\x19\n\x17ResolveIncidentResponse\"\x11\n\x0fTopologyRequest\"\xa2\x01\n\x10TopologyResponse\x12-\n\x07\x62rokers\x18\x01 \x03(\x0b\x32\x1c.gateway_protocol.BrokerInfo\x12\x13\n\x0b\x63lusterSize\x18\x02 \x01(\x05\x12\x17\n\x0fpartitionsCount\x18\x03 \x01(\x05\x12\x19\n\x11replicationFactor\x18\x04 \x01(\x05\x12\x16\n\x0egatewayVersion\x18\x05 \x01(\t\"z\n\nBrokerInfo\x12\x0e\n\x06nodeId\x18\x01 \x01(\x05\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\x05\x12/\n\npartitions\x18\x04 \x03(\x0b\x32\x1b.gateway_protocol.Partition\x12\x0f\n\x07version\x18\x05 \x01(\t\"\xa0\x02\n\tPartition\x12\x13\n\x0bpartitionId\x18\x01 \x01(\x05\x12=\n\x04role\x18\x02 \x01(\x0e\x32/.gateway_protocol.Partition.PartitionBrokerRole\x12\x41\n\x06health\x18\x03 \x01(\x0e\x32\x31.gateway_protocol.Partition.PartitionBrokerHealth\"=\n\x13PartitionBrokerRole\x12\n\n\x06LEADER\x10\x00\x12\x0c\n\x08\x46OLLOWER\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"=\n\x15PartitionBrokerHealth\x12\x0b\n\x07HEALTHY\x10\x00\x12\r\n\tUNHEALTHY\x10\x01\x12\x08\n\x04\x44\x45\x41\x44\x10\x02\":\n\x17UpdateJobRetriesRequest\x12\x0e\n\x06jobKey\x18\x01 \x01(\x03\x12\x0f\n\x07retries\x18\x02 \x01(\x05\"\x1a\n\x18UpdateJobRetriesResponse\":\n\x17UpdateJobTimeoutRequest\x12\x0e\n\x06jobKey\x18\x01 \x01(\x03\x12\x0f\n\x07timeout\x18\x02 \x01(\x03\"\x1a\n\x18UpdateJobTimeoutResponse\"S\n\x13SetVariablesRequest\x12\x1a\n\x12\x65lementInstanceKey\x18\x01 \x01(\x03\x12\x11\n\tvariables\x18\x02 \x01(\t\x12\r\n\x05local\x18\x03 \x01(\x08\"#\n\x14SetVariablesResponse\x12\x0b\n\x03key\x18\x01 \x01(\x03\"\xa0\x04\n\x1cModifyProcessInstanceRequest\x12\x1a\n\x12processInstanceKey\x18\x01 \x01(\x03\x12`\n\x14\x61\x63tivateInstructions\x18\x02 \x03(\x0b\x32\x42.gateway_protocol.ModifyProcessInstanceRequest.ActivateInstruction\x12\x62\n\x15terminateInstructions\x18\x03 \x03(\x0b\x32\x43.gateway_protocol.ModifyProcessInstanceRequest.TerminateInstruction\x1a\xae\x01\n\x13\x41\x63tivateInstruction\x12\x11\n\telementId\x18\x01 \x01(\t\x12\"\n\x1a\x61ncestorElementInstanceKey\x18\x02 \x01(\x03\x12`\n\x14variableInstructions\x18\x03 \x03(\x0b\x32\x42.gateway_protocol.ModifyProcessInstanceRequest.VariableInstruction\x1a\x39\n\x13VariableInstruction\x12\x11\n\tvariables\x18\x01 \x01(\t\x12\x0f\n\x07scopeId\x18\x02 \x01(\t\x1a\x32\n\x14TerminateInstruction\x12\x1a\n\x12\x65lementInstanceKey\x18\x01 \x01(\x03\"\x1f\n\x1dModifyProcessInstanceResponse\"\xf0\x02\n\x1dMigrateProcessInstanceRequest\x12\x1a\n\x12processInstanceKey\x18\x01 \x01(\x03\x12T\n\rmigrationPlan\x18\x02 \x01(\x0b\x32=.gateway_protocol.MigrateProcessInstanceRequest.MigrationPlan\x1a\x94\x01\n\rMigrationPlan\x12\"\n\x1atargetProcessDefinitionKey\x18\x01 \x01(\x03\x12_\n\x13mappingInstructions\x18\x02 \x03(\x0b\x32\x42.gateway_protocol.MigrateProcessInstanceRequest.MappingInstruction\x1a\x46\n\x12MappingInstruction\x12\x17\n\x0fsourceElementId\x18\x01 \x01(\t\x12\x17\n\x0ftargetElementId\x18\x02 \x01(\t\" \n\x1eMigrateProcessInstanceResponse\",\n\x15\x44\x65leteResourceRequest\x12\x13\n\x0bresourceKey\x18\x01 \x01(\x03\"\x18\n\x16\x44\x65leteResourceResponse\"Q\n\x16\x42roadcastSignalRequest\x12\x12\n\nsignalName\x18\x01 \x01(\t\x12\x11\n\tvariables\x18\x02 \x01(\t\x12\x10\n\x08tenantId\x18\x03 \x01(\t\"8\n\x17\x42roadcastSignalResponse\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x10\n\x08tenantId\x18\x02 \x01(\t2\xdb\x11\n\x07Gateway\x12\x61\n\x0c\x41\x63tivateJobs\x12%.gateway_protocol.ActivateJobsRequest\x1a&.gateway_protocol.ActivateJobsResponse\"\x00\x30\x01\x12g\n\x13StreamActivatedJobs\x12,.gateway_protocol.StreamActivatedJobsRequest\x1a\x1e.gateway_protocol.ActivatedJob\"\x00\x30\x01\x12z\n\x15\x43\x61ncelProcessInstance\x12..gateway_protocol.CancelProcessInstanceRequest\x1a/.gateway_protocol.CancelProcessInstanceResponse\"\x00\x12\\\n\x0b\x43ompleteJob\x12$.gateway_protocol.CompleteJobRequest\x1a%.gateway_protocol.CompleteJobResponse\"\x00\x12z\n\x15\x43reateProcessInstance\x12..gateway_protocol.CreateProcessInstanceRequest\x1a/.gateway_protocol.CreateProcessInstanceResponse\"\x00\x12\x98\x01\n\x1f\x43reateProcessInstanceWithResult\x12\x38.gateway_protocol.CreateProcessInstanceWithResultRequest\x1a\x39.gateway_protocol.CreateProcessInstanceWithResultResponse\"\x00\x12k\n\x10\x45valuateDecision\x12).gateway_protocol.EvaluateDecisionRequest\x1a*.gateway_protocol.EvaluateDecisionResponse\"\x00\x12\x65\n\rDeployProcess\x12&.gateway_protocol.DeployProcessRequest\x1a\'.gateway_protocol.DeployProcessResponse\"\x03\x88\x02\x01\x12\x65\n\x0e\x44\x65ployResource\x12\'.gateway_protocol.DeployResourceRequest\x1a(.gateway_protocol.DeployResourceResponse\"\x00\x12P\n\x07\x46\x61ilJob\x12 .gateway_protocol.FailJobRequest\x1a!.gateway_protocol.FailJobResponse\"\x00\x12Y\n\nThrowError\x12#.gateway_protocol.ThrowErrorRequest\x1a$.gateway_protocol.ThrowErrorResponse\"\x00\x12\x65\n\x0ePublishMessage\x12\'.gateway_protocol.PublishMessageRequest\x1a(.gateway_protocol.PublishMessageResponse\"\x00\x12h\n\x0fResolveIncident\x12(.gateway_protocol.ResolveIncidentRequest\x1a).gateway_protocol.ResolveIncidentResponse\"\x00\x12_\n\x0cSetVariables\x12%.gateway_protocol.SetVariablesRequest\x1a&.gateway_protocol.SetVariablesResponse\"\x00\x12S\n\x08Topology\x12!.gateway_protocol.TopologyRequest\x1a\".gateway_protocol.TopologyResponse\"\x00\x12k\n\x10UpdateJobRetries\x12).gateway_protocol.UpdateJobRetriesRequest\x1a*.gateway_protocol.UpdateJobRetriesResponse\"\x00\x12z\n\x15ModifyProcessInstance\x12..gateway_protocol.ModifyProcessInstanceRequest\x1a/.gateway_protocol.ModifyProcessInstanceResponse\"\x00\x12}\n\x16MigrateProcessInstance\x12/.gateway_protocol.MigrateProcessInstanceRequest\x1a\x30.gateway_protocol.MigrateProcessInstanceResponse\"\x00\x12k\n\x10UpdateJobTimeout\x12).gateway_protocol.UpdateJobTimeoutRequest\x1a*.gateway_protocol.UpdateJobTimeoutResponse\"\x00\x12\x65\n\x0e\x44\x65leteResource\x12\'.gateway_protocol.DeleteResourceRequest\x1a(.gateway_protocol.DeleteResourceResponse\"\x00\x12h\n\x0f\x42roadcastSignal\x12(.gateway_protocol.BroadcastSignalRequest\x1a).gateway_protocol.BroadcastSignalResponse\"\x00\x42,\n!io.camunda.zeebe.gateway.protocolP\x00Z\x05./;pbb\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -32,6 +32,7 @@ end module Zeebe::Client::GatewayProtocol + StreamActivatedJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.StreamActivatedJobsRequest").msgclass ActivateJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ActivateJobsRequest").msgclass ActivateJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ActivateJobsResponse").msgclass ActivatedJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ActivatedJob").msgclass @@ -60,6 +61,7 @@ module Zeebe::Client::GatewayProtocol ProcessMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ProcessMetadata").msgclass DecisionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.DecisionMetadata").msgclass DecisionRequirementsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.DecisionRequirementsMetadata").msgclass + FormMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.FormMetadata").msgclass FailJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.FailJobRequest").msgclass FailJobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.FailJobResponse").msgclass ThrowErrorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ThrowErrorRequest").msgclass @@ -76,6 +78,8 @@ module Zeebe::Client::GatewayProtocol Partition::PartitionBrokerHealth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.Partition.PartitionBrokerHealth").enummodule UpdateJobRetriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateJobRetriesRequest").msgclass UpdateJobRetriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateJobRetriesResponse").msgclass + UpdateJobTimeoutRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateJobTimeoutRequest").msgclass + UpdateJobTimeoutResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateJobTimeoutResponse").msgclass SetVariablesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.SetVariablesRequest").msgclass SetVariablesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.SetVariablesResponse").msgclass ModifyProcessInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ModifyProcessInstanceRequest").msgclass @@ -83,6 +87,10 @@ module Zeebe::Client::GatewayProtocol ModifyProcessInstanceRequest::VariableInstruction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ModifyProcessInstanceRequest.VariableInstruction").msgclass ModifyProcessInstanceRequest::TerminateInstruction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ModifyProcessInstanceRequest.TerminateInstruction").msgclass ModifyProcessInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.ModifyProcessInstanceResponse").msgclass + MigrateProcessInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.MigrateProcessInstanceRequest").msgclass + MigrateProcessInstanceRequest::MigrationPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.MigrateProcessInstanceRequest.MigrationPlan").msgclass + MigrateProcessInstanceRequest::MappingInstruction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.MigrateProcessInstanceRequest.MappingInstruction").msgclass + MigrateProcessInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.MigrateProcessInstanceResponse").msgclass DeleteResourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.DeleteResourceRequest").msgclass DeleteResourceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.DeleteResourceResponse").msgclass BroadcastSignalRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.BroadcastSignalRequest").msgclass diff --git a/lib/zeebe/client/proto/gateway_services_pb.rb b/lib/zeebe/client/proto/gateway_services_pb.rb index 8a053ac..0ce63fb 100644 --- a/lib/zeebe/client/proto/gateway_services_pb.rb +++ b/lib/zeebe/client/proto/gateway_services_pb.rb @@ -26,6 +26,15 @@ class Service # - maxJobsToActivate is less than 1 rpc :ActivateJobs, ::Zeebe::Client::GatewayProtocol::ActivateJobsRequest, stream(::Zeebe::Client::GatewayProtocol::ActivateJobsResponse) # + # Registers client to a job stream that will stream jobs back to the client as + # they become activatable. + # + # Errors: + # INVALID_ARGUMENT: + # - type is blank (empty string, null) + # - timeout less than 1 + rpc :StreamActivatedJobs, ::Zeebe::Client::GatewayProtocol::StreamActivatedJobsRequest, stream(::Zeebe::Client::GatewayProtocol::ActivatedJob) + # # Cancels a running process instance # # Errors: @@ -96,11 +105,17 @@ class Service # Note that this is an atomic call, i.e. either all resources are deployed, or none of them are. # # Errors: + # PERMISSION_DENIED: + # - if a deployment to an unauthorized tenant is performed # INVALID_ARGUMENT: # - no resources given. # - if at least one resource is invalid. A resource is considered invalid if: # - the content is not deserializable (e.g. detected as BPMN, but it's broken XML) # - the content is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task) + # - if multi-tenancy is enabled, and: + # - a tenant id is not provided + # - a tenant id with an invalid format is provided + # - if multi-tenancy is disabled and a tenant id is provided rpc :DeployResource, ::Zeebe::Client::GatewayProtocol::DeployResourceRequest, ::Zeebe::Client::GatewayProtocol::DeployResourceResponse # # Marks the job as failed; if the retries argument is positive, then the job will be immediately @@ -184,6 +199,40 @@ class Service # - scope of variable is unknown rpc :ModifyProcessInstance, ::Zeebe::Client::GatewayProtocol::ModifyProcessInstanceRequest, ::Zeebe::Client::GatewayProtocol::ModifyProcessInstanceResponse # + # Migrates the process instance to the specified process definition. + # In simple terms, this is handled by updating the active element's process. + # + # Errors: + # NOT_FOUND: + # - no process instance exists with the given key, or it is not active + # - no process definition exists with the given target definition key + # - no process instance exists with the given key for the tenants the user is authorized to work with. + # + # FAILED_PRECONDITION: + # - not all active elements in the given process instance are mapped to the elements in the target process definition + # - a mapping instruction changes the type of an element or event + # - a mapping instruction refers to an unsupported element (i.e. some elements will be supported later on) + # - a mapping instruction refers to element in unsupported scenarios. + # (i.e. migration is not supported when process instance or target process elements contains event subscriptions) + # + # INVALID_ARGUMENT: + # - A `sourceElementId` does not refer to an element in the process instance's process definition + # - A `targetElementId` does not refer to an element in the target process definition + # - A `sourceElementId` is mapped by multiple mapping instructions. + # For example, the engine cannot determine how to migrate a process instance when the instructions are: [A->B, A->C]. + rpc :MigrateProcessInstance, ::Zeebe::Client::GatewayProtocol::MigrateProcessInstanceRequest, ::Zeebe::Client::GatewayProtocol::MigrateProcessInstanceResponse + # + # Updates the deadline of a job using the timeout (in ms) provided. This can be used + # for extending or shortening the job deadline. + # + # Errors: + # NOT_FOUND: + # - no job exists with the given key + # + # INVALID_STATE: + # - no deadline exists for the given job key + rpc :UpdateJobTimeout, ::Zeebe::Client::GatewayProtocol::UpdateJobTimeoutRequest, ::Zeebe::Client::GatewayProtocol::UpdateJobTimeoutResponse + # # Deletes a resource from the state. Once a resource has been deleted it cannot # be recovered. If the resource needs to be available again, a new deployment # of the resource is required. diff --git a/lib/zeebe/client/version.rb b/lib/zeebe/client/version.rb index 30e63a7..dca97b0 100644 --- a/lib/zeebe/client/version.rb +++ b/lib/zeebe/client/version.rb @@ -1,6 +1,6 @@ module Zeebe module Client - VERSION = '0.19.0'.freeze + VERSION = '0.20.0'.freeze end end diff --git a/proto/gateway.proto b/proto/gateway.proto index 5018582..3627eb0 100644 --- a/proto/gateway.proto +++ b/proto/gateway.proto @@ -8,6 +8,22 @@ option go_package = "./;pb"; // For a more complete documentation, refer to Zeebe documentation at: // https://docs.camunda.io/docs/reference/grpc +message StreamActivatedJobsRequest { + // the job type, as defined in the BPMN process (e.g. ) + string type = 1; + // the name of the worker activating the jobs, mostly used for logging purposes + string worker = 2; + // a job returned after this call will not be activated by another call until the + // timeout (in ms) has been reached + int64 timeout = 3; + // a list of variables to fetch as the job variables; if empty, all visible variables at + // the time of activation for the scope of the job will be returned + repeated string fetchVariable = 5; + // a list of identifiers of tenants for which to stream jobs + repeated string tenantIds = 6; +} + message ActivateJobsRequest { // the job type, as defined in the BPMN process (e.g. ) @@ -26,6 +42,8 @@ message ActivateJobsRequest { // if the requestTimeout = 0, a default timeout is used. // if the requestTimeout < 0, long polling is disabled and the request is completed immediately, even when no job is activated. int64 requestTimeout = 6; + // a list of IDs of tenants for which to activate jobs + repeated string tenantIds = 7; } message ActivateJobsResponse { @@ -63,6 +81,8 @@ message ActivatedJob { // JSON document, computed at activation time, consisting of all visible variables to // the task scope string variables = 13; + // the id of the tenant that owns the job + string tenantId = 14; } message CancelProcessInstanceRequest { @@ -102,6 +122,8 @@ message CreateProcessInstanceRequest { // will start at the start event. If non-empty the process instance will apply start // instructions after it has been created repeated ProcessInstanceCreationStartInstruction startInstructions = 5; + // the tenant id of the process definition + string tenantId = 6; } message ProcessInstanceCreationStartInstruction { @@ -128,6 +150,8 @@ message CreateProcessInstanceResponse { // the unique identifier of the created process instance; to be used wherever a request // needs a process instance key (e.g. CancelProcessInstanceRequest) int64 processInstanceKey = 4; + // the tenant identifier of the created process instance + string tenantId = 5; } message CreateProcessInstanceWithResultRequest { @@ -155,6 +179,8 @@ message CreateProcessInstanceWithResultResponse { // JSON document // consists of visible variables in the root scope string variables = 5; + // the tenant identifier of the process definition + string tenantId = 6; } message EvaluateDecisionRequest { @@ -170,6 +196,8 @@ message EvaluateDecisionRequest { // [{ "a": 1, "b": 2 }] would not be a valid argument, as the root of the // JSON document is an array and not an object. string variables = 3; + // the tenant identifier of the decision + string tenantId = 4; } message EvaluateDecisionResponse { @@ -199,6 +227,8 @@ message EvaluateDecisionResponse { string failedDecisionId = 9; // an optional message describing why the decision which was evaluated failed string failureMessage = 10; + // the tenant identifier of the evaluated decision + string tenantId = 11; } message EvaluatedDecision { @@ -221,6 +251,8 @@ message EvaluatedDecision { repeated MatchedDecisionRule matchedRules = 7; // the decision inputs that were evaluated within this decision evaluation repeated EvaluatedDecisionInput evaluatedInputs = 8; + // the tenant identifier of the evaluated decision + string tenantId = 9; } message EvaluatedDecisionInput { @@ -278,6 +310,8 @@ message DeployProcessResponse { message DeployResourceRequest { // list of resources to deploy repeated Resource resources = 1; + // the tenant id of the resources to deploy + string tenantId = 2; } message Resource { @@ -292,6 +326,8 @@ message DeployResourceResponse { int64 key = 1; // a list of deployed resources, e.g. processes repeated Deployment deployments = 2; + // the tenant id of the deployed resources + string tenantId = 3; } message Deployment { @@ -303,6 +339,8 @@ message Deployment { DecisionMetadata decision = 2; // metadata of a deployed decision requirements DecisionRequirementsMetadata decisionRequirements = 3; + // metadata of a deployed form + FormMetadata form = 4; } } @@ -317,6 +355,8 @@ message ProcessMetadata { // the resource name (see: ProcessRequestObject.name) from which this process was // parsed string resourceName = 4; + // the tenant id of the deployed process + string tenantId = 5; } message DecisionMetadata { @@ -336,6 +376,8 @@ message DecisionMetadata { // the assigned key of the decision requirements graph that this decision is // part of int64 decisionRequirementsKey = 6; + // the tenant id of the deployed decision + string tenantId = 7; } message DecisionRequirementsMetadata { @@ -352,6 +394,22 @@ message DecisionRequirementsMetadata { // the resource name (see: Resource.name) from which this decision // requirements was parsed string resourceName = 5; + // the tenant id of the deployed decision requirements + string tenantId = 6; +} + +message FormMetadata { + // the form ID, as parsed during deployment; together with the + // versions forms a unique identifier for a specific form + string formId = 1; + // the assigned form version + int32 version = 2; + // the assigned key, which acts as a unique identifier for this form + int64 formKey = 3; + // the resource name + string resourceName = 4; + // the tenant id of the deployed form + string tenantId = 5; } message FailJobRequest { @@ -407,11 +465,15 @@ message PublishMessageRequest { // the message variables as a JSON document; to be valid, the root of the document must be an // object, e.g. { "a": "foo" }. [ "foo" ] would not be valid. string variables = 5; + // the tenant id of the message + string tenantId = 6; } message PublishMessageResponse { // the unique ID of the message that was published int64 key = 1; + // the tenant id of the message + string tenantId = 2; } message ResolveIncidentRequest { @@ -484,6 +546,16 @@ message UpdateJobRetriesRequest { message UpdateJobRetriesResponse { } +message UpdateJobTimeoutRequest { + // the unique job identifier, as obtained from ActivateJobsResponse + int64 jobKey = 1; + // the duration of the new timeout in ms, starting from the current moment + int64 timeout = 2; +} + +message UpdateJobTimeoutResponse { +} + message SetVariablesRequest { // the unique identifier of a particular element; can be the process instance key (as // obtained during instance creation), or a given element, such as a service task (see @@ -549,9 +621,34 @@ message ModifyProcessInstanceResponse { } +message MigrateProcessInstanceRequest { + // key of the process instance to migrate + int64 processInstanceKey = 1; + // the migration plan that defines target process and element mappings + MigrationPlan migrationPlan = 2; + + message MigrationPlan { + // the key of process definition to migrate the process instance to + int64 targetProcessDefinitionKey = 1; + // the mapping instructions describe how to map elements from the source process definition to the target process definition + repeated MappingInstruction mappingInstructions = 2; + } + + message MappingInstruction { + // the element id to migrate from + string sourceElementId = 1; + // the element id to migrate into + string targetElementId = 2; + } +} + +message MigrateProcessInstanceResponse { + +} + message DeleteResourceRequest { // The key of the resource that should be deleted. This can either be the key - // of a process definition, or the key of a decision requirements definition. + // of a process definition, the key of a decision requirements definition or the key of a form. int64 resourceKey = 1; } @@ -562,15 +659,18 @@ message DeleteResourceResponse { message BroadcastSignalRequest { // The name of the signal string signalName = 1; - // the signal variables as a JSON document; to be valid, the root of the document must be an // object, e.g. { "a": "foo" }. [ "foo" ] would not be valid. string variables = 2; + // the id of the tenant that owns the signal. + string tenantId = 3; } message BroadcastSignalResponse { // the unique ID of the signal that was broadcasted. int64 key = 1; + // the tenant id of the signal that was broadcasted. + string tenantId = 2; } service Gateway { @@ -588,6 +688,18 @@ service Gateway { rpc ActivateJobs (ActivateJobsRequest) returns (stream ActivateJobsResponse) { } + /* + Registers client to a job stream that will stream jobs back to the client as + they become activatable. + + Errors: + INVALID_ARGUMENT: + - type is blank (empty string, null) + - timeout less than 1 + */ + rpc StreamActivatedJobs (StreamActivatedJobsRequest) returns (stream ActivatedJob) { + } + /* Cancels a running process instance @@ -679,11 +791,17 @@ service Gateway { Note that this is an atomic call, i.e. either all resources are deployed, or none of them are. Errors: + PERMISSION_DENIED: + - if a deployment to an unauthorized tenant is performed INVALID_ARGUMENT: - no resources given. - if at least one resource is invalid. A resource is considered invalid if: - the content is not deserializable (e.g. detected as BPMN, but it's broken XML) - the content is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task) + - if multi-tenancy is enabled, and: + - a tenant id is not provided + - a tenant id with an invalid format is provided + - if multi-tenancy is disabled and a tenant id is provided */ rpc DeployResource (DeployResourceRequest) returns (DeployResourceResponse) { } @@ -795,6 +913,47 @@ service Gateway { } + /* + Migrates the process instance to the specified process definition. + In simple terms, this is handled by updating the active element's process. + + Errors: + NOT_FOUND: + - no process instance exists with the given key, or it is not active + - no process definition exists with the given target definition key + - no process instance exists with the given key for the tenants the user is authorized to work with. + + FAILED_PRECONDITION: + - not all active elements in the given process instance are mapped to the elements in the target process definition + - a mapping instruction changes the type of an element or event + - a mapping instruction refers to an unsupported element (i.e. some elements will be supported later on) + - a mapping instruction refers to element in unsupported scenarios. + (i.e. migration is not supported when process instance or target process elements contains event subscriptions) + + INVALID_ARGUMENT: + - A `sourceElementId` does not refer to an element in the process instance's process definition + - A `targetElementId` does not refer to an element in the target process definition + - A `sourceElementId` is mapped by multiple mapping instructions. + For example, the engine cannot determine how to migrate a process instance when the instructions are: [A->B, A->C]. + */ + rpc MigrateProcessInstance (MigrateProcessInstanceRequest) returns (MigrateProcessInstanceResponse) { + + } + + /* + Updates the deadline of a job using the timeout (in ms) provided. This can be used + for extending or shortening the job deadline. + + Errors: + NOT_FOUND: + - no job exists with the given key + + INVALID_STATE: + - no deadline exists for the given job key + */ + rpc UpdateJobTimeout (UpdateJobTimeoutRequest) returns (UpdateJobTimeoutResponse) { + } + /* Deletes a resource from the state. Once a resource has been deleted it cannot be recovered. If the resource needs to be available again, a new deployment