Interface ProcessState
- All Known Subinterfaces:
MutableProcessState
- All Known Implementing Classes:
DbProcessState
public interface ProcessState
-
Method Summary
Modifier and TypeMethodDescriptionvoidTODO: Remove the cache entirely from the immutable statefindProcessVersionBefore(String bpmnProcessId, long version, String tenantId) Finds the previous known version a process.<T extends ExecutableFlowElement>
TgetFlowElement(long processDefinitionKey, String tenantId, org.agrona.DirectBuffer elementId, Class<T> elementType) intgetLatestProcessVersion(String bpmnProcessId, String tenantId) Gets the latest process version.getLatestProcessVersionByProcessId(org.agrona.DirectBuffer processId, String tenantId) org.agrona.DirectBuffergetLatestVersionDigest(org.agrona.DirectBuffer processId, String tenantId) intgetNextProcessVersion(String bpmnProcessId, String tenantId) Gets the next version a process of a given id will receive.getProcessByKeyAndTenant(long key, String tenantId) getProcessByProcessIdAndVersion(org.agrona.DirectBuffer processId, int version, String tenantId)
-
Method Details
-
getLatestProcessVersionByProcessId
DeployedProcess getLatestProcessVersionByProcessId(org.agrona.DirectBuffer processId, String tenantId) -
getProcessByProcessIdAndVersion
DeployedProcess getProcessByProcessIdAndVersion(org.agrona.DirectBuffer processId, int version, String tenantId) -
getProcessByKeyAndTenant
-
getLatestVersionDigest
-
getLatestProcessVersion
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
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
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 processversion- 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
-