public class ActivityInstanceServiceImpl extends FlowNodeInstancesServiceImpl implements ActivityInstanceService
ACTIVITYINSTANCE, PENDINGACTIVITYMAPPINGACTIVITY_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 |
|---|
ActivityInstanceServiceImpl(Recorder recorder,
PersistenceService persistenceService,
ArchiveService archiveService,
EventService eventService,
TechnicalLoggerService logger) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMultiInstanceNumberOfActiveActivities(SMultiInstanceActivityInstance flowNodeInstance,
int number)
Add number of activeInstances for the specific SMultiInstanceActivityInstance object
|
void |
addMultiInstanceNumberOfCompletedActivities(SMultiInstanceActivityInstance flowNodeInstance,
int number)
Add number of completed activeInstances for the specific SMultiInstanceActivityInstance object
|
void |
addMultiInstanceNumberOfTerminatedActivities(SMultiInstanceActivityInstance flowNodeInstance,
int number)
Add number of terminated activeInstances for the specific SMultiInstanceActivityInstance object
|
void |
addPendingActivityMappings(SPendingActivityMapping mapping)
Create a new pending activity mapping in DB
|
void |
assignHumanTask(long userTaskId,
long userId)
Assign the specific human task to the user
|
void |
assignHumanTaskIfNotAssigned(long userTaskId,
long userId)
Assign the specific human task to the user if it is not currently assigned
|
void |
createActivityInstance(SActivityInstance activityInstance)
Create activityInstance in DB according to the given activityInstance object
|
void |
deleteAllPendingMappings()
Delete all pending mappings for the connected tenant
|
void |
deletePendingMappings(long humanTaskInstanceId)
deletePendingMappings
|
java.util.List<SActivityInstance> |
getActivitiesWithStates(long rootContainerId,
java.util.Set<java.lang.Integer> stateIds,
int fromIndex,
int maxResults,
java.lang.String sortingField,
OrderByType sortingOrder)
Get activities with specific states in the root container in specific order, this is used for pagination
|
SActivityInstance |
getActivityInstance(long activityInstanceId)
Get activityInstance by its id
|
java.util.List<SActivityInstance> |
getActivityInstances(long rootContainerId,
int fromIndex,
int numberOfResults)
Get all activity instances for the specific process instance
|
SAActivityInstance |
getArchivedActivityInstance(long activityInstanceId,
int stateId)
Gets the archive instance of the activity according to its identifier at a given state.
|
java.util.List<SAActivityInstance> |
getArchivedActivityInstances(long rootContainerId,
QueryOptions queryOptions)
Get archived activity instances in the specific root container.
|
java.util.List<SHumanTaskInstance> |
getAssignedUserTasks(long assigneeId,
int fromIndex,
int maxResults,
java.lang.String sortFieldName,
OrderByType order)
Get tasks assigned to the user.
|
java.util.List<SActivityInstance> |
getChildrenOfAnActivity(long parentActivityInstanceId,
int fromIndex,
int numberOfResults)
Get all child instances for the specific parent activity instance, order by id ascending.
|
SHumanTaskInstance |
getHumanTaskInstance(long activityInstanceId)
Get humanTaskInstance by its id
|
SAActivityInstance |
getMostRecentArchivedActivityInstance(long activityInstanceId)
Get the most recent archived version of a specified activity instance
|
long |
getNumberOfActivityInstances(java.lang.Class<? extends PersistentObject> entityClass,
QueryOptions searchOptions)
Get total number of activity instances for the specific entity class
|
long |
getNumberOfArchivedActivityInstances(java.lang.Class<? extends PersistentObject> entityClass,
QueryOptions searchOptions)
Get total number of archived activity instances for the specific entity class
|
long |
getNumberOfArchivedHumanTasksSupervisedBy(long supervisorId,
QueryOptions queryOptions)
Search AUserTask instances archived for a specific supervisor
|
long |
getNumberOfArchivedTasks(QueryOptions searchOptions)
Get total number of archived tasks according to specific search criteria
|
long |
getNumberOfArchivedTasksManagedBy(long managerUserId,
QueryOptions searchOptions)
get the total number of archived tasks assigned to subordinates of specified manager.
|
long |
getNumberOfAssignedAndPendingHumanTasks(long rootProcessDefinitionId,
QueryOptions queryOptions)
Get the total number of the assigned and pending human tasks for any user, on the specified root process definition, corresponding to the
options.
|
long |
getNumberOfAssignedAndPendingHumanTasks(QueryOptions queryOptions)
Get the total number of the assigned and pending human tasks for any user corresponding to the
options.
|
long |
getNumberOfAssignedAndPendingHumanTasksFor(long rootProcessDefinitionId,
long userId,
QueryOptions queryOptions)
Get the total number of the assigned and pending human tasks for the specified user, on the specified root process definition, corresponding to the
options.
|
long |
getNumberOfAssignedHumanTaskInstances(long userId)
Get the number of UserTask instances assigned to a specific user
|
long |
getNumberOfAssignedTasksManagedBy(long managerUserId,
QueryOptions searchOptions)
Get total number of assigned tasks managed by the specific manager
|
long |
getNumberOfAssignedTasksSupervisedBy(long supervisorId,
QueryOptions queryOptions)
Search UserTask instances assigned for a specific supervisor
|
long |
getNumberOfHumanTasks(QueryOptions queryOptions)
Get number of human task instances according to the criteria
|
int |
getNumberOfOpenActivityInstances(long rootContainerId)
Get total number of open activity instances for the specific process instance
|
java.util.Map<java.lang.Long,java.lang.Long> |
getNumberOfOpenTasksForUsers(java.util.List<java.lang.Long> userIds)
Get number of open tasks for each user
|
java.util.Map<java.lang.Long,java.lang.Long> |
getNumberOfOverdueOpenTasksForUsers(java.util.List<java.lang.Long> userIds)
Get number of overdue open tasks for each user
|
long |
getNumberOfPendingOrAssignedTasks(long userId,
QueryOptions searchOptions) |
long |
getNumberOfPendingTasksAssignedTo(long userId,
QueryOptions searchOptions) |
long |
getNumberOfPendingTasksForUser(long userId,
QueryOptions searchOptions) |
long |
getNumberOfPendingTasksSupervisedBy(long supervisorId,
QueryOptions queryOptions)
Get total number of pending human task instances for the specific supervisor
|
long |
getNumberOfUsersWhoCanExecutePendingHumanTaskDeploymentInfo(long humanTaskInstanceId,
QueryOptions searchOptions)
Get total number of users according to specific query options, and who can start the task filtered with the search option
of the given process definition
|
java.util.List<SActivityInstance> |
getOpenActivityInstances(long rootContainerId,
int pageIndex,
int maxResults,
java.lang.String sortingField,
OrderByType orderbyType)
Get all open activity instances in the specific process instance.
|
java.util.List<SPendingActivityMapping> |
getPendingMappings(long humanTaskInstanceId,
QueryOptions queryOptions) |
java.util.List<SHumanTaskInstance> |
getPendingTasks(long userId,
java.util.Set<java.lang.Long> actorIds,
int fromIndex,
int maxResults,
java.lang.String sortFieldName,
OrderByType order)
Get pending tasks for the user in specific actors.
|
java.util.List<java.lang.Long> |
getPossibleUserIdsOfPendingTasks(long humanTaskInstanceId,
int startIndex,
int maxResults) |
void |
incrementLoopCounter(SLoopActivityInstance loopInstance)
Increase loopCounter(loopCount+1) for the specific loop instance
|
boolean |
isTaskPendingForUser(long humanTaskInstanceId,
long userId) |
java.util.List<SActivityInstance> |
searchActivityInstances(java.lang.Class<? extends PersistentObject> entityClass,
QueryOptions searchOptions)
Search all activity instances for the specific entity class
|
java.util.List<SAActivityInstance> |
searchArchivedActivityInstances(java.lang.Class<? extends PersistentObject> entityClass,
QueryOptions searchOptions)
Search all archived activity instances for the specific entity class
|
java.util.List<SAHumanTaskInstance> |
searchArchivedHumanTasksSupervisedBy(long supervisorId,
QueryOptions queryOptions)
Search AUserTask instances archived for a specific supervisor
|
java.util.List<SAHumanTaskInstance> |
searchArchivedTasks(QueryOptions searchOptions)
Search archived human tasks according to specific search criteria
|
java.util.List<SAHumanTaskInstance> |
searchArchivedTasksManagedBy(long managerUserId,
QueryOptions searchOptions)
get the archived tasks assigned to subordinates of specified manager, limited to, sorted, paginated with the specifies QueryOptions
|
java.util.List<SHumanTaskInstance> |
searchAssignedAndPendingHumanTasks(long rootProcessDefinitionId,
QueryOptions queryOptions)
Search the assigned and pending human tasks for any user, on the specified root process definition, corresponding to the options.
|
java.util.List<SHumanTaskInstance> |
searchAssignedAndPendingHumanTasks(QueryOptions queryOptions)
Search the assigned and pending human tasks for any user corresponding to the options.
|
java.util.List<SHumanTaskInstance> |
searchAssignedAndPendingHumanTasksFor(long rootProcessDefinitionId,
long userId,
QueryOptions queryOptions)
Search the assigned and pending human tasks for the specified user, on the specified root process definition, corresponding to the options.
|
java.util.List<SHumanTaskInstance> |
searchAssignedTasksManagedBy(long managerUserId,
QueryOptions searchOptions)
Get all assigned tasks managed by the specific manager
|
java.util.List<SHumanTaskInstance> |
searchAssignedTasksSupervisedBy(long supervisorId,
QueryOptions queryOptions)
Search UserTask instances assigned for a specific supervisor
|
java.util.List<SHumanTaskInstance> |
searchHumanTasks(QueryOptions queryOptions)
Search all human task instances according to the criteria
|
long |
searchNumberOfPendingTasksManagedBy(long managerUserId,
QueryOptions searchOptions)
Search total number of pending tasks for the specific manager
|
java.util.List<SHumanTaskInstance> |
searchPendingOrAssignedTasks(long userId,
QueryOptions searchOptions) |
java.util.List<SHumanTaskInstance> |
searchPendingTasksAssignedTo(long userId,
QueryOptions searchOptions) |
java.util.List<SHumanTaskInstance> |
searchPendingTasksForUser(long userId,
QueryOptions searchOptions) |
java.util.List<SHumanTaskInstance> |
searchPendingTasksManagedBy(long managerUserId,
QueryOptions searchOptions)
Search all pending tasks for the specific manager
|
java.util.List<SHumanTaskInstance> |
searchPendingTasksSupervisedBy(long supervisorId,
QueryOptions queryOptions)
Search all pending human task instances for the specific supervisor
|
java.util.List<SUser> |
searchUsersWhoCanExecutePendingHumanTaskDeploymentInfo(long humanTaskInstanceId,
QueryOptions searchOptions)
Search the users according to specific query options, and who can start the task filtered with the search option
of the given process definition
|
void |
setAbortedByBoundaryEvent(SActivityInstance activityInstance,
long boundaryEventId) |
void |
setLoopCardinality(SFlowNodeInstance flowNodeInstance,
int intLoopCardinality)
Set LoopCardinality for the specific loopActvity
|
void |
setLoopMax(SLoopActivityInstance loopActivity,
java.lang.Integer loopMap)
Set max loop for the specific loopActvity
|
void |
setTokenCount(SActivityInstance activityInstance,
int tokenCount)
Set tokenCount for the specific activity instance
|
deleteArchivedFlowNodeInstances, deleteFlowNodeInstance, getArchivedFlowNodeInstance, getArchivedFlowNodeInstances, getArchiveService, getEventService, getFlowNodeInstance, getFlowNodeInstanceIdsToRestart, getFlowNodeInstancesOfActivity, getFlowNodeInstancesOfProcess, getLastArchivedFlowNodeInstance, getLogger, getNumberOfArchivedFlowNodeInstances, getNumberOfArchivedFlowNodeInstancesSupervisedBy, getNumberOfArchivedFlownodesInAllStates, getNumberOfFlowNodeInstances, getNumberOfFlowNodeInstancesSupervisedBy, getNumberOfFlowNodes, getNumberOfFlownodesInAllStates, getPersistenceService, getRecorder, getSourceObjectIdsOfArchivedFlowNodeInstances, getUnmodifiableList, searchArchivedFlowNodeInstances, searchArchivedFlowNodeInstancesSupervisedBy, searchFlowNodeInstances, searchFlowNodeInstancesSupervisedBy, setExecutedBy, setExecutedBySubstitute, setExecuting, setExpectedEndDate, setState, setStateCategory, setTaskPriority, updateDisplayDescription, updateDisplayName, updateFlowNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeleteArchivedFlowNodeInstances, deleteFlowNodeInstance, getArchivedFlowNodeInstance, getArchivedFlowNodeInstances, getFlowNodeInstance, getFlowNodeInstanceIdsToRestart, getFlowNodeInstancesOfActivity, getFlowNodeInstancesOfProcess, getLastArchivedFlowNodeInstance, getNumberOfArchivedFlowNodeInstances, getNumberOfArchivedFlowNodeInstancesSupervisedBy, getNumberOfArchivedFlownodesInAllStates, getNumberOfFlowNodeInstances, getNumberOfFlowNodeInstancesSupervisedBy, getNumberOfFlowNodes, getNumberOfFlownodesInAllStates, getSourceObjectIdsOfArchivedFlowNodeInstances, searchArchivedFlowNodeInstances, searchArchivedFlowNodeInstancesSupervisedBy, searchFlowNodeInstances, searchFlowNodeInstancesSupervisedBy, setExecutedBy, setExecutedBySubstitute, setExecuting, setExpectedEndDate, setState, setStateCategory, setTaskPriority, updateDisplayDescription, updateDisplayNamepublic ActivityInstanceServiceImpl(Recorder recorder, PersistenceService persistenceService, ArchiveService archiveService, EventService eventService, TechnicalLoggerService logger)
public void createActivityInstance(SActivityInstance activityInstance) throws SActivityCreationException
ActivityInstanceServicecreateActivityInstance in interface ActivityInstanceServiceactivityInstance - an SActivityInstance objectSActivityCreationExceptionpublic void addPendingActivityMappings(SPendingActivityMapping mapping) throws SActivityCreationException
ActivityInstanceServiceaddPendingActivityMappings in interface ActivityInstanceServicemapping - pending activity mapping objectSActivityCreationExceptionpublic void deletePendingMappings(long humanTaskInstanceId)
throws SActivityModificationException
ActivityInstanceServicedeletePendingMappings in interface ActivityInstanceServiceSActivityModificationExceptionpublic void deleteAllPendingMappings()
throws SActivityModificationException
ActivityInstanceServicedeleteAllPendingMappings in interface ActivityInstanceServiceSActivityModificationExceptionpublic java.util.List<SPendingActivityMapping> getPendingMappings(long humanTaskInstanceId, QueryOptions queryOptions) throws SBonitaReadException
getPendingMappings in interface ActivityInstanceServicehumanTaskInstanceId - queryOptions - SBonitaReadExceptionpublic SActivityInstance getActivityInstance(long activityInstanceId) throws SActivityInstanceNotFoundException, SActivityReadException
ActivityInstanceServicegetActivityInstance in interface ActivityInstanceServiceactivityInstanceId - identifier of activityInstanceSActivityInstanceNotFoundException - if no activityInstance foundSActivityReadExceptionpublic SHumanTaskInstance getHumanTaskInstance(long activityInstanceId) throws SActivityInstanceNotFoundException, SActivityReadException
ActivityInstanceServicegetHumanTaskInstance in interface ActivityInstanceServiceactivityInstanceId - identifier of humanTaskInstanceSActivityInstanceNotFoundExceptionSActivityReadExceptionpublic java.util.List<SActivityInstance> getActivitiesWithStates(long rootContainerId, java.util.Set<java.lang.Integer> stateIds, int fromIndex, int maxResults, java.lang.String sortingField, OrderByType sortingOrder) throws SActivityReadException
ActivityInstanceServicegetActivitiesWithStates in interface ActivityInstanceServicerootContainerId - identifier of root container, it always is process definition idstateIds - Identifiers of statesfromIndex - Index of the record to be retrieved from. First record has index 0maxResults - Number of result we want to get. Maximum number of result returnedsortingField - the field used to do ordersortingOrder - ASC or DESCSActivityReadExceptionpublic java.util.List<SActivityInstance> getOpenActivityInstances(long rootContainerId, int pageIndex, int maxResults, java.lang.String sortingField, OrderByType orderbyType) throws SActivityReadException
ActivityInstanceServicegetOpenActivityInstances in interface ActivityInstanceServicerootContainerId - identifier of root container, the root container can be process instancepageIndex - the page index to indicate which page will be retrieved. First page has index 0maxResults - Number of result we want to get. Maximum number of result returnedsortingField - the field used to do orderorderbyType - ASC or DESCSActivityReadExceptionpublic SAActivityInstance getMostRecentArchivedActivityInstance(long activityInstanceId) throws SActivityReadException, SActivityInstanceNotFoundException
ActivityInstanceServicegetMostRecentArchivedActivityInstance in interface ActivityInstanceServiceactivityInstanceId - identifier of activity instanceSActivityReadException - if a Read error occursSActivityInstanceNotFoundException - it the provided activityInstanceId does not refer to an existing Activity Instancepublic java.util.List<SAActivityInstance> getArchivedActivityInstances(long rootContainerId, QueryOptions queryOptions) throws SActivityReadException
ActivityInstanceServicegetArchivedActivityInstances in interface ActivityInstanceServicerootContainerId - identifier of root container, the root container can be process instancequeryOptions - a map of specific parameters of a querySActivityReadExceptionpublic java.util.List<SHumanTaskInstance> getPendingTasks(long userId, java.util.Set<java.lang.Long> actorIds, int fromIndex, int maxResults, java.lang.String sortFieldName, OrderByType order) throws SActivityReadException
ActivityInstanceServicegetPendingTasks in interface ActivityInstanceServiceuserId - identifier of useractorIds - identifiers of actorfromIndex - Index of the record to be retrieved from. First record has index 0maxResults - Number of result we want to get. Maximum number of result returnedsortFieldName - the field used to do orderorder - ASC or DESCSActivityReadExceptionpublic java.util.List<SHumanTaskInstance> getAssignedUserTasks(long assigneeId, int fromIndex, int maxResults, java.lang.String sortFieldName, OrderByType order) throws SActivityReadException
ActivityInstanceServicegetAssignedUserTasks in interface ActivityInstanceServiceassigneeId - identifier of userfromIndex - Index of the record to be retrieved from. First record has index 0maxResults - Number of result we want to get. Maximum number of result returnedsortFieldName - the field used to do orderorder - ASC or DESCSActivityReadExceptionpublic int getNumberOfOpenActivityInstances(long rootContainerId)
throws SActivityReadException
ActivityInstanceServicegetNumberOfOpenActivityInstances in interface ActivityInstanceServicerootContainerId - identifier of process instanceSActivityReadExceptionpublic java.util.List<SActivityInstance> getActivityInstances(long rootContainerId, int fromIndex, int numberOfResults) throws SActivityReadException
ActivityInstanceServicegetActivityInstances in interface ActivityInstanceServicerootContainerId - identifier of root container, the root container can be process instanceSActivityReadExceptionpublic void assignHumanTask(long userTaskId,
long userId)
throws SFlowNodeNotFoundException,
SFlowNodeReadException,
SActivityModificationException
ActivityInstanceServiceassignHumanTask in interface ActivityInstanceServiceuserTaskId - identifier of human task instanceuserId - identifier of userSFlowNodeNotFoundExceptionSFlowNodeReadExceptionSActivityModificationExceptionpublic void assignHumanTaskIfNotAssigned(long userTaskId,
long userId)
throws SFlowNodeNotFoundException,
SFlowNodeReadException,
SActivityModificationException,
SHumanTaskAlreadyAssignedException
ActivityInstanceServiceUse a more restrictive mechanism than assignHumanTask method to assign human task:
under high load, getting pending tasks could return tasks that are being assign in a previous transaction in a separate thread, and thus assignee is override
assignHumanTaskIfNotAssigned in interface ActivityInstanceServiceuserTaskId - identifier of human task instanceuserId - identifier of userSFlowNodeNotFoundExceptionSFlowNodeReadExceptionSActivityModificationExceptionSHumanTaskAlreadyAssignedExceptionpublic long getNumberOfAssignedHumanTaskInstances(long userId)
throws SActivityReadException
ActivityInstanceServicegetNumberOfAssignedHumanTaskInstances in interface ActivityInstanceServiceuserId - the id of the user concernedSActivityReadException - if a Read exception occurspublic SAActivityInstance getArchivedActivityInstance(long activityInstanceId, int stateId) throws SActivityReadException, SActivityInstanceNotFoundException
ActivityInstanceServicegetArchivedActivityInstance in interface ActivityInstanceServicestateId - the state identifierSActivityReadException - if a Read exception occursSActivityInstanceNotFoundExceptionpublic long getNumberOfArchivedTasksManagedBy(long managerUserId,
QueryOptions searchOptions)
throws SBonitaReadException
ActivityInstanceServicegetNumberOfArchivedTasksManagedBy in interface ActivityInstanceServicemanagerUserId - the userId of the managersearchOptions - the search options to paginate, filter, ...SBonitaReadException - in case a search error occurspublic java.util.List<SAHumanTaskInstance> searchArchivedTasksManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException
ActivityInstanceServicesearchArchivedTasksManagedBy in interface ActivityInstanceServicemanagerUserId - the userId of the managersearchOptions - the search options to paginate, filter, sort ...SBonitaReadException - in case a search error occurspublic long getNumberOfArchivedHumanTasksSupervisedBy(long supervisorId,
QueryOptions queryOptions)
throws SBonitaReadException
ActivityInstanceServicegetNumberOfArchivedHumanTasksSupervisedBy in interface ActivityInstanceServicequeryOptions - the object used to manage all the search parameters of a querySBonitaReadExceptionpublic long getNumberOfAssignedTasksSupervisedBy(long supervisorId,
QueryOptions queryOptions)
throws SBonitaReadException
ActivityInstanceServicegetNumberOfAssignedTasksSupervisedBy in interface ActivityInstanceServiceSBonitaReadExceptionpublic java.util.List<SHumanTaskInstance> searchAssignedTasksSupervisedBy(long supervisorId, QueryOptions queryOptions) throws SBonitaReadException
ActivityInstanceServicesearchAssignedTasksSupervisedBy in interface ActivityInstanceServicequeryOptions - the object used to manage all the search parameters of a querySBonitaReadExceptionpublic long getNumberOfHumanTasks(QueryOptions queryOptions) throws SBonitaReadException
ActivityInstanceServicegetNumberOfHumanTasks in interface ActivityInstanceServicequeryOptions - the search options to paginate, filter, sort ...SBonitaReadExceptionpublic java.util.List<SHumanTaskInstance> searchHumanTasks(QueryOptions queryOptions) throws SBonitaReadException
ActivityInstanceServicesearchHumanTasks in interface ActivityInstanceServicequeryOptions - the search options to paginate, filter, sort ...SBonitaReadExceptionpublic java.util.List<SAHumanTaskInstance> searchArchivedHumanTasksSupervisedBy(long supervisorId, QueryOptions queryOptions) throws SBonitaReadException
ActivityInstanceServicesearchArchivedHumanTasksSupervisedBy in interface ActivityInstanceServicequeryOptions - the object used to manage all the search parameters of a querySBonitaReadExceptionpublic java.util.List<SAHumanTaskInstance> searchArchivedTasks(QueryOptions searchOptions) throws SBonitaReadException
ActivityInstanceServicesearchArchivedTasks in interface ActivityInstanceServicesearchOptions - the object used to manage all the search parameters of a querySBonitaReadExceptionpublic long getNumberOfArchivedTasks(QueryOptions searchOptions) throws SBonitaReadException
ActivityInstanceServicegetNumberOfArchivedTasks in interface ActivityInstanceServicesearchOptions - the object used to manage all the search parameters of a querySBonitaReadExceptionpublic long getNumberOfAssignedTasksManagedBy(long managerUserId,
QueryOptions searchOptions)
throws SBonitaReadException
ActivityInstanceServicegetNumberOfAssignedTasksManagedBy in interface ActivityInstanceServicemanagerUserId - identifier of manager usersearchOptions - the object used to manage all the search parameters of a querySBonitaReadExceptionpublic java.util.List<SHumanTaskInstance> searchAssignedTasksManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException
ActivityInstanceServicesearchAssignedTasksManagedBy in interface ActivityInstanceServicemanagerUserId - identifier of manager usersearchOptions - the object used to manage all the search parameters of a querySBonitaReadExceptionpublic java.util.List<SHumanTaskInstance> searchPendingTasksSupervisedBy(long supervisorId, QueryOptions queryOptions) throws SBonitaReadException
ActivityInstanceServicesearchPendingTasksSupervisedBy in interface ActivityInstanceServicesupervisorId - identifier of supervisor userqueryOptions - the search options to paginate, filter, sort ...SBonitaReadExceptionpublic long getNumberOfPendingTasksSupervisedBy(long supervisorId,
QueryOptions queryOptions)
throws SBonitaReadException
ActivityInstanceServicegetNumberOfPendingTasksSupervisedBy in interface ActivityInstanceServicesupervisorId - identifier of supervisor userqueryOptions - the search options to paginate, filter, sort ...SBonitaReadExceptionpublic java.util.Map<java.lang.Long,java.lang.Long> getNumberOfOpenTasksForUsers(java.util.List<java.lang.Long> userIds)
throws SBonitaReadException
ActivityInstanceServicegetNumberOfOpenTasksForUsers in interface ActivityInstanceServiceuserIds - identifiers of usersSBonitaReadExceptionpublic long searchNumberOfPendingTasksManagedBy(long managerUserId,
QueryOptions searchOptions)
throws SBonitaReadException
ActivityInstanceServicesearchNumberOfPendingTasksManagedBy in interface ActivityInstanceServicemanagerUserId - identifier of manager usersearchOptions - the search options to paginate, filter, sort ...SBonitaReadExceptionpublic java.util.List<SHumanTaskInstance> searchPendingTasksManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException
ActivityInstanceServicesearchPendingTasksManagedBy in interface ActivityInstanceServicemanagerUserId - identifier of manager usersearchOptions - the search options to paginate, filter, sort ...SBonitaReadExceptionpublic void incrementLoopCounter(SLoopActivityInstance loopInstance) throws SActivityModificationException
ActivityInstanceServiceincrementLoopCounter in interface ActivityInstanceServiceloopInstance - the loopCounter in which will be increasedSActivityModificationExceptionpublic java.util.Map<java.lang.Long,java.lang.Long> getNumberOfOverdueOpenTasksForUsers(java.util.List<java.lang.Long> userIds)
throws SBonitaReadException
ActivityInstanceServicegetNumberOfOverdueOpenTasksForUsers in interface ActivityInstanceServiceuserIds - identifiers of usersSBonitaReadExceptionpublic java.util.List<SActivityInstance> getChildrenOfAnActivity(long parentActivityInstanceId, int fromIndex, int numberOfResults) throws SActivityReadException
ActivityInstanceServicegetChildrenOfAnActivity in interface ActivityInstanceServiceparentActivityInstanceId - identifier of parent activity instancefromIndex - Index of the record to be retrieved from. First record has index 0numberOfResults - TODOSActivityReadExceptionpublic void setLoopMax(SLoopActivityInstance loopActivity, java.lang.Integer loopMap) throws SActivityModificationException
ActivityInstanceServicesetLoopMax in interface ActivityInstanceServiceloopActivity - the loopActivityloopMap - value for max loopSActivityModificationExceptionpublic void setLoopCardinality(SFlowNodeInstance flowNodeInstance, int intLoopCardinality) throws SActivityModificationException
ActivityInstanceServicesetLoopCardinality in interface ActivityInstanceServiceflowNodeInstance - the loopActvityintLoopCardinality - value of loop cardinalitySActivityModificationExceptionpublic void addMultiInstanceNumberOfActiveActivities(SMultiInstanceActivityInstance flowNodeInstance, int number) throws SActivityModificationException
ActivityInstanceServiceaddMultiInstanceNumberOfActiveActivities in interface ActivityInstanceServiceflowNodeInstance - an SMultiInstanceActivityInstance objectnumber - the number will be addedSActivityModificationExceptionpublic void addMultiInstanceNumberOfTerminatedActivities(SMultiInstanceActivityInstance flowNodeInstance, int number) throws SActivityModificationException
ActivityInstanceServiceaddMultiInstanceNumberOfTerminatedActivities in interface ActivityInstanceServiceflowNodeInstance - an SMultiInstanceActivityInstance objectnumber - will be added to terminated instances of flowNodeInstance
the number will be addedSActivityModificationExceptionpublic void addMultiInstanceNumberOfCompletedActivities(SMultiInstanceActivityInstance flowNodeInstance, int number) throws SActivityModificationException
ActivityInstanceServiceaddMultiInstanceNumberOfCompletedActivities in interface ActivityInstanceServiceflowNodeInstance - an SMultiInstanceActivityInstance object whose completed activity number will be updatednumber - the number will be addedSActivityModificationExceptionpublic long getNumberOfActivityInstances(java.lang.Class<? extends PersistentObject> entityClass, QueryOptions searchOptions) throws SBonitaReadException
ActivityInstanceServicegetNumberOfActivityInstances in interface ActivityInstanceServiceentityClass - to indicate which type of class will be retrievedsearchOptions - the search options to paginate, filter, sort ...SBonitaReadExceptionpublic java.util.List<SActivityInstance> searchActivityInstances(java.lang.Class<? extends PersistentObject> entityClass, QueryOptions searchOptions) throws SBonitaReadException
ActivityInstanceServicesearchActivityInstances in interface ActivityInstanceServiceentityClass - to indicate which type of class will be retrievedsearchOptions - the search options to paginate, filter, sort ...SBonitaReadExceptionpublic long getNumberOfArchivedActivityInstances(java.lang.Class<? extends PersistentObject> entityClass, QueryOptions searchOptions) throws SBonitaReadException
ActivityInstanceServicegetNumberOfArchivedActivityInstances in interface ActivityInstanceServiceentityClass - to indicate which type of class will be retrievedsearchOptions - the search options to paginate, filter, sort ...SBonitaReadExceptionpublic java.util.List<SAActivityInstance> searchArchivedActivityInstances(java.lang.Class<? extends PersistentObject> entityClass, QueryOptions searchOptions) throws SBonitaReadException
ActivityInstanceServicesearchArchivedActivityInstances in interface ActivityInstanceServiceentityClass - to indicate which type of class will be retrievedsearchOptions - the search options to paginate, filter, sort ...SBonitaReadExceptionpublic void setTokenCount(SActivityInstance activityInstance, int tokenCount) throws SFlowNodeModificationException
ActivityInstanceServicesetTokenCount in interface ActivityInstanceServiceactivityInstance - the activityInstance will be updatedtokenCount - value of tokenCount will be set to the activitySFlowNodeModificationExceptionpublic long getNumberOfPendingTasksForUser(long userId,
QueryOptions searchOptions)
throws SBonitaReadException
getNumberOfPendingTasksForUser in interface ActivityInstanceServiceSBonitaReadExceptionpublic java.util.List<SHumanTaskInstance> searchPendingTasksForUser(long userId, QueryOptions searchOptions) throws SBonitaReadException
searchPendingTasksForUser in interface ActivityInstanceServiceSBonitaReadExceptionpublic long getNumberOfPendingOrAssignedTasks(long userId,
QueryOptions searchOptions)
throws SBonitaReadException
getNumberOfPendingOrAssignedTasks in interface ActivityInstanceServiceSBonitaReadExceptionpublic java.util.List<SHumanTaskInstance> searchPendingTasksAssignedTo(long userId, QueryOptions searchOptions) throws SBonitaReadException
searchPendingTasksAssignedTo in interface ActivityInstanceServiceSBonitaReadExceptionpublic long getNumberOfPendingTasksAssignedTo(long userId,
QueryOptions searchOptions)
throws SBonitaReadException
getNumberOfPendingTasksAssignedTo in interface ActivityInstanceServiceSBonitaReadExceptionpublic java.util.List<SHumanTaskInstance> searchPendingOrAssignedTasks(long userId, QueryOptions searchOptions) throws SBonitaReadException
searchPendingOrAssignedTasks in interface ActivityInstanceServiceSBonitaReadExceptionpublic void setAbortedByBoundaryEvent(SActivityInstance activityInstance, long boundaryEventId) throws SActivityModificationException
setAbortedByBoundaryEvent in interface ActivityInstanceServiceSActivityModificationExceptionpublic java.util.List<java.lang.Long> getPossibleUserIdsOfPendingTasks(long humanTaskInstanceId,
int startIndex,
int maxResults)
throws SActivityReadException
getPossibleUserIdsOfPendingTasks in interface ActivityInstanceServiceSActivityReadExceptionpublic boolean isTaskPendingForUser(long humanTaskInstanceId,
long userId)
throws SBonitaReadException
isTaskPendingForUser in interface ActivityInstanceServiceSBonitaReadExceptionpublic long getNumberOfUsersWhoCanExecutePendingHumanTaskDeploymentInfo(long humanTaskInstanceId,
QueryOptions searchOptions)
throws SBonitaReadException
ActivityInstanceServicegetNumberOfUsersWhoCanExecutePendingHumanTaskDeploymentInfo in interface ActivityInstanceServicesearchOptions - The QueryOptions object containing some query conditionsSBonitaReadExceptionpublic java.util.List<SUser> searchUsersWhoCanExecutePendingHumanTaskDeploymentInfo(long humanTaskInstanceId, QueryOptions searchOptions) throws SBonitaReadException
ActivityInstanceServicesearchUsersWhoCanExecutePendingHumanTaskDeploymentInfo in interface ActivityInstanceServicesearchOptions - The QueryOptions object containing some query conditionsSBonitaReadExceptionpublic long getNumberOfAssignedAndPendingHumanTasksFor(long rootProcessDefinitionId,
long userId,
QueryOptions queryOptions)
throws SBonitaReadException
ActivityInstanceServicegetNumberOfAssignedAndPendingHumanTasksFor in interface ActivityInstanceServicerootProcessDefinitionId - The identifier of the root process definitionuserId - The identifier of the userqueryOptions - The search conditions and the options for sorting and paging the results.SBonitaReadExceptionpublic java.util.List<SHumanTaskInstance> searchAssignedAndPendingHumanTasksFor(long rootProcessDefinitionId, long userId, QueryOptions queryOptions) throws SBonitaReadException
ActivityInstanceServicesearchAssignedAndPendingHumanTasksFor in interface ActivityInstanceServicerootProcessDefinitionId - The identifier of the root process definitionuserId - The identifier of the userqueryOptions - The search conditions and the options for sorting and paging the results.SBonitaReadExceptionpublic long getNumberOfAssignedAndPendingHumanTasks(long rootProcessDefinitionId,
QueryOptions queryOptions)
throws SBonitaReadException
ActivityInstanceServicegetNumberOfAssignedAndPendingHumanTasks in interface ActivityInstanceServicerootProcessDefinitionId - The identifier of the root process definitionqueryOptions - The search conditions and the options for sorting and paging the results.SBonitaReadExceptionpublic java.util.List<SHumanTaskInstance> searchAssignedAndPendingHumanTasks(long rootProcessDefinitionId, QueryOptions queryOptions) throws SBonitaReadException
ActivityInstanceServicesearchAssignedAndPendingHumanTasks in interface ActivityInstanceServicerootProcessDefinitionId - The identifier of the root process definitionqueryOptions - The search conditions and the options for sorting and paging the results.SBonitaReadExceptionpublic long getNumberOfAssignedAndPendingHumanTasks(QueryOptions queryOptions) throws SBonitaReadException
ActivityInstanceServicegetNumberOfAssignedAndPendingHumanTasks in interface ActivityInstanceServicequeryOptions - The search conditions and the options for sorting and paging the results.SBonitaReadExceptionpublic java.util.List<SHumanTaskInstance> searchAssignedAndPendingHumanTasks(QueryOptions queryOptions) throws SBonitaReadException
ActivityInstanceServicesearchAssignedAndPendingHumanTasks in interface ActivityInstanceServicequeryOptions - The search conditions and the options for sorting and paging the results.SBonitaReadException