Interface ProcessState

All Known Subinterfaces:
MutableProcessState
All Known Implementing Classes:
DbProcessState

public interface ProcessState
  • Method Details

    • getLatestProcessVersionByProcessId

      DeployedProcess getLatestProcessVersionByProcessId(org.agrona.DirectBuffer processId, String tenantId)
    • getProcessByProcessIdAndVersion

      DeployedProcess getProcessByProcessIdAndVersion(org.agrona.DirectBuffer processId, int version, String tenantId)
    • getProcessByKeyAndTenant

      DeployedProcess getProcessByKeyAndTenant(long key, String tenantId)
    • getLatestVersionDigest

      org.agrona.DirectBuffer getLatestVersionDigest(org.agrona.DirectBuffer processId, String tenantId)
    • getLatestProcessVersion

      int getLatestProcessVersion(String bpmnProcessId, String tenantId)
      Gets the latest process version. This is the latest version for which we have a process in the state. It is not necessarily the latest version we've ever known for this process id, as process could be deleted.
      Parameters:
      bpmnProcessId - the id of the process
    • getNextProcessVersion

      int getNextProcessVersion(String bpmnProcessId, String tenantId)
      Gets the next version a process of a given id will receive. This is used, for example, when a new deployment is done. Using this method we decide the version the newly deployed process receives.
      Parameters:
      bpmnProcessId - the id of the process
    • findProcessVersionBefore

      Optional<Integer> findProcessVersionBefore(String bpmnProcessId, long version, String tenantId)
      Finds the previous known version a process. This is used, for example, when a process is deleted and the timers of the previous process need to be activated.

      If not previous version is found, an empty optional is returned.

      Parameters:
      bpmnProcessId - the id of the process
      version - the version for which we want to find the previous version
    • getFlowElement

      <T extends ExecutableFlowElement> T getFlowElement(long processDefinitionKey, String tenantId, org.agrona.DirectBuffer elementId, Class<T> elementType)
    • clearCache

      void clearCache()
      TODO: Remove the cache entirely from the immutable state