Interface GatewayGrpc.AsyncService

All Known Implementing Classes:
GatewayGrpc.GatewayImplBase
Enclosing class:
GatewayGrpc

public static interface GatewayGrpc.AsyncService
  • Method Details

    • activateJobs

      default void activateJobs(GatewayOuterClass.ActivateJobsRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.ActivateJobsResponse> responseObserver)
      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
       
    • streamActivatedJobs

      default void streamActivatedJobs(GatewayOuterClass.StreamActivatedJobsRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.ActivatedJob> responseObserver)
      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
      - If multi-tenancy is enabled, and tenantIds is empty (empty list)
      - If multi-tenancy is enabled, and an invalid tenant ID is provided. A tenant ID is considered invalid if:
      - The tenant ID is blank (empty string, null)
      - The tenant ID is longer than 31 characters
      - The tenant ID contains anything other than alphanumeric characters, dot (.), dash (-), or underscore (_)
      - If multi-tenancy is disabled, and tenantIds is not empty (empty list), or has an ID other than <default>
       
    • cancelProcessInstance

      default void cancelProcessInstance(GatewayOuterClass.CancelProcessInstanceRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.CancelProcessInstanceResponse> responseObserver)
      Cancels a running process instance
      Errors:
      NOT_FOUND:
      - no process instance exists with the given key
       
    • completeJob

      default void completeJob(GatewayOuterClass.CompleteJobRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.CompleteJobResponse> responseObserver)
      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.
       
    • createProcessInstance

      default void createProcessInstance(GatewayOuterClass.CreateProcessInstanceRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.CreateProcessInstanceResponse> responseObserver)
      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.
       
    • createProcessInstanceWithResult

      default void createProcessInstanceWithResult(GatewayOuterClass.CreateProcessInstanceWithResultRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.CreateProcessInstanceWithResultResponse> responseObserver)
      Behaves similarly to `rpc CreateProcessInstance`, except that a successful response is received when the process completes successfully.
       
    • evaluateDecision

      default void evaluateDecision(GatewayOuterClass.EvaluateDecisionRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.EvaluateDecisionResponse> responseObserver)
      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
       
    • deployProcess

      @Deprecated default void deployProcess(GatewayOuterClass.DeployProcessRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.DeployProcessResponse> responseObserver)
      Deprecated.
      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)
       
    • deployResource

      default void deployResource(GatewayOuterClass.DeployResourceRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.DeployResourceResponse> responseObserver)
      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:
      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
       
    • failJob

      default void failJob(GatewayOuterClass.FailJobRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.FailJobResponse> responseObserver)
      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
       
    • throwError

      default void throwError(GatewayOuterClass.ThrowErrorRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.ThrowErrorResponse> responseObserver)
      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
       
    • publishMessage

      default void publishMessage(GatewayOuterClass.PublishMessageRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.PublishMessageResponse> responseObserver)
      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)
       
    • resolveIncident

      default void resolveIncident(GatewayOuterClass.ResolveIncidentRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.ResolveIncidentResponse> responseObserver)
      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
       
    • setVariables

      default void setVariables(GatewayOuterClass.SetVariablesRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.SetVariablesResponse> responseObserver)
      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.
       
    • topology

      default void topology(GatewayOuterClass.TopologyRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.TopologyResponse> responseObserver)
      Obtains the current topology of the cluster the gateway is part of.
       
    • updateJobRetries

      default void updateJobRetries(GatewayOuterClass.UpdateJobRetriesRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.UpdateJobRetriesResponse> responseObserver)
      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
       
    • modifyProcessInstance

      default void modifyProcessInstance(GatewayOuterClass.ModifyProcessInstanceRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.ModifyProcessInstanceResponse> responseObserver)
      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
       
    • migrateProcessInstance

      default void migrateProcessInstance(GatewayOuterClass.MigrateProcessInstanceRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.MigrateProcessInstanceResponse> responseObserver)
      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].
       
    • updateJobTimeout

      default void updateJobTimeout(GatewayOuterClass.UpdateJobTimeoutRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.UpdateJobTimeoutResponse> responseObserver)
      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
       
    • deleteResource

      default void deleteResource(GatewayOuterClass.DeleteResourceRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.DeleteResourceResponse> responseObserver)
      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
       
    • broadcastSignal

      default void broadcastSignal(GatewayOuterClass.BroadcastSignalRequest request, io.grpc.stub.StreamObserver<GatewayOuterClass.BroadcastSignalResponse> responseObserver)
      Broadcasts a signal.