public abstract class FlowNodeInstancesServiceImpl extends java.lang.Object implements FlowNodeInstanceService
ACTIVITY_INSTANCE_TOKEN_COUNT, ACTIVITYINSTANCE_DISPLAY_DESCRIPTION, ACTIVITYINSTANCE_DISPLAY_NAME, ACTIVITYINSTANCE_STATE, EXECUTED_BY_MODIFIED, EXECUTED_BY_SUBSTITUTE_MODIFIED, EXPECTED_END_DATE_MODIFIED, FLOWNODE_INSTANCE, LOOPINSTANCE_LOOPMAX_MODIFIED, MULTIINSTANCE_LOOPCARDINALITY_MODIFIED, MULTIINSTANCE_NUMBEROFINSTANCE_MODIFIED, STATE_CATEGORY| Constructor and Description |
|---|
FlowNodeInstancesServiceImpl(Recorder recorder,
PersistenceService persistenceService,
EventService eventService,
TechnicalLoggerService logger,
ArchiveService archiveService) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteArchivedFlowNodeInstances(java.util.List<java.lang.Long> sourceObjectIds) |
void |
deleteFlowNodeInstance(SFlowNodeInstance sFlowNodeInstance) |
SAFlowNodeInstance |
getArchivedFlowNodeInstance(long archivedFlowNodeInstanceId) |
java.util.List<SAFlowNodeInstance> |
getArchivedFlowNodeInstances(long rootContainerId,
int fromIndex,
int maxResults) |
ArchiveService |
getArchiveService() |
protected EventService |
getEventService() |
SFlowNodeInstance |
getFlowNodeInstance(long flowNodeInstanceId) |
java.util.List<java.lang.Long> |
getFlowNodeInstanceIdsToRestart(QueryOptions queryOptions)
retrieve ids of elements that need to be restarted
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!
|
java.util.List<SFlowNodeInstance> |
getFlowNodeInstancesOfActivity(long parentActivityInstanceId,
int fromIndex,
int maxResults)
get the flow node instances directly contained in the given activity instance
|
java.util.List<SFlowNodeInstance> |
getFlowNodeInstancesOfProcess(long parentProcessInstanceId,
int fromIndex,
int maxResults)
get the flow node instances directly contained in the given process instance
|
<T extends SAFlowNodeInstance> |
getLastArchivedFlowNodeInstance(java.lang.Class<T> entityClass,
long sourceObjectFlowNodeInstanceId) |
protected TechnicalLoggerService |
getLogger() |
long |
getNumberOfArchivedFlowNodeInstances(java.lang.Class<? extends SAFlowNodeInstance> entityClass,
QueryOptions countOptions)
Retrieve the total number of the archived flow nodes matching the given search criteria.
|
long |
getNumberOfArchivedFlowNodeInstancesSupervisedBy(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 parentProcessInstanceId)
Counts the number of archived flownode instances in a specific state.
|
long |
getNumberOfFlowNodeInstances(java.lang.Class<? extends SFlowNodeInstance> entityClass,
QueryOptions countOptions) |
long |
getNumberOfFlowNodeInstancesSupervisedBy(java.lang.Long supervisorId,
java.lang.Class<? extends SFlowNodeInstance> entityClass,
QueryOptions queryOptions) |
int |
getNumberOfFlowNodes(long parentProcessInstanceId)
get the number of flow node is this root container
|
java.util.List<SFlowNodeInstanceStateCounter> |
getNumberOfFlownodesInAllStates(long parentProcessInstanceId)
Counts the number of flownode instances in all states.
|
protected PersistenceService |
getPersistenceService() |
protected Recorder |
getRecorder() |
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
|
protected <T> java.util.List<T> |
getUnmodifiableList(java.util.List<T> selectList) |
<T extends SAFlowNodeInstance> |
searchArchivedFlowNodeInstances(java.lang.Class<T> entityClass,
QueryOptions searchOptions)
Retrieve the total number of the archived flow nodes matching the given search criteria.
|
<T extends SAFlowNodeInstance> |
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> |
searchFlowNodeInstances(java.lang.Class<T> entityClass,
QueryOptions searchOptions) |
<T extends SFlowNodeInstance> |
searchFlowNodeInstancesSupervisedBy(java.lang.Long supervisorId,
java.lang.Class<T> entityClass,
QueryOptions queryOptions) |
void |
setExecutedBy(SFlowNodeInstance flowNodeInstance,
long userId)
Set execute by for the specific flow node instance
|
void |
setExecutedBySubstitute(SFlowNodeInstance flowNodeInstance,
long executerSubstituteId)
Set execute by delegate for the specific flow node instance
|
void |
setExecuting(SFlowNodeInstance flowNodeInstance) |
void |
setExpectedEndDate(SFlowNodeInstance flowNodeInstance,
java.lang.Long dueDate) |
void |
setState(SFlowNodeInstance flowNodeInstance,
FlowNodeState state) |
void |
setStateCategory(SFlowNodeInstance flowElementInstance,
SStateCategory stateCategory) |
void |
setTaskPriority(SFlowNodeInstance flowNodeInstance,
STaskPriority priority) |
void |
updateDisplayDescription(SFlowNodeInstance flowNodeInstance,
java.lang.String displayDescription) |
void |
updateDisplayName(SFlowNodeInstance flowNodeInstance,
java.lang.String displayName) |
protected void |
updateFlowNode(SFlowNodeInstance flowNodeInstance,
java.lang.String eventName,
EntityUpdateDescriptor descriptor) |
public FlowNodeInstancesServiceImpl(Recorder recorder, PersistenceService persistenceService, EventService eventService, TechnicalLoggerService logger, ArchiveService archiveService)
public ArchiveService getArchiveService()
public void setState(SFlowNodeInstance flowNodeInstance, FlowNodeState state) throws SFlowNodeModificationException
setState in interface FlowNodeInstanceServiceSFlowNodeModificationExceptionpublic void setExecuting(SFlowNodeInstance flowNodeInstance) throws SFlowNodeModificationException
setExecuting in interface FlowNodeInstanceServiceSFlowNodeModificationExceptionpublic void updateDisplayName(SFlowNodeInstance flowNodeInstance, java.lang.String displayName) throws SFlowNodeModificationException
updateDisplayName in interface FlowNodeInstanceServiceSFlowNodeModificationExceptionpublic void updateDisplayDescription(SFlowNodeInstance flowNodeInstance, java.lang.String displayDescription) throws SFlowNodeModificationException
updateDisplayDescription in interface FlowNodeInstanceServiceSFlowNodeModificationExceptionpublic void setTaskPriority(SFlowNodeInstance flowNodeInstance, STaskPriority priority) throws SFlowNodeModificationException
setTaskPriority in interface FlowNodeInstanceServiceSFlowNodeModificationExceptionpublic SFlowNodeInstance getFlowNodeInstance(long flowNodeInstanceId) throws SFlowNodeNotFoundException, SFlowNodeReadException
getFlowNodeInstance in interface FlowNodeInstanceServiceSFlowNodeNotFoundExceptionSFlowNodeReadExceptionpublic java.util.List<SFlowNodeInstance> getFlowNodeInstancesOfProcess(long parentProcessInstanceId, int fromIndex, int maxResults) throws SBonitaReadException
FlowNodeInstanceServicegetFlowNodeInstancesOfProcess in interface FlowNodeInstanceServiceparentProcessInstanceId - the parent process isntanceSBonitaReadExceptionpublic java.util.List<SFlowNodeInstance> getFlowNodeInstancesOfActivity(long parentActivityInstanceId, int fromIndex, int maxResults) throws SBonitaReadException
FlowNodeInstanceServicegetFlowNodeInstancesOfActivity in interface FlowNodeInstanceServiceparentActivityInstanceId - the parent process instanceSBonitaReadExceptionpublic java.util.List<SAFlowNodeInstance> getArchivedFlowNodeInstances(long rootContainerId, int fromIndex, int maxResults) throws SFlowNodeReadException
getArchivedFlowNodeInstances in interface FlowNodeInstanceServiceSFlowNodeReadExceptionpublic java.util.Set<java.lang.Long> getSourceObjectIdsOfArchivedFlowNodeInstances(java.util.List<java.lang.Long> sourceProcessInstanceIds)
throws SBonitaReadException
FlowNodeInstanceServicegetSourceObjectIdsOfArchivedFlowNodeInstances in interface FlowNodeInstanceServicesourceProcessInstanceIds - root source process instance idsSBonitaReadExceptionpublic void deleteArchivedFlowNodeInstances(java.util.List<java.lang.Long> sourceObjectIds)
throws SBonitaException
deleteArchivedFlowNodeInstances in interface FlowNodeInstanceServiceSBonitaExceptionpublic SAFlowNodeInstance getArchivedFlowNodeInstance(long archivedFlowNodeInstanceId) throws SFlowNodeReadException, SFlowNodeNotFoundException
getArchivedFlowNodeInstance in interface FlowNodeInstanceServiceSFlowNodeReadExceptionSFlowNodeNotFoundExceptionpublic <T extends SAFlowNodeInstance> T getLastArchivedFlowNodeInstance(java.lang.Class<T> entityClass, long sourceObjectFlowNodeInstanceId) throws SBonitaReadException
getLastArchivedFlowNodeInstance in interface FlowNodeInstanceServicesourceObjectFlowNodeInstanceId - The source identifier of the flow node instanceSBonitaReadExceptionpublic void setStateCategory(SFlowNodeInstance flowElementInstance, SStateCategory stateCategory) throws SFlowNodeModificationException
setStateCategory in interface FlowNodeInstanceServiceSFlowNodeModificationExceptionpublic void setExecutedBy(SFlowNodeInstance flowNodeInstance, long userId) throws SFlowNodeModificationException
FlowNodeInstanceServicesetExecutedBy in interface FlowNodeInstanceServiceflowNodeInstance - the flowNodeInstance will be updateduserId - value for executedBySFlowNodeModificationExceptionpublic void setExecutedBySubstitute(SFlowNodeInstance flowNodeInstance, long executerSubstituteId) throws SFlowNodeModificationException
FlowNodeInstanceServicesetExecutedBySubstitute in interface FlowNodeInstanceServiceflowNodeInstance - the flowNodeInstance will be updatedexecuterSubstituteId - value for executedBySubstituteSFlowNodeModificationExceptionpublic void setExpectedEndDate(SFlowNodeInstance flowNodeInstance, java.lang.Long dueDate) throws SFlowNodeModificationException
setExpectedEndDate in interface FlowNodeInstanceServiceSFlowNodeModificationExceptionprotected void updateFlowNode(SFlowNodeInstance flowNodeInstance, java.lang.String eventName, EntityUpdateDescriptor descriptor) throws SFlowNodeModificationException
SFlowNodeModificationExceptionprotected <T> java.util.List<T> getUnmodifiableList(java.util.List<T> selectList)
public long getNumberOfFlowNodeInstances(java.lang.Class<? extends SFlowNodeInstance> entityClass, QueryOptions countOptions) throws SBonitaReadException
getNumberOfFlowNodeInstances in interface FlowNodeInstanceServiceSBonitaReadExceptionpublic <T extends SFlowNodeInstance> java.util.List<T> searchFlowNodeInstances(java.lang.Class<T> entityClass, QueryOptions searchOptions) throws SBonitaReadException
searchFlowNodeInstances in interface FlowNodeInstanceServiceSBonitaReadExceptionpublic long getNumberOfFlowNodeInstancesSupervisedBy(java.lang.Long supervisorId,
java.lang.Class<? extends SFlowNodeInstance> entityClass,
QueryOptions queryOptions)
throws SBonitaReadException
getNumberOfFlowNodeInstancesSupervisedBy in interface FlowNodeInstanceServiceSBonitaReadExceptionpublic <T extends SFlowNodeInstance> java.util.List<T> searchFlowNodeInstancesSupervisedBy(java.lang.Long supervisorId, java.lang.Class<T> entityClass, QueryOptions queryOptions) throws SBonitaReadException
searchFlowNodeInstancesSupervisedBy in interface FlowNodeInstanceServiceSBonitaReadExceptionpublic java.util.List<SFlowNodeInstanceStateCounter> getNumberOfFlownodesInAllStates(long parentProcessInstanceId) throws SBonitaReadException
FlowNodeInstanceServicegetNumberOfFlownodesInAllStates in interface FlowNodeInstanceServiceparentProcessInstanceId - the ID of the process instance to search flownodes for.SBonitaReadException - if a read exception occurs.public java.util.List<SFlowNodeInstanceStateCounter> getNumberOfArchivedFlownodesInAllStates(long parentProcessInstanceId) throws SBonitaReadException
FlowNodeInstanceServicegetNumberOfArchivedFlownodesInAllStates in interface FlowNodeInstanceServiceparentProcessInstanceId - 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)SBonitaReadException - if a read exception occurs.public long getNumberOfArchivedFlowNodeInstances(java.lang.Class<? extends SAFlowNodeInstance> entityClass, QueryOptions countOptions) throws SBonitaReadException
FlowNodeInstanceServicegetNumberOfArchivedFlowNodeInstances in interface FlowNodeInstanceServiceentityClass - The type of the archived flow node to search forcountOptions - The search options to filter the resultsSBonitaReadExceptionpublic <T extends SAFlowNodeInstance> java.util.List<T> searchArchivedFlowNodeInstances(java.lang.Class<T> entityClass, QueryOptions searchOptions) throws SBonitaReadException
FlowNodeInstanceServicesearchArchivedFlowNodeInstances in interface FlowNodeInstanceServiceentityClass - The type of the archived flow node to search forsearchOptions - The search options to filter the resultsSBonitaReadExceptionpublic long getNumberOfArchivedFlowNodeInstancesSupervisedBy(long supervisorId,
java.lang.Class<? extends SAFlowNodeInstance> entityClass,
QueryOptions queryOptions)
throws SBonitaReadException
FlowNodeInstanceServicegetNumberOfArchivedFlowNodeInstancesSupervisedBy in interface FlowNodeInstanceServicesupervisorId - The identifier of the supervisorentityClass - The type of the archived flow node to search forqueryOptions - The search options to filter the resultsSBonitaReadExceptionpublic <T extends SAFlowNodeInstance> java.util.List<T> searchArchivedFlowNodeInstancesSupervisedBy(long supervisorId, java.lang.Class<T> entityClass, QueryOptions queryOptions) throws SBonitaReadException
FlowNodeInstanceServicesearchArchivedFlowNodeInstancesSupervisedBy in interface FlowNodeInstanceServicesupervisorId - The identifier of the supervisorentityClass - The type of the archived flow node to search forqueryOptions - The search options to filter the resultsSBonitaReadExceptionprotected EventService getEventService()
protected Recorder getRecorder()
protected PersistenceService getPersistenceService()
protected TechnicalLoggerService getLogger()
public void deleteFlowNodeInstance(SFlowNodeInstance sFlowNodeInstance) throws SFlowNodeDeletionException
deleteFlowNodeInstance in interface FlowNodeInstanceServiceSFlowNodeDeletionExceptionpublic java.util.List<java.lang.Long> getFlowNodeInstanceIdsToRestart(QueryOptions queryOptions) throws SBonitaReadException
FlowNodeInstanceServicegetFlowNodeInstanceIdsToRestart in interface FlowNodeInstanceServiceSBonitaReadExceptionpublic int getNumberOfFlowNodes(long parentProcessInstanceId)
throws SBonitaReadException
FlowNodeInstanceServicegetNumberOfFlowNodes in interface FlowNodeInstanceServiceSBonitaReadException