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 Modifier and Type Field Description static java.lang.StringACTIVITY_INSTANCE_TOKEN_COUNTstatic java.lang.StringACTIVITYINSTANCE_DISPLAY_DESCRIPTIONstatic java.lang.StringACTIVITYINSTANCE_DISPLAY_NAMEstatic java.lang.StringACTIVITYINSTANCE_STATEstatic java.lang.StringEXECUTED_BY_MODIFIEDstatic java.lang.StringEXECUTED_BY_SUBSTITUTE_MODIFIEDstatic java.lang.StringEXPECTED_END_DATE_MODIFIEDstatic java.lang.StringFLOWNODE_INSTANCEstatic java.lang.StringLOOPINSTANCE_LOOPMAX_MODIFIEDstatic java.lang.StringMULTIINSTANCE_LOOPCARDINALITY_MODIFIEDstatic java.lang.StringMULTIINSTANCE_NUMBEROFINSTANCE_MODIFIEDstatic java.lang.StringSTATE_CATEGORY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteArchivedFlowNodeInstances(java.util.List<java.lang.Long> sourceObjectIds)voiddeleteFlowNodeInstance(SFlowNodeInstance sFlowNodeInstance)java.util.List<SFlowNodeInstance>getAllChildrenOfProcessInstance(long processInstanceId, int fromIndex, int maxResults)get the flow node instances directly contained in the given process instanceSAFlowNodeInstancegetArchivedFlowNodeInstance(long archivedFlowNodeInstanceId)java.util.List<SAFlowNodeInstance>getArchivedFlowNodeInstances(long rootContainerId, int fromIndex, int maxResults)java.util.List<SFlowNodeInstance>getDirectChildrenOfActivityInstance(long parentActivityInstanceId, int fromIndex, int maxResults)get the flow node instances directly contained in the given activity instancejava.util.List<SFlowNodeInstance>getDirectChildrenOfProcessInstance(long processInstanceId, int fromIndex, int maxResults)get the flow node instances directly contained in the given process instanceSFlowNodeInstancegetFlowNodeInstance(long flowNodeInstanceId)java.util.List<java.lang.Long>getFlowNodeInstanceIdsToRecover(java.time.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 SGatewayInstancesjava.util.List<SFlowNodeInstance>getFlowNodeInstancesByIds(java.util.List<java.lang.Long> ids)java.util.List<SFlowNodeInstance>getFlowNodeInstancesByNameAndParentContainerId(java.lang.String name, java.lang.Long parentContainerId)java.util.List<java.lang.Long>getGatewayInstanceIdsToRecover(java.time.Duration considerElementsOlderThan, QueryOptions queryOptions)Retrieve ids of SGatewayInstances that need to be recovered<T extends SAFlowNodeInstance>
TgetLastArchivedFlowNodeInstance(java.lang.Class<T> entityClass, long sourceObjectFlowNodeInstanceId)longgetNumberOfArchivedFlowNodeInstances(java.lang.Class<? extends SAFlowNodeInstance> entityClass, QueryOptions queryOptions)Retrieve the total number of the archived flow nodes matching the given search criteria.longgetNumberOfArchivedFlowNodeInstancesSupervisedBy(long supervisorId, java.lang.Class<? extends SAFlowNodeInstance> entityClass, QueryOptions queryOptions)Retrieve the total number of the archived flow nodes matching the given search criteria, for a specific supervisor.java.util.List<SFlowNodeInstanceStateCounter>getNumberOfArchivedFlownodesInAllStates(long processInstanceId)Counts the number of archived flownode instances in a specific state.longgetNumberOfFlowNodeInstances(java.lang.Class<? extends SFlowNodeInstance> entityClass, QueryOptions countOptions)longgetNumberOfFlowNodeInstancesSupervisedBy(java.lang.Long supervisorId, java.lang.Class<? extends SFlowNodeInstance> entityClass, QueryOptions countOptions)intgetNumberOfFlowNodes(long rootContainerId)get the number of flow node is this root containerjava.util.List<SFlowNodeInstanceStateCounter>getNumberOfFlownodesInAllStates(long processInstanceId)Counts the number of flownode instances in all states.java.util.List<SFlowNodeInstanceStateCounter>getNumberOfFlownodesOfProcessDefinitionInAllStates(long processDefinitionId)Counts the number of flownode instances in all states.java.util.Set<java.lang.Long>getSourceObjectIdsOfArchivedFlowNodeInstances(java.util.List<java.lang.Long> sourceProcessInstanceIds)get all flow nodes contained in the list of root source process instance ids<T extends SAFlowNodeInstance>
java.util.List<T>searchArchivedFlowNodeInstances(java.lang.Class<T> entityClass, QueryOptions queryOptions)Retrieve the total number of the archived flow nodes matching the given search criteria.<T extends SAFlowNodeInstance>
java.util.List<T>searchArchivedFlowNodeInstancesSupervisedBy(long supervisorId, java.lang.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>
java.util.List<T>searchFlowNodeInstances(java.lang.Class<T> entityClass, QueryOptions searchOptions)<T extends SFlowNodeInstance>
java.util.List<T>searchFlowNodeInstancesSupervisedBy(java.lang.Long supervisorId, java.lang.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, java.lang.Long dueDate)voidsetState(SFlowNodeInstance flowNodeInstance, FlowNodeState state)voidsetStateCategory(SFlowNodeInstance flowElementInstance, SStateCategory stateCategory)voidsetTaskPriority(SFlowNodeInstance flowNodeInstance, STaskPriority priority)voidupdateDisplayDescription(SFlowNodeInstance flowNodeInstance, java.lang.String displayDescription)voidupdateDisplayName(SFlowNodeInstance flowNodeInstance, java.lang.String displayName)
-
-
-
Field Detail
-
FLOWNODE_INSTANCE
static final java.lang.String FLOWNODE_INSTANCE
- See Also:
- Constant Field Values
-
ACTIVITYINSTANCE_STATE
static final java.lang.String ACTIVITYINSTANCE_STATE
- See Also:
- Constant Field Values
-
ACTIVITY_INSTANCE_TOKEN_COUNT
static final java.lang.String ACTIVITY_INSTANCE_TOKEN_COUNT
- See Also:
- Constant Field Values
-
ACTIVITYINSTANCE_DISPLAY_DESCRIPTION
static final java.lang.String ACTIVITYINSTANCE_DISPLAY_DESCRIPTION
- See Also:
- Constant Field Values
-
LOOPINSTANCE_LOOPMAX_MODIFIED
static final java.lang.String LOOPINSTANCE_LOOPMAX_MODIFIED
- See Also:
- Constant Field Values
-
MULTIINSTANCE_LOOPCARDINALITY_MODIFIED
static final java.lang.String MULTIINSTANCE_LOOPCARDINALITY_MODIFIED
- See Also:
- Constant Field Values
-
MULTIINSTANCE_NUMBEROFINSTANCE_MODIFIED
static final java.lang.String MULTIINSTANCE_NUMBEROFINSTANCE_MODIFIED
- See Also:
- Constant Field Values
-
ACTIVITYINSTANCE_DISPLAY_NAME
static final java.lang.String ACTIVITYINSTANCE_DISPLAY_NAME
- See Also:
- Constant Field Values
-
STATE_CATEGORY
static final java.lang.String STATE_CATEGORY
- See Also:
- Constant Field Values
-
EXECUTED_BY_MODIFIED
static final java.lang.String EXECUTED_BY_MODIFIED
- See Also:
- Constant Field Values
-
EXECUTED_BY_SUBSTITUTE_MODIFIED
static final java.lang.String EXECUTED_BY_SUBSTITUTE_MODIFIED
- See Also:
- Constant Field Values
-
EXPECTED_END_DATE_MODIFIED
static final java.lang.String EXPECTED_END_DATE_MODIFIED
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFlowNodeInstance
SFlowNodeInstance getFlowNodeInstance(long flowNodeInstanceId) throws SFlowNodeNotFoundException, SFlowNodeReadException
- Parameters:
flowNodeInstanceId-- Returns:
- Throws:
SFlowNodeNotFoundExceptionSFlowNodeReadException- Since:
- 6.0
-
getAllChildrenOfProcessInstance
java.util.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
java.util.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
java.util.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, java.lang.String displayDescription) throws SFlowNodeModificationException
- Parameters:
flowNodeInstance-displayDescription-- Throws:
SFlowNodeModificationException- Since:
- 6.0
-
updateDisplayName
void updateDisplayName(SFlowNodeInstance flowNodeInstance, java.lang.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(java.lang.Class<? extends SFlowNodeInstance> entityClass, QueryOptions countOptions) throws SBonitaReadException
- Parameters:
entityClass-countOptions-- Returns:
- Throws:
SBonitaReadException- Since:
- 6.0
-
getNumberOfFlowNodeInstancesSupervisedBy
long getNumberOfFlowNodeInstancesSupervisedBy(java.lang.Long supervisorId, java.lang.Class<? extends SFlowNodeInstance> entityClass, QueryOptions countOptions) throws SBonitaReadException- Parameters:
entityClass-countOptions-- Returns:
- Throws:
SBonitaReadException- Since:
- 6.0
-
searchFlowNodeInstances
<T extends SFlowNodeInstance> java.util.List<T> searchFlowNodeInstances(java.lang.Class<T> entityClass, QueryOptions searchOptions) throws SBonitaReadException
- Parameters:
entityClass-searchOptions-- Returns:
- Throws:
SBonitaReadException- Since:
- 6.0
-
searchFlowNodeInstancesSupervisedBy
<T extends SFlowNodeInstance> java.util.List<T> searchFlowNodeInstancesSupervisedBy(java.lang.Long supervisorId, java.lang.Class<T> entityClass, QueryOptions searchOptions) throws SBonitaReadException
- Parameters:
entityClass-searchOptions-- Returns:
- Throws:
SBonitaReadException- Since:
- 6.0
-
getNumberOfFlownodesOfProcessDefinitionInAllStates
java.util.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
java.util.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
java.util.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(java.lang.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, java.lang.Class<? extends SAFlowNodeInstance> entityClass, QueryOptions queryOptions) throws SBonitaReadExceptionRetrieve 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> java.util.List<T> searchArchivedFlowNodeInstances(java.lang.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> java.util.List<T> searchArchivedFlowNodeInstancesSupervisedBy(long supervisorId, java.lang.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, java.lang.Long dueDate) throws SFlowNodeModificationException
- Parameters:
flowNodeInstance-dueDate-- Throws:
SFlowNodeModificationException
-
getArchivedFlowNodeInstances
java.util.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(java.lang.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
void setExecuting(SFlowNodeInstance flowNodeInstance) throws SFlowNodeModificationException
- Parameters:
flowNodeInstance-- Throws:
SFlowNodeModificationException
-
deleteFlowNodeInstance
void deleteFlowNodeInstance(SFlowNodeInstance sFlowNodeInstance) throws SFlowNodeReadException, SFlowNodeDeletionException
- Parameters:
sFlowNodeInstance-- Throws:
SFlowNodeReadExceptionSFlowNodeDeletionException- Since:
- 6.1
-
getFlowNodeInstanceIdsToRecover
java.util.List<java.lang.Long> getFlowNodeInstanceIdsToRecover(java.time.Duration considerElementsOlderThan, QueryOptions queryOptions) throws SBonitaReadExceptionretrieve 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
java.util.List<SFlowNodeInstance> getFlowNodeInstancesByIds(java.util.List<java.lang.Long> ids) throws SBonitaReadException
- Throws:
SBonitaReadException
-
getGatewayInstanceIdsToRecover
java.util.List<java.lang.Long> getGatewayInstanceIdsToRecover(java.time.Duration considerElementsOlderThan, QueryOptions queryOptions) throws SBonitaReadExceptionRetrieve ids of SGatewayInstances that need to be recovered- Parameters:
queryOptions-- Returns:
- Throws:
SBonitaReadException
-
getNumberOfFlowNodes
int getNumberOfFlowNodes(long rootContainerId) throws SBonitaReadExceptionget the number of flow node is this root container- Parameters:
rootContainerId-- Returns:
- the number of flow node
- Throws:
SBonitaReadException- Since:
- 6.5
-
getSourceObjectIdsOfArchivedFlowNodeInstances
java.util.Set<java.lang.Long> getSourceObjectIdsOfArchivedFlowNodeInstances(java.util.List<java.lang.Long> sourceProcessInstanceIds) throws SBonitaReadExceptionget 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
void deleteArchivedFlowNodeInstances(java.util.List<java.lang.Long> sourceObjectIds) throws SBonitaException- Throws:
SBonitaException
-
getFlowNodeInstancesByNameAndParentContainerId
java.util.List<SFlowNodeInstance> getFlowNodeInstancesByNameAndParentContainerId(java.lang.String name, java.lang.Long parentContainerId) throws SBonitaReadException
- Throws:
SBonitaReadException
-
-