Interface FlowNodeInstanceService
- All Known Subinterfaces:
ActivityInstanceService
- All Known Implementing Classes:
ActivityInstanceServiceImpl,FlowNodeInstancesServiceImpl
public interface FlowNodeInstanceService
- Author:
- Elias Ricken de Medeiros, Matthieu Chaffotte, Celine Souchet
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteArchivedFlowNodeInstances(List<Long> sourceObjectIds) voiddeleteFlowNodeInstance(SFlowNodeInstance sFlowNodeInstance) getAllChildrenOfProcessInstance(long processInstanceId, int fromIndex, int maxResults) get the flow node instances directly contained in the given process instancegetArchivedFlowNodeInstance(long archivedFlowNodeInstanceId) getArchivedFlowNodeInstances(long rootContainerId, int fromIndex, int maxResults) getDirectChildrenOfActivityInstance(long parentActivityInstanceId, int fromIndex, int maxResults) get the flow node instances directly contained in the given activity instancegetDirectChildrenOfProcessInstance(long processInstanceId, int fromIndex, int maxResults) get the flow node instances directly contained in the given process instancegetFlowNodeInstance(long flowNodeInstanceId) getFlowNodeInstanceIdsToRecover(Duration considerElementsOlderThan, QueryOptions queryOptions) retrieve ids of elements that need to be recovered Called on start node to set the flag to tell the engine to restart these flow nodes Should not be called when the engine is started! This does not retrieve SGatewayInstancesgetFlowNodeInstancesByNameAndParentContainerId(String name, Long parentContainerId) getGatewayInstanceIdsToRecover(Duration considerElementsOlderThan, QueryOptions queryOptions) Retrieve ids of SGatewayInstances that need to be recovered<T extends SAFlowNodeInstance>
TgetLastArchivedFlowNodeInstance(Class<T> entityClass, long sourceObjectFlowNodeInstanceId) longgetNumberOfArchivedFlowNodeInstances(Class<? extends SAFlowNodeInstance> entityClass, QueryOptions queryOptions) Retrieve the total number of the archived flow nodes matching the given search criteria.longgetNumberOfArchivedFlowNodeInstancesSupervisedBy(long supervisorId, Class<? extends SAFlowNodeInstance> entityClass, QueryOptions queryOptions) Retrieve the total number of the archived flow nodes matching the given search criteria, for a specific supervisor.getNumberOfArchivedFlownodesInAllStates(long processInstanceId) Counts the number of archived flownode instances in a specific state.longgetNumberOfFlowNodeInstances(Class<? extends SFlowNodeInstance> entityClass, QueryOptions countOptions) longgetNumberOfFlowNodeInstancesSupervisedBy(Long supervisorId, Class<? extends SFlowNodeInstance> entityClass, QueryOptions countOptions) intgetNumberOfFlowNodes(long rootContainerId) get the number of flow node is this root containergetNumberOfFlownodesInAllStates(long processInstanceId) Counts the number of flownode instances in all states.getNumberOfFlownodesOfProcessDefinitionInAllStates(long processDefinitionId) Counts the number of flownode instances in all states.getSourceObjectIdsOfArchivedFlowNodeInstances(List<Long> sourceProcessInstanceIds) get all flow nodes contained in the list of root source process instance ids<T extends SAFlowNodeInstance>
List<T>searchArchivedFlowNodeInstances(Class<T> entityClass, QueryOptions queryOptions) Retrieve the total number of the archived flow nodes matching the given search criteria.<T extends SAFlowNodeInstance>
List<T>searchArchivedFlowNodeInstancesSupervisedBy(long supervisorId, Class<T> entityClass, QueryOptions queryOptions) Retrieve the total number of the archived flow nodes matching the given search criteria, for a specific supervisor.<T extends SFlowNodeInstance>
List<T>searchFlowNodeInstances(Class<T> entityClass, QueryOptions searchOptions) <T extends SFlowNodeInstance>
List<T>searchFlowNodeInstancesSupervisedBy(Long supervisorId, Class<T> entityClass, QueryOptions searchOptions) voidsetExecutedBy(SFlowNodeInstance sFlowNodeInstance, long userId) Set execute by for the specific flow node instancevoidsetExecutedBySubstitute(SFlowNodeInstance sFlowNodeInstance, long executerSubstituteId) Set execute by delegate for the specific flow node instancevoidsetExecuting(SFlowNodeInstance flowNodeInstance) voidsetExpectedEndDate(SFlowNodeInstance flowNodeInstance, Long dueDate) voidsetState(SFlowNodeInstance flowNodeInstance, FlowNodeState state) voidsetStateCategory(SFlowNodeInstance flowElementInstance, SStateCategory stateCategory) voidsetTaskPriority(SFlowNodeInstance flowNodeInstance, STaskPriority priority) voidupdateDisplayDescription(SFlowNodeInstance flowNodeInstance, String displayDescription) voidupdateDisplayName(SFlowNodeInstance flowNodeInstance, String displayName)
-
Field Details
-
FLOWNODE_INSTANCE
- See Also:
-
ACTIVITYINSTANCE_STATE
- See Also:
-
ACTIVITY_INSTANCE_TOKEN_COUNT
- See Also:
-
ACTIVITYINSTANCE_DISPLAY_DESCRIPTION
- See Also:
-
LOOPINSTANCE_LOOPMAX_MODIFIED
- See Also:
-
MULTIINSTANCE_LOOPCARDINALITY_MODIFIED
- See Also:
-
MULTIINSTANCE_NUMBEROFINSTANCE_MODIFIED
- See Also:
-
ACTIVITYINSTANCE_DISPLAY_NAME
- See Also:
-
STATE_CATEGORY
- See Also:
-
EXECUTED_BY_MODIFIED
- See Also:
-
EXECUTED_BY_SUBSTITUTE_MODIFIED
- See Also:
-
EXPECTED_END_DATE_MODIFIED
- See Also:
-
-
Method Details
-
getFlowNodeInstance
SFlowNodeInstance getFlowNodeInstance(long flowNodeInstanceId) throws SFlowNodeNotFoundException, SFlowNodeReadException - Parameters:
flowNodeInstanceId-- Returns:
- Throws:
SFlowNodeNotFoundExceptionSFlowNodeReadException- Since:
- 6.0
-
getAllChildrenOfProcessInstance
List<SFlowNodeInstance> getAllChildrenOfProcessInstance(long processInstanceId, int fromIndex, int maxResults) throws SFlowNodeReadException, SBonitaReadException get the flow node instances directly contained in the given process instance- Parameters:
processInstanceId- the parent process instance- Throws:
SFlowNodeReadExceptionSBonitaReadException
-
getDirectChildrenOfProcessInstance
List<SFlowNodeInstance> getDirectChildrenOfProcessInstance(long processInstanceId, int fromIndex, int maxResults) throws SFlowNodeReadException, SBonitaReadException get the flow node instances directly contained in the given process instance- Parameters:
processInstanceId- the parent process instance- Throws:
SFlowNodeReadExceptionSBonitaReadException
-
getDirectChildrenOfActivityInstance
List<SFlowNodeInstance> getDirectChildrenOfActivityInstance(long parentActivityInstanceId, int fromIndex, int maxResults) throws SFlowNodeReadException, SBonitaReadException get the flow node instances directly contained in the given activity instance- Parameters:
parentActivityInstanceId- the parent process instance- Throws:
SFlowNodeReadExceptionSBonitaReadException
-
setState
void setState(SFlowNodeInstance flowNodeInstance, FlowNodeState state) throws SFlowNodeModificationException - Parameters:
flowNodeInstance-state-- Throws:
SFlowNodeModificationException- Since:
- 6.0
-
setTaskPriority
void setTaskPriority(SFlowNodeInstance flowNodeInstance, STaskPriority priority) throws SFlowNodeModificationException - Parameters:
flowNodeInstance-priority-- Throws:
SFlowNodeModificationException- Since:
- 6.0
-
updateDisplayDescription
void updateDisplayDescription(SFlowNodeInstance flowNodeInstance, String displayDescription) throws SFlowNodeModificationException - Parameters:
flowNodeInstance-displayDescription-- Throws:
SFlowNodeModificationException- Since:
- 6.0
-
updateDisplayName
void updateDisplayName(SFlowNodeInstance flowNodeInstance, String displayName) throws SFlowNodeModificationException - Parameters:
flowNodeInstance-displayName-- Throws:
SFlowNodeModificationException- Since:
- 6.0
-
setStateCategory
void setStateCategory(SFlowNodeInstance flowElementInstance, SStateCategory stateCategory) throws SFlowNodeModificationException - Parameters:
flowElementInstance-stateCategory-- Throws:
SFlowNodeModificationException- Since:
- 6.0
-
getNumberOfFlowNodeInstances
long getNumberOfFlowNodeInstances(Class<? extends SFlowNodeInstance> entityClass, QueryOptions countOptions) throws SBonitaReadException - Parameters:
entityClass-countOptions-- Returns:
- Throws:
SBonitaReadException- Since:
- 6.0
-
getNumberOfFlowNodeInstancesSupervisedBy
long getNumberOfFlowNodeInstancesSupervisedBy(Long supervisorId, Class<? extends SFlowNodeInstance> entityClass, QueryOptions countOptions) throws SBonitaReadException - Parameters:
entityClass-countOptions-- Returns:
- Throws:
SBonitaReadException- Since:
- 6.0
-
searchFlowNodeInstances
<T extends SFlowNodeInstance> List<T> searchFlowNodeInstances(Class<T> entityClass, QueryOptions searchOptions) throws SBonitaReadException - Parameters:
entityClass-searchOptions-- Returns:
- Throws:
SBonitaReadException- Since:
- 6.0
-
searchFlowNodeInstancesSupervisedBy
<T extends SFlowNodeInstance> List<T> searchFlowNodeInstancesSupervisedBy(Long supervisorId, Class<T> entityClass, QueryOptions searchOptions) throws SBonitaReadException - Parameters:
entityClass-searchOptions-- Returns:
- Throws:
SBonitaReadException- Since:
- 6.0
-
getNumberOfFlownodesOfProcessDefinitionInAllStates
List<SFlowNodeInstanceStateCounter> getNumberOfFlownodesOfProcessDefinitionInAllStates(long processDefinitionId) throws SBonitaReadException Counts the number of flownode instances in all states. Only considers flownodes direcly contained in given process definition. Results are counted per flownode name and per state.- Parameters:
processDefinitionId- the ID of the process definition to search flownodes for.- Returns:
- a list of FlowNodeInstanceStateCounter. If no results, returns an empty list.
- Throws:
SBonitaReadException- if a read exception occurs.
-
getNumberOfFlownodesInAllStates
List<SFlowNodeInstanceStateCounter> getNumberOfFlownodesInAllStates(long processInstanceId) throws SBonitaReadException Counts the number of flownode instances in all states. Only considers flownodes direcly contained in given process instance, not flownodes in sub-process instances. Results are counted per flownode name and per state.- Parameters:
processInstanceId- the ID of the process instance to search flownodes for.- Returns:
- a list of FlowNodeInstanceStateCounter. If no results, returns an empty list.
- Throws:
SBonitaReadException- if a read exception occurs.
-
getNumberOfArchivedFlownodesInAllStates
List<SFlowNodeInstanceStateCounter> getNumberOfArchivedFlownodesInAllStates(long processInstanceId) throws SBonitaReadException Counts the number of archived flownode instances in a specific state. Only considers archived flownodes direcly contained in given process instance, not flownodes in sub-process instances. Results are counted per flownode name and per state.- Parameters:
processInstanceId- the ID of the process instance to search flownodes for. This is the ID of the process instance before it was archived (corresponding to the sourceObjectId in the archives)- Returns:
- a list of FlowNodeInstanceStateCounter. If no results, returns an empty list.
- Throws:
SBonitaReadException- if a read exception occurs.
-
setExecutedBy
void setExecutedBy(SFlowNodeInstance sFlowNodeInstance, long userId) throws SFlowNodeModificationException Set execute by for the specific flow node instance- Parameters:
sFlowNodeInstance- the flowNodeInstance will be updateduserId- value for executedBy- Throws:
SFlowNodeModificationException- Since:
- 6.0
-
setExecutedBySubstitute
void setExecutedBySubstitute(SFlowNodeInstance sFlowNodeInstance, long executerSubstituteId) throws SFlowNodeModificationException Set execute by delegate for the specific flow node instance- Parameters:
sFlowNodeInstance- the flowNodeInstance will be updatedexecuterSubstituteId- value for executedBySubstitute- Throws:
SFlowNodeModificationException- Since:
- 6.0.1
-
getNumberOfArchivedFlowNodeInstances
long getNumberOfArchivedFlowNodeInstances(Class<? extends SAFlowNodeInstance> entityClass, QueryOptions queryOptions) throws SBonitaReadException Retrieve the total number of the archived flow nodes matching the given search criteria.- Parameters:
entityClass- The type of the archived flow node to search forqueryOptions- The search options to filter the results- Returns:
- The number found, 0 if none matching search criteria
- Throws:
SBonitaReadException- Since:
- 6.0
-
getNumberOfArchivedFlowNodeInstancesSupervisedBy
long getNumberOfArchivedFlowNodeInstancesSupervisedBy(long supervisorId, Class<? extends SAFlowNodeInstance> entityClass, QueryOptions queryOptions) throws SBonitaReadException Retrieve the total number of the archived flow nodes matching the given search criteria, for a specific supervisor.- Parameters:
supervisorId- The identifier of the supervisorentityClass- The type of the archived flow node to search forqueryOptions- The search options to filter the results- Returns:
- The number found, 0 if no matching search criteria
- Throws:
SBonitaReadException- Since:
- 6.3
-
searchArchivedFlowNodeInstances
<T extends SAFlowNodeInstance> List<T> searchArchivedFlowNodeInstances(Class<T> entityClass, QueryOptions queryOptions) throws SBonitaReadException Retrieve the total number of the archived flow nodes matching the given search criteria.- Parameters:
entityClass- The type of the archived flow node to search forqueryOptions- The search options to filter the results- Returns:
- The list of paginated results, according to the QueryOptions search criteria
- Throws:
SBonitaReadException- Since:
- 6.0
-
searchArchivedFlowNodeInstancesSupervisedBy
<T extends SAFlowNodeInstance> List<T> searchArchivedFlowNodeInstancesSupervisedBy(long supervisorId, Class<T> entityClass, QueryOptions queryOptions) throws SBonitaReadException Retrieve the total number of the archived flow nodes matching the given search criteria, for a specific supervisor.- Parameters:
supervisorId- The identifier of the supervisorentityClass- The type of the archived flow node to search forqueryOptions- The search options to filter the results- Returns:
- The list of paginated results, according to the QueryOptions search criteria
- Throws:
SBonitaReadException- Since:
- 6.3
-
setExpectedEndDate
void setExpectedEndDate(SFlowNodeInstance flowNodeInstance, Long dueDate) throws SFlowNodeModificationException - Parameters:
flowNodeInstance-dueDate-- Throws:
SFlowNodeModificationException
-
getArchivedFlowNodeInstances
List<SAFlowNodeInstance> getArchivedFlowNodeInstances(long rootContainerId, int fromIndex, int maxResults) throws SFlowNodeReadException - Parameters:
rootContainerId-fromIndex-maxResults-- Returns:
- Throws:
SFlowNodeReadException
-
getArchivedFlowNodeInstance
SAFlowNodeInstance getArchivedFlowNodeInstance(long archivedFlowNodeInstanceId) throws SFlowNodeReadException, SFlowNodeNotFoundException - Parameters:
archivedFlowNodeInstanceId-- Returns:
- Throws:
SFlowNodeReadExceptionSFlowNodeNotFoundException- Since:
- 6.0
-
getLastArchivedFlowNodeInstance
<T extends SAFlowNodeInstance> T getLastArchivedFlowNodeInstance(Class<T> entityClass, long sourceObjectFlowNodeInstanceId) throws SBonitaReadException - Parameters:
sourceObjectFlowNodeInstanceId- The source identifier of the flow node instance- Returns:
- The last archived flow node
- Throws:
SBonitaReadException- Since:
- 6.3
-
setExecuting
- Parameters:
flowNodeInstance-- Throws:
SFlowNodeModificationException
-
deleteFlowNodeInstance
void deleteFlowNodeInstance(SFlowNodeInstance sFlowNodeInstance) throws SFlowNodeReadException, SFlowNodeDeletionException - Parameters:
sFlowNodeInstance-- Throws:
SFlowNodeReadExceptionSFlowNodeDeletionException- Since:
- 6.1
-
getFlowNodeInstanceIdsToRecover
List<Long> getFlowNodeInstanceIdsToRecover(Duration considerElementsOlderThan, QueryOptions queryOptions) throws SBonitaReadException retrieve ids of elements that need to be recovered Called on start node to set the flag to tell the engine to restart these flow nodes Should not be called when the engine is started! This does not retrieve SGatewayInstances- Parameters:
considerElementsOlderThan- consider elements older than that durationqueryOptions- used for pagination- Throws:
SBonitaReadException
-
getFlowNodeInstancesByIds
- Throws:
SBonitaReadException
-
getGatewayInstanceIdsToRecover
List<Long> getGatewayInstanceIdsToRecover(Duration considerElementsOlderThan, QueryOptions queryOptions) throws SBonitaReadException Retrieve ids of SGatewayInstances that need to be recovered- Parameters:
queryOptions-- Returns:
- Throws:
SBonitaReadException
-
getNumberOfFlowNodes
get the number of flow node is this root container- Parameters:
rootContainerId-- Returns:
- the number of flow node
- Throws:
SBonitaReadException- Since:
- 6.5
-
getSourceObjectIdsOfArchivedFlowNodeInstances
Set<Long> getSourceObjectIdsOfArchivedFlowNodeInstances(List<Long> sourceProcessInstanceIds) throws SBonitaReadException get all flow nodes contained in the list of root source process instance ids- Parameters:
sourceProcessInstanceIds- root source process instance ids- Returns:
- list of root source process instance ids
- Throws:
SBonitaReadException
-
deleteArchivedFlowNodeInstances
- Throws:
SBonitaException
-
getFlowNodeInstancesByNameAndParentContainerId
List<SFlowNodeInstance> getFlowNodeInstancesByNameAndParentContainerId(String name, Long parentContainerId) throws SBonitaReadException - Throws:
SBonitaReadException
-