proto/gateway.proto in zeebe-client-0.18.0 vs proto/gateway.proto in zeebe-client-0.19.0
- old
+ new
@@ -153,13 +153,105 @@
// needs a process instance key (e.g. CancelProcessInstanceRequest)
int64 processInstanceKey = 4;
// JSON document
// consists of visible variables in the root scope
string variables = 5;
+}
+message EvaluateDecisionRequest {
+ // the unique key identifying the decision to be evaluated (e.g. returned
+ // from a decision in the DeployResourceResponse message)
+ int64 decisionKey = 1;
+ // the ID of the decision to be evaluated
+ string decisionId = 2;
+ // JSON document that will instantiate the variables for the decision to be
+ // evaluated; it must be a JSON object, as variables will be mapped in a
+ // key-value fashion, e.g. { "a": 1, "b": 2 } will create two variables,
+ // named "a" and "b" respectively, with their associated values.
+ // [{ "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;
}
+message EvaluateDecisionResponse {
+ // the unique key identifying the decision which was evaluated (e.g. returned
+ // from a decision in the DeployResourceResponse message)
+ int64 decisionKey = 1;
+ // the ID of the decision which was evaluated
+ string decisionId = 2;
+ // the name of the decision which was evaluated
+ string decisionName = 3;
+ // the version of the decision which was evaluated
+ int32 decisionVersion = 4;
+ // the ID of the decision requirements graph that the decision which was
+ // evaluated is part of.
+ string decisionRequirementsId = 5;
+ // the unique key identifying the decision requirements graph that the
+ // decision which was evaluated is part of.
+ int64 decisionRequirementsKey = 6;
+ // JSON document that will instantiate the result of the decision which was
+ // evaluated; it will be a JSON object, as the result output will be mapped
+ // in a key-value fashion, e.g. { "a": 1 }.
+ string decisionOutput = 7;
+ // a list of decisions that were evaluated within the requested decision evaluation
+ repeated EvaluatedDecision evaluatedDecisions = 8;
+ // an optional string indicating the ID of the decision which
+ // failed during evaluation
+ string failedDecisionId = 9;
+ // an optional message describing why the decision which was evaluated failed
+ string failureMessage = 10;
+}
+
+message EvaluatedDecision {
+ // the unique key identifying the decision which was evaluated (e.g. returned
+ // from a decision in the DeployResourceResponse message)
+ int64 decisionKey = 1;
+ // the ID of the decision which was evaluated
+ string decisionId = 2;
+ // the name of the decision which was evaluated
+ string decisionName = 3;
+ // the version of the decision which was evaluated
+ int32 decisionVersion = 4;
+ // the type of the decision which was evaluated
+ string decisionType = 5;
+ // JSON document that will instantiate the result of the decision which was
+ // evaluated; it will be a JSON object, as the result output will be mapped
+ // in a key-value fashion, e.g. { "a": 1 }.
+ string decisionOutput = 6;
+ // the decision rules that matched within this decision evaluation
+ repeated MatchedDecisionRule matchedRules = 7;
+ // the decision inputs that were evaluated within this decision evaluation
+ repeated EvaluatedDecisionInput evaluatedInputs = 8;
+}
+
+message EvaluatedDecisionInput {
+ // the id of the evaluated decision input
+ string inputId = 1;
+ // the name of the evaluated decision input
+ string inputName = 2;
+ // the value of the evaluated decision input
+ string inputValue = 3;
+}
+
+message EvaluatedDecisionOutput {
+ // the id of the evaluated decision output
+ string outputId = 1;
+ // the name of the evaluated decision output
+ string outputName = 2;
+ // the value of the evaluated decision output
+ string outputValue = 3;
+}
+
+message MatchedDecisionRule {
+ // the id of the matched rule
+ string ruleId = 1;
+ // the index of the matched rule
+ int32 ruleIndex = 2;
+ // the evaluated decision outputs
+ repeated EvaluatedDecisionOutput evaluatedOutputs = 3;
+}
+
message DeployProcessRequest {
// since 8, replaced by DeployResourceRequest
option deprecated = true;
// List of process resources to deploy
repeated ProcessRequestObject processes = 1;
@@ -271,10 +363,16 @@
// this is particularly useful if a job runs out of retries and an incident is raised,
// as it this message can help explain why an incident was raised
string errorMessage = 3;
// the backoff timeout (in ms) for the next retry
int64 retryBackOff = 4;
+ // JSON document that will instantiate the variables at the local scope of the
+ // job's associated task; it must be a JSON object, as variables will be mapped in a
+ // key-value fashion. e.g. { "a": 1, "b": 2 } will create two variables, named "a" and
+ // "b" respectively, with their associated values. [{ "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 = 5;
}
message FailJobResponse {
}
@@ -283,10 +381,16 @@
int64 jobKey = 1;
// the error code that will be matched with an error catch event
string errorCode = 2;
// an optional error message that provides additional context
string errorMessage = 3;
+ // JSON document that will instantiate the variables at the local scope of the
+ // error catch event that catches the thrown error; it must be a JSON object, as variables will be mapped in a
+ // key-value fashion. e.g. { "a": 1, "b": 2 } will create two variables, named "a" and
+ // "b" respectively, with their associated values. [{ "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 = 4;
}
message ThrowErrorResponse {
}
@@ -443,10 +547,34 @@
message ModifyProcessInstanceResponse {
}
+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.
+ int64 resourceKey = 1;
+}
+
+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;
+}
+
+message BroadcastSignalResponse {
+ // the unique ID of the signal that was broadcasted.
+ int64 key = 1;
+}
+
service Gateway {
/*
Iterates through all known partitions round-robin and activates up to the requested
maximum and streams them back to the client as they are activated.
@@ -514,10 +642,25 @@
*/
rpc CreateProcessInstanceWithResult (CreateProcessInstanceWithResultRequest) returns (CreateProcessInstanceWithResultResponse) {
}
/*
+ Evaluates a decision. The decision to evaluate can be specified either by
+ using its unique key (as returned by DeployResource), or using the decision
+ ID. When using the decision ID, the latest deployed version of the decision
+ is used.
+
+ Errors:
+ INVALID_ARGUMENT:
+ - no decision with the given key exists (if decisionKey was given)
+ - no decision with the given decision ID exists (if decisionId was given)
+ - both decision ID and decision KEY were provided, or are missing
+ */
+ rpc EvaluateDecision (EvaluateDecisionRequest) returns (EvaluateDecisionResponse) {
+ }
+
+ /*
Deploys one or more processes to Zeebe. Note that this is an atomic call,
i.e. either all processes are deployed, or none of them are.
Errors:
INVALID_ARGUMENT:
@@ -647,8 +790,40 @@
- activating or terminating unknown element
- ancestor of element for activation doesn't exist
- scope of variable is unknown
*/
rpc ModifyProcessInstance (ModifyProcessInstanceRequest) returns (ModifyProcessInstanceResponse) {
+
+ }
+
+ /*
+ 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.
+
+ Deleting a process will cancel any running instances of this process
+ definition. New instances of a deleted process are created using
+ the lastest version that hasn't been deleted. Creating a new
+ process instance is impossible when all versions have been
+ deleted.
+
+ Deleting a decision requirement definitions could cause incidents in process
+ instances referencing these decisions in a business rule task. A decision
+ will be evaluated with the latest version that hasn't been deleted. If all
+ versions of a decision have been deleted the evaluation is rejected.
+
+ Errors:
+ NOT_FOUND:
+ - No resource exists with the given key
+
+ */
+ rpc DeleteResource (DeleteResourceRequest) returns (DeleteResourceResponse) {
+
+ }
+
+ /*
+ Broadcasts a signal.
+ */
+ rpc BroadcastSignal (BroadcastSignalRequest) returns (BroadcastSignalResponse) {
}
}