Const GatewayService
GatewayService: { activateJobs: object; cancelProcessInstance: object; completeJob: object; createProcessInstance: object; createProcessInstanceWithResult: object; deployProcess: object; deployResource: object; failJob: object; modifyProcessInstance: object; publishMessage: object; resolveIncident: object; setVariables: object; throwError: object; topology: object; updateJobRetries: object } = {/*** 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.** Errors:* INVALID_ARGUMENT:* - type is blank (empty string, null)* - worker is blank (empty string, null)* - timeout less than 1* - maxJobsToActivate is less than 1*/activateJobs: {path: "/gateway_protocol.Gateway/ActivateJobs",requestStream: false,responseStream: true,requestSerialize: (value: ActivateJobsRequest) => Buffer.from(ActivateJobsRequest.encode(value).finish()),requestDeserialize: (value: Buffer) => ActivateJobsRequest.decode(value),responseSerialize: (value: ActivateJobsResponse) => Buffer.from(ActivateJobsResponse.encode(value).finish()),responseDeserialize: (value: Buffer) => ActivateJobsResponse.decode(value),},/*** Cancels a running process instance** Errors:* NOT_FOUND:* - no process instance exists with the given key*/cancelProcessInstance: {path: "/gateway_protocol.Gateway/CancelProcessInstance",requestStream: false,responseStream: false,requestSerialize: (value: CancelProcessInstanceRequest) =>Buffer.from(CancelProcessInstanceRequest.encode(value).finish()),requestDeserialize: (value: Buffer) => CancelProcessInstanceRequest.decode(value),responseSerialize: (value: CancelProcessInstanceResponse) =>Buffer.from(CancelProcessInstanceResponse.encode(value).finish()),responseDeserialize: (value: Buffer) => CancelProcessInstanceResponse.decode(value),},/*** Completes a job with the given variables, which allows completing the associated service task.** Errors:* NOT_FOUND:* - no job exists with the given job key. Note that since jobs are removed once completed,* it could be that this job did exist at some point.** FAILED_PRECONDITION:* - the job was marked as failed. In that case, the related incident must be resolved before* the job can be activated again and completed.*/completeJob: {path: "/gateway_protocol.Gateway/CompleteJob",requestStream: false,responseStream: false,requestSerialize: (value: CompleteJobRequest) => Buffer.from(CompleteJobRequest.encode(value).finish()),requestDeserialize: (value: Buffer) => CompleteJobRequest.decode(value),responseSerialize: (value: CompleteJobResponse) => Buffer.from(CompleteJobResponse.encode(value).finish()),responseDeserialize: (value: Buffer) => CompleteJobResponse.decode(value),},/*** Creates and starts an instance of the specified process. The process definition to use to* create the instance can be specified either using its unique key (as returned by* DeployProcess), or using the BPMN process ID and a version. Pass -1 as the version to use the* latest deployed version. Note that only processes with none start events can be started through* this command.** Errors:* NOT_FOUND:* - no process with the given key exists (if processDefinitionKey was given)* - no process with the given process ID exists (if bpmnProcessId was given but version was -1)* - no process with the given process ID and version exists (if both bpmnProcessId and version were given)** FAILED_PRECONDITION:* - the process definition does not contain a none start event; only processes with none* start event can be started manually.** INVALID_ARGUMENT:* - the given variables argument is not a valid JSON document; it is expected to be a valid* JSON document where the root node is an object.*/createProcessInstance: {path: "/gateway_protocol.Gateway/CreateProcessInstance",requestStream: false,responseStream: false,requestSerialize: (value: CreateProcessInstanceRequest) =>Buffer.from(CreateProcessInstanceRequest.encode(value).finish()),requestDeserialize: (value: Buffer) => CreateProcessInstanceRequest.decode(value),responseSerialize: (value: CreateProcessInstanceResponse) =>Buffer.from(CreateProcessInstanceResponse.encode(value).finish()),responseDeserialize: (value: Buffer) => CreateProcessInstanceResponse.decode(value),},/** Behaves similarly to `rpc CreateProcessInstance`, except that a successful response is received when the process completes successfully. */createProcessInstanceWithResult: {path: "/gateway_protocol.Gateway/CreateProcessInstanceWithResult",requestStream: false,responseStream: false,requestSerialize: (value: CreateProcessInstanceWithResultRequest) =>Buffer.from(CreateProcessInstanceWithResultRequest.encode(value).finish()),requestDeserialize: (value: Buffer) => CreateProcessInstanceWithResultRequest.decode(value),responseSerialize: (value: CreateProcessInstanceWithResultResponse) =>Buffer.from(CreateProcessInstanceWithResultResponse.encode(value).finish()),responseDeserialize: (value: Buffer) => CreateProcessInstanceWithResultResponse.decode(value),},/*** 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:* - no resources given.* - if at least one resource is invalid. A resource is considered invalid if:* - the resource data is not deserializable (e.g. detected as BPMN, but it's broken XML)* - the process is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task)** @deprecated*/deployProcess: {path: "/gateway_protocol.Gateway/DeployProcess",requestStream: false,responseStream: false,requestSerialize: (value: DeployProcessRequest) => Buffer.from(DeployProcessRequest.encode(value).finish()),requestDeserialize: (value: Buffer) => DeployProcessRequest.decode(value),responseSerialize: (value: DeployProcessResponse) => Buffer.from(DeployProcessResponse.encode(value).finish()),responseDeserialize: (value: Buffer) => DeployProcessResponse.decode(value),},/*** Deploys one or more resources (e.g. processes or decision models) to Zeebe.* Note that this is an atomic call, i.e. either all resources are deployed, or none of them are.** Errors:* 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)*/deployResource: {path: "/gateway_protocol.Gateway/DeployResource",requestStream: false,responseStream: false,requestSerialize: (value: DeployResourceRequest) => Buffer.from(DeployResourceRequest.encode(value).finish()),requestDeserialize: (value: Buffer) => DeployResourceRequest.decode(value),responseSerialize: (value: DeployResourceResponse) => Buffer.from(DeployResourceResponse.encode(value).finish()),responseDeserialize: (value: Buffer) => DeployResourceResponse.decode(value),},/*** Marks the job as failed; if the retries argument is positive, then the job will be immediately* activatable again, and a worker could try again to process it. If it is zero or negative however,* an incident will be raised, tagged with the given errorMessage, and the job will not be* activatable until the incident is resolved.** Errors:* NOT_FOUND:* - no job was found with the given key** FAILED_PRECONDITION:* - the job was not activated* - the job is already in a failed state, i.e. ran out of retries*/failJob: {path: "/gateway_protocol.Gateway/FailJob",requestStream: false,responseStream: false,requestSerialize: (value: FailJobRequest) => Buffer.from(FailJobRequest.encode(value).finish()),requestDeserialize: (value: Buffer) => FailJobRequest.decode(value),responseSerialize: (value: FailJobResponse) => Buffer.from(FailJobResponse.encode(value).finish()),responseDeserialize: (value: Buffer) => FailJobResponse.decode(value),},/*** Reports a business error (i.e. non-technical) that occurs while processing a job. The error is handled in the process by an error catch event. If there is no error catch event with the specified errorCode then an incident will be raised instead.** Errors:* NOT_FOUND:* - no job was found with the given key** FAILED_PRECONDITION:* - the job is not in an activated state*/throwError: {path: "/gateway_protocol.Gateway/ThrowError",requestStream: false,responseStream: false,requestSerialize: (value: ThrowErrorRequest) => Buffer.from(ThrowErrorRequest.encode(value).finish()),requestDeserialize: (value: Buffer) => ThrowErrorRequest.decode(value),responseSerialize: (value: ThrowErrorResponse) => Buffer.from(ThrowErrorResponse.encode(value).finish()),responseDeserialize: (value: Buffer) => ThrowErrorResponse.decode(value),},/*** Publishes a single message. Messages are published to specific partitions computed from their* correlation keys.** Errors:* ALREADY_EXISTS:* - a message with the same ID was previously published (and is still alive)*/publishMessage: {path: "/gateway_protocol.Gateway/PublishMessage",requestStream: false,responseStream: false,requestSerialize: (value: PublishMessageRequest) => Buffer.from(PublishMessageRequest.encode(value).finish()),requestDeserialize: (value: Buffer) => PublishMessageRequest.decode(value),responseSerialize: (value: PublishMessageResponse) => Buffer.from(PublishMessageResponse.encode(value).finish()),responseDeserialize: (value: Buffer) => PublishMessageResponse.decode(value),},/*** Resolves a given incident. This simply marks the incident as resolved; most likely a call to* UpdateJobRetries or SetVariables will be necessary to actually resolve the* problem, following by this call.** Errors:* NOT_FOUND:* - no incident with the given key exists*/resolveIncident: {path: "/gateway_protocol.Gateway/ResolveIncident",requestStream: false,responseStream: false,requestSerialize: (value: ResolveIncidentRequest) => Buffer.from(ResolveIncidentRequest.encode(value).finish()),requestDeserialize: (value: Buffer) => ResolveIncidentRequest.decode(value),responseSerialize: (value: ResolveIncidentResponse) => Buffer.from(ResolveIncidentResponse.encode(value).finish()),responseDeserialize: (value: Buffer) => ResolveIncidentResponse.decode(value),},/*** Updates all the variables of a particular scope (e.g. process instance, flow element instance)* from the given JSON document.** Errors:* NOT_FOUND:* - no element with the given elementInstanceKey exists* INVALID_ARGUMENT:* - the given variables document is not a valid JSON document; valid documents are expected to* be JSON documents where the root node is an object.*/setVariables: {path: "/gateway_protocol.Gateway/SetVariables",requestStream: false,responseStream: false,requestSerialize: (value: SetVariablesRequest) => Buffer.from(SetVariablesRequest.encode(value).finish()),requestDeserialize: (value: Buffer) => SetVariablesRequest.decode(value),responseSerialize: (value: SetVariablesResponse) => Buffer.from(SetVariablesResponse.encode(value).finish()),responseDeserialize: (value: Buffer) => SetVariablesResponse.decode(value),},/** Obtains the current topology of the cluster the gateway is part of. */topology: {path: "/gateway_protocol.Gateway/Topology",requestStream: false,responseStream: false,requestSerialize: (value: TopologyRequest) => Buffer.from(TopologyRequest.encode(value).finish()),requestDeserialize: (value: Buffer) => TopologyRequest.decode(value),responseSerialize: (value: TopologyResponse) => Buffer.from(TopologyResponse.encode(value).finish()),responseDeserialize: (value: Buffer) => TopologyResponse.decode(value),},/*** Updates the number of retries a job has left. This is mostly useful for jobs that have run out of* retries, should the underlying problem be solved.** Errors:* NOT_FOUND:* - no job exists with the given key** INVALID_ARGUMENT:* - retries is not greater than 0*/updateJobRetries: {path: "/gateway_protocol.Gateway/UpdateJobRetries",requestStream: false,responseStream: false,requestSerialize: (value: UpdateJobRetriesRequest) => Buffer.from(UpdateJobRetriesRequest.encode(value).finish()),requestDeserialize: (value: Buffer) => UpdateJobRetriesRequest.decode(value),responseSerialize: (value: UpdateJobRetriesResponse) =>Buffer.from(UpdateJobRetriesResponse.encode(value).finish()),responseDeserialize: (value: Buffer) => UpdateJobRetriesResponse.decode(value),},/*** Modifies the process instance. This is done by activating and/or terminating specific elements of the instance.** Errors:* NOT_FOUND:* - no process instance exists with the given key** FAILED_PRECONDITION:* - trying to activate element inside of a multi-instance** INVALID_ARGUMENT:* - activating or terminating unknown element* - ancestor of element for activation doesn't exist* - scope of variable is unknown*/modifyProcessInstance: {path: "/gateway_protocol.Gateway/ModifyProcessInstance",requestStream: false,responseStream: false,requestSerialize: (value: ModifyProcessInstanceRequest) =>Buffer.from(ModifyProcessInstanceRequest.encode(value).finish()),requestDeserialize: (value: Buffer) => ModifyProcessInstanceRequest.decode(value),responseSerialize: (value: ModifyProcessInstanceResponse) =>Buffer.from(ModifyProcessInstanceResponse.encode(value).finish()),responseDeserialize: (value: Buffer) => ModifyProcessInstanceResponse.decode(value),},} as const
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.
Errors: INVALID_ARGUMENT: