Interface QueryApi

All Known Implementing Classes:
QueryApiImpl

public interface QueryApi
The query API allows you to asynchronously retrieve information about certain resources from a remote partition on a broker.

NOTE: queries are routed to the correct partition based on the given key. They may also be routed to remote nodes.

  • Method Details

    • getBpmnProcessIdFromProcess

      CompletionStage<String> getBpmnProcessIdFromProcess(long key, Duration timeout)
      Looks up the process definition from the given key, and returns its BPMN process ID. The key should be the one obtained via the deployment command for the given process.

      After timeout duration, the returned future is completed exceptionally with a TimeoutException.

      Parameters:
      key - the process definition key
      timeout - the maximum duration to wait for until the request is completed
      Returns:
      the process ID of the process definition identified by the given key
    • getBpmnProcessIdFromProcessInstance

      CompletionStage<String> getBpmnProcessIdFromProcessInstance(long key, Duration timeout)
      Looks up the process instance identified by the given key, and returns the BPMN process ID of its process definition. The key should be the one obtained via the instance creation command.

      After timeout duration, the returned future is completed exceptionally with a TimeoutException.

      Parameters:
      key - the process instance key
      timeout - the maximum duration to wait for until the request is completed
      Returns:
      the process ID associated with the process instance identified by the given key
    • getBpmnProcessIdFromJob

      CompletionStage<String> getBpmnProcessIdFromJob(long key, Duration timeout)
      Looks up the job identified by the given key, and returns the BPMN process ID associated with its process instance. The key should be the one obtained one of the job commands, e.g. job activation.

      After timeout duration, the returned future is completed exceptionally with a TimeoutException.

      Parameters:
      key - the job key
      timeout - the maximum duration to wait for until the request is completed
      Returns:
      the process ID associated with the job identified by the given key