Interface ActivityInstanceService
-
- All Superinterfaces:
FlowNodeInstanceService
- All Known Implementing Classes:
ActivityInstanceServiceImpl
public interface ActivityInstanceService extends FlowNodeInstanceService
- Since:
- 6.0
- Author:
- Elias Ricken de Medeiros, Matthieu Chaffotte, Hongwen Zang, Yanyan Liu, Baptiste Mesta, Celine Souchet
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ACTIVITYINSTANCE
static java.lang.String
PENDINGACTIVITYMAPPING
-
Fields inherited from interface org.bonitasoft.engine.core.process.instance.api.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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addMultiInstanceNumberOfActiveActivities(SMultiInstanceActivityInstance flowNodeInstance, int number)
Add number of activeInstances for the specific SMultiInstanceActivityInstance objectvoid
addMultiInstanceNumberOfCompletedActivities(SMultiInstanceActivityInstance flowNodeInstance, int number)
Add number of completed activeInstances for the specific SMultiInstanceActivityInstance objectvoid
addMultiInstanceNumberOfTerminatedActivities(SMultiInstanceActivityInstance flowNodeInstance, int number)
Add number of terminated activeInstances for the specific SMultiInstanceActivityInstance objectvoid
addPendingActivityMappings(SPendingActivityMapping mapping)
Create a new pending activity mapping in DBvoid
assignHumanTask(long userTaskId, long userId)
Assign the specific human task to the uservoid
assignHumanTaskIfNotAssigned(long userTaskId, long userId)
Assign the specific human task to the user if it is not currently assignedvoid
createActivityInstance(SActivityInstance activityInstance)
Create activityInstance in DB according to the given activityInstance objectvoid
deleteAllPendingMappings()
Delete all pending mappings for the connected tenantvoid
deletePendingMappings(long humanTaskInstanceId)
deletePendingMappingsjava.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 paginationSActivityInstance
getActivityInstance(long activityInstanceId)
Get activityInstance by its idjava.util.List<SActivityInstance>
getActivityInstances(long rootContainerId, int fromIndex, int numberOfResults)
Get all activity instances for the specific process instanceSAActivityInstance
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 userId, 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 idSAActivityInstance
getMostRecentArchivedActivityInstance(long activityInstanceId)
Get the most recent archived version of a specified activity instancelong
getNumberOfActivityInstances(java.lang.Class<? extends PersistentObject> entityClass, QueryOptions searchOptions)
Get total number of activity instances for the specific entity classlong
getNumberOfArchivedActivityInstances(java.lang.Class<? extends PersistentObject> entityClass, QueryOptions searchOptions)
Get total number of archived activity instances for the specific entity classlong
getNumberOfArchivedHumanTasksSupervisedBy(long supervisorId, QueryOptions queryOptions)
Search AUserTask instances archived for a specific supervisorlong
getNumberOfArchivedTasks(QueryOptions searchOptions)
Get total number of archived tasks according to specific search criterialong
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 userlong
getNumberOfAssignedTasksManagedBy(long managerUserId, QueryOptions searchOptions)
Get total number of assigned tasks managed by the specific managerlong
getNumberOfAssignedTasksSupervisedBy(long supervisorId, QueryOptions queryOptions)
Search UserTask instances assigned for a specific supervisorlong
getNumberOfHumanTasks(QueryOptions queryOptions)
Get number of human task instances according to the criteriaint
getNumberOfOpenActivityInstances(long processInstanceId)
Get total number of open activity instances for the specific process instancejava.util.Map<java.lang.Long,java.lang.Long>
getNumberOfOpenTasksForUsers(java.util.List<java.lang.Long> userIds)
Get number of open tasks for each userjava.util.Map<java.lang.Long,java.lang.Long>
getNumberOfOverdueOpenTasksForUsers(java.util.List<java.lang.Long> userIds)
Get number of overdue open tasks for each userlong
getNumberOfPendingOrAssignedOrAssignedToOthersTasks(long userId, QueryOptions searchOptions)
long
getNumberOfPendingOrAssignedTasks(long userId, QueryOptions searchOptions)
long
getNumberOfPendingTasksAssignedTo(long userId, QueryOptions searchOptions)
long
getNumberOfPendingTasksForUser(long userId, QueryOptions searchOptions)
long
getNumberOfPendingTasksSupervisedBy(long userId, QueryOptions queryOptions)
Get total number of pending human task instances for the specific supervisorlong
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 definitionjava.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 instanceboolean
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 classjava.util.List<SAActivityInstance>
searchArchivedActivityInstances(java.lang.Class<? extends PersistentObject> entityClass, QueryOptions searchOptions)
Search all archived activity instances for the specific entity classjava.util.List<SAHumanTaskInstance>
searchArchivedHumanTasksSupervisedBy(long supervisorId, QueryOptions queryOptions)
Search AUserTask instances archived for a specific supervisorjava.util.List<SAHumanTaskInstance>
searchArchivedTasks(QueryOptions searchOptions)
Search archived human tasks according to specific search criteriajava.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 QueryOptionsjava.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 managerjava.util.List<SHumanTaskInstance>
searchAssignedTasksSupervisedBy(long supervisorId, QueryOptions queryOptions)
Search UserTask instances assigned for a specific supervisorjava.util.List<SHumanTaskInstance>
searchHumanTasks(QueryOptions queryOptions)
Search all human task instances according to the criterialong
searchNumberOfPendingTasksManagedBy(long managerUserId, QueryOptions searchOptions)
Search total number of pending tasks for the specific managerjava.util.List<SHumanTaskInstance>
searchPendingOrAssignedOrAssignedToOthersTasks(long userId, QueryOptions searchOptions)
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 managerjava.util.List<SHumanTaskInstance>
searchPendingTasksSupervisedBy(long userId, QueryOptions searchOptions)
Search all pending human task instances for the specific supervisorjava.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 definitionvoid
setAbortedByBoundaryEvent(SActivityInstance activityInstance, long boundaryEventId)
void
setLoopCardinality(SFlowNodeInstance flowNodeInstance, int intLoopCardinality)
Set LoopCardinality for the specific loopActvityvoid
setLoopMax(SLoopActivityInstance loopActivity, java.lang.Integer result)
Set max loop for the specific loopActvityvoid
setTokenCount(SActivityInstance activityInstance, int tokenCount)
Set tokenCount for the specific activity instance-
Methods inherited from interface org.bonitasoft.engine.core.process.instance.api.FlowNodeInstanceService
deleteArchivedFlowNodeInstances, deleteFlowNodeInstance, getAllChildrenOfProcessInstance, getArchivedFlowNodeInstance, getArchivedFlowNodeInstances, getDirectChildrenOfActivityInstance, getDirectChildrenOfProcessInstance, getFlowNodeInstance, getFlowNodeInstanceIdsToRecover, getFlowNodeInstancesByIds, getFlowNodeInstancesByNameAndParentContainerId, getGatewayInstanceIdsToRecover, getLastArchivedFlowNodeInstance, getNumberOfArchivedFlowNodeInstances, getNumberOfArchivedFlowNodeInstancesSupervisedBy, getNumberOfArchivedFlownodesInAllStates, getNumberOfFlowNodeInstances, getNumberOfFlowNodeInstancesSupervisedBy, getNumberOfFlowNodes, getNumberOfFlownodesInAllStates, getNumberOfFlownodesOfProcessDefinitionInAllStates, getSourceObjectIdsOfArchivedFlowNodeInstances, searchArchivedFlowNodeInstances, searchArchivedFlowNodeInstancesSupervisedBy, searchFlowNodeInstances, searchFlowNodeInstancesSupervisedBy, setExecutedBy, setExecutedBySubstitute, setExecuting, setExpectedEndDate, setState, setStateCategory, setTaskPriority, updateDisplayDescription, updateDisplayName
-
-
-
-
Field Detail
-
ACTIVITYINSTANCE
static final java.lang.String ACTIVITYINSTANCE
- See Also:
- Constant Field Values
-
PENDINGACTIVITYMAPPING
static final java.lang.String PENDINGACTIVITYMAPPING
- See Also:
- Constant Field Values
-
-
Method Detail
-
createActivityInstance
void createActivityInstance(SActivityInstance activityInstance) throws SActivityCreationException
Create activityInstance in DB according to the given activityInstance object- Parameters:
activityInstance
- an SActivityInstance object- Throws:
SActivityCreationException
-
addPendingActivityMappings
void addPendingActivityMappings(SPendingActivityMapping mapping) throws SActivityCreationException
Create a new pending activity mapping in DB- Parameters:
mapping
- pending activity mapping object- Throws:
SActivityCreationException
-
deletePendingMappings
void deletePendingMappings(long humanTaskInstanceId) throws SActivityModificationException
deletePendingMappings- Parameters:
mapping
- pending activity mapping object- Throws:
SActivityModificationException
-
deleteAllPendingMappings
void deleteAllPendingMappings() throws SActivityModificationException
Delete all pending mappings for the connected tenant- Throws:
SActivityModificationException
- Since:
- 6.1
-
getActivityInstance
SActivityInstance getActivityInstance(long activityInstanceId) throws SActivityInstanceNotFoundException, SActivityReadException
Get activityInstance by its id- Parameters:
activityInstanceId
- identifier of activityInstance- Returns:
- an SActivityInstance object with id corresponding to the parameter
- Throws:
SActivityInstanceNotFoundException
- if no activityInstance foundSActivityReadException
-
getHumanTaskInstance
SHumanTaskInstance getHumanTaskInstance(long activityInstanceId) throws SActivityInstanceNotFoundException, SActivityReadException
Get humanTaskInstance by its id- Parameters:
activityInstanceId
- identifier of humanTaskInstance- Returns:
- an SHumanTaskInstance object with id corresponding to the parameter
- Throws:
SActivityInstanceNotFoundException
SActivityReadException
-
getActivitiesWithStates
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
Get activities with specific states in the root container in specific order, this is used for pagination- Parameters:
rootContainerId
- identifier of root container, it always is process definition idfromIndex
- 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 DESCstateIds
- Identifiers of states- Returns:
- a list of SActivityInstance objects
- Throws:
SActivityReadException
-
getMostRecentArchivedActivityInstance
SAActivityInstance getMostRecentArchivedActivityInstance(long activityInstanceId) throws SActivityReadException, SActivityInstanceNotFoundException
Get the most recent archived version of a specified activity instance- Parameters:
activityInstanceId
- identifier of activity instance- Returns:
- an SAActivityInstance object
- Throws:
SActivityReadException
- if a Read error occursSActivityInstanceNotFoundException
- it the provided activityInstanceId does not refer to an existing Activity Instance
-
getPendingTasks
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
Get pending tasks for the user in specific actors. This is used for pagination- Parameters:
userId
- 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 DESC- Returns:
- a list of SActivityInstance objects
- Throws:
SActivityReadException
-
getAssignedUserTasks
java.util.List<SHumanTaskInstance> getAssignedUserTasks(long userId, int fromIndex, int maxResults, java.lang.String sortFieldName, OrderByType order) throws SActivityReadException
Get tasks assigned to the user. This is used for pagination- Parameters:
userId
- 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 DESC- Returns:
- a list of SHumanTaskInstance objects
- Throws:
SActivityReadException
-
getArchivedActivityInstances
java.util.List<SAActivityInstance> getArchivedActivityInstances(long rootContainerId, QueryOptions queryOptions) throws SActivityReadException
Get archived activity instances in the specific root container.- Parameters:
rootContainerId
- identifier of root container, the root container can be process instancequeryOptions
- a map of specific parameters of a query- Returns:
- a list of SAActivityInstance objects
- Throws:
SActivityReadException
-
getNumberOfOpenActivityInstances
int getNumberOfOpenActivityInstances(long processInstanceId) throws SActivityReadException
Get total number of open activity instances for the specific process instance- Parameters:
processInstanceId
- identifier of process instance- Returns:
- the number of opened activity instances in the specific process instance
- Throws:
SActivityReadException
-
getOpenActivityInstances
java.util.List<SActivityInstance> getOpenActivityInstances(long rootContainerId, int pageIndex, int maxResults, java.lang.String sortingField, OrderByType orderbyType) throws SActivityReadException
Get all open activity instances in the specific process instance. This is used for pagination- Parameters:
rootContainerId
- 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 DESC- Returns:
- a list of SActivityInstance objects
- Throws:
SActivityReadException
-
getActivityInstances
java.util.List<SActivityInstance> getActivityInstances(long rootContainerId, int fromIndex, int numberOfResults) throws SActivityReadException
Get all activity instances for the specific process instance- Parameters:
rootContainerId
- identifier of root container, the root container can be process instance- Returns:
- a list of SActivityInstance objects
- Throws:
SActivityReadException
-
getChildrenOfAnActivity
java.util.List<SActivityInstance> getChildrenOfAnActivity(long parentActivityInstanceId, int fromIndex, int numberOfResults) throws SActivityReadException
Get all child instances for the specific parent activity instance, order by id ascending.- Parameters:
parentActivityInstanceId
- identifier of parent activity instancefromIndex
- Index of the record to be retrieved from. First record has index 0numberOfResults
- TODO- Returns:
- a list of SActivityInstance objects
- Throws:
SActivityReadException
-
assignHumanTask
void assignHumanTask(long userTaskId, long userId) throws SFlowNodeNotFoundException, SFlowNodeReadException, SActivityModificationException
Assign the specific human task to the user- Parameters:
userTaskId
- identifier of human task instanceuserId
- identifier of user- Throws:
SFlowNodeNotFoundException
SFlowNodeReadException
SActivityModificationException
-
assignHumanTaskIfNotAssigned
void assignHumanTaskIfNotAssigned(long userTaskId, long userId) throws SFlowNodeNotFoundException, SFlowNodeReadException, SActivityModificationException, SHumanTaskAlreadyAssignedException
Assign the specific human task to the user if it is not currently assignedUse a more restrictive mechanism than assignHumanTask method to assign human task:
- exception when task is already assign to a different user
- only update claimed date when assign to same user
- remove claimed date when assign to user with id 0 (un-assign)
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
- Parameters:
userTaskId
- identifier of human task instanceuserId
- identifier of user- Throws:
SFlowNodeNotFoundException
SFlowNodeReadException
SActivityModificationException
SHumanTaskAlreadyAssignedException
- Since:
- 7.6
-
getNumberOfAssignedHumanTaskInstances
long getNumberOfAssignedHumanTaskInstances(long userId) throws SActivityReadException
Get the number of UserTask instances assigned to a specific user- Parameters:
userId
- the id of the user concerned- Returns:
- the number of UserTask instances assigned to this specific user
- Throws:
SActivityReadException
- if a Read exception occurs
-
getNumberOfAssignedTasksSupervisedBy
long getNumberOfAssignedTasksSupervisedBy(long supervisorId, QueryOptions queryOptions) throws SBonitaReadException
Search UserTask instances assigned for a specific supervisor- Parameters:
parameters
- a map of specific parameters of a queryparameters
- a map of specific parameters of a query- Returns:
- the number of UserTask assigned to this specific supervisor
- Throws:
SActivityReadException
- if a Read exception occursSBonitaReadException
-
getNumberOfArchivedHumanTasksSupervisedBy
long getNumberOfArchivedHumanTasksSupervisedBy(long supervisorId, QueryOptions queryOptions) throws SBonitaReadException
Search AUserTask instances archived for a specific supervisor- Parameters:
queryOptions
- the object used to manage all the search parameters of a queryparameters
- a map of specific parameters of a query- Returns:
- the number of UserTask archived to this specific supervisor
- Throws:
SActivityReadException
- if a Read exception occursSBonitaReadException
-
searchAssignedTasksSupervisedBy
java.util.List<SHumanTaskInstance> searchAssignedTasksSupervisedBy(long supervisorId, QueryOptions queryOptions) throws SBonitaReadException
Search UserTask instances assigned for a specific supervisor- Parameters:
queryOptions
- the object used to manage all the search parameters of a queryparameters
- a map of specific parameters of a query- Returns:
- the UserTask instances list assigned to this specific supervisor
- Throws:
SActivityReadException
- if a Read exception occursSBonitaReadException
-
searchArchivedHumanTasksSupervisedBy
java.util.List<SAHumanTaskInstance> searchArchivedHumanTasksSupervisedBy(long supervisorId, QueryOptions queryOptions) throws SBonitaReadException
Search AUserTask instances archived for a specific supervisor- Parameters:
queryOptions
- the object used to manage all the search parameters of a queryparameters
- a map of specific parameters of a query- Returns:
- the UserTask instances list archived to this specific supervisor
- Throws:
SActivityReadException
- if a Read exception occursSBonitaReadException
-
getArchivedActivityInstance
SAActivityInstance getArchivedActivityInstance(long activityInstanceId, int stateId) throws SActivityReadException, SActivityInstanceNotFoundException
Gets the archive instance of the activity according to its identifier at a given state.- Parameters:
activityId
- the activity identifierstateId
- the state identifierpersistenceService
-- Returns:
- Throws:
SActivityReadException
- if a Read exception occursSActivityInstanceNotFoundException
-
searchArchivedTasks
java.util.List<SAHumanTaskInstance> searchArchivedTasks(QueryOptions searchOptions) throws SBonitaReadException
Search archived human tasks according to specific search criteria- Parameters:
searchOptions
- the object used to manage all the search parameters of a querypersistenceService
- used to retrieve the archived tasks- Returns:
- a list of SAHumanTaskInstance objects
- Throws:
SBonitaReadException
-
getNumberOfArchivedTasks
long getNumberOfArchivedTasks(QueryOptions searchOptions) throws SBonitaReadException
Get total number of archived tasks according to specific search criteria- Parameters:
searchOptions
- the object used to manage all the search parameters of a querypersistenceService
- used to retrieve the archived tasks- Returns:
- Throws:
SBonitaReadException
-
getNumberOfAssignedTasksManagedBy
long getNumberOfAssignedTasksManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException
Get total number of assigned tasks managed by the specific manager- Parameters:
managerUserId
- identifier of manager usersearchOptions
- the object used to manage all the search parameters of a query- Returns:
- number of assigned tasks managed by the specific manager
- Throws:
SBonitaReadException
-
searchAssignedTasksManagedBy
java.util.List<SHumanTaskInstance> searchAssignedTasksManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException
Get all assigned tasks managed by the specific manager- Parameters:
managerUserId
- identifier of manager usersearchOptions
- the object used to manage all the search parameters of a query- Returns:
- a list of SHumanTaskInstance objects
- Throws:
SBonitaReadException
-
getNumberOfArchivedTasksManagedBy
long getNumberOfArchivedTasksManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException
get the total number of archived tasks assigned to subordinates of specified manager.- Parameters:
managerUserId
- the userId of the managersearchOptions
- the search options to paginate, filter, ...- Returns:
- the number of elements encountered
- Throws:
SBonitaReadException
- in case a search error occurs
-
searchArchivedTasksManagedBy
java.util.List<SAHumanTaskInstance> searchArchivedTasksManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException
get the archived tasks assigned to subordinates of specified manager, limited to, sorted, paginated with the specifies QueryOptions- Parameters:
managerUserId
- the userId of the managersearchOptions
- the search options to paginate, filter, sort ...- Returns:
- the elements encountered matching the specified options
- Throws:
SBonitaReadException
- in case a search error occurs
-
searchPendingTasksSupervisedBy
java.util.List<SHumanTaskInstance> searchPendingTasksSupervisedBy(long userId, QueryOptions searchOptions) throws SBonitaReadException
Search all pending human task instances for the specific supervisor- Parameters:
userId
- identifier of supervisor usersearchOptions
- the search options to paginate, filter, sort ...- Returns:
- a list of SHumanTaskInstance objects
- Throws:
SBonitaReadException
-
getNumberOfPendingTasksSupervisedBy
long getNumberOfPendingTasksSupervisedBy(long userId, QueryOptions queryOptions) throws SBonitaReadException
Get total number of pending human task instances for the specific supervisor- Parameters:
userId
- identifier of supervisor userqueryOptions
- the search options to paginate, filter, sort ...- Returns:
- number of pending human task instances for the specific supervisor
- Throws:
SBonitaReadException
-
getNumberOfHumanTasks
long getNumberOfHumanTasks(QueryOptions queryOptions) throws SBonitaReadException
Get number of human task instances according to the criteria- Parameters:
queryOptions
- the search options to paginate, filter, sort ...- Returns:
- number of human task instances satisfied to the criteria
- Throws:
SBonitaReadException
-
searchHumanTasks
java.util.List<SHumanTaskInstance> searchHumanTasks(QueryOptions queryOptions) throws SBonitaReadException
Search all human task instances according to the criteria- Parameters:
queryOptions
- the search options to paginate, filter, sort ...- Returns:
- a list of SHumanTaskInstance objects
- Throws:
SBonitaReadException
-
getNumberOfOpenTasksForUsers
java.util.Map<java.lang.Long,java.lang.Long> getNumberOfOpenTasksForUsers(java.util.List<java.lang.Long> userIds) throws SBonitaReadException
Get number of open tasks for each user- Parameters:
userIds
- identifiers of users- Returns:
- a map containing user id and corresponding task number
- Throws:
SBonitaReadException
-
searchNumberOfPendingTasksManagedBy
long searchNumberOfPendingTasksManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException
Search total number of pending tasks for the specific manager- Parameters:
managerUserId
- identifier of manager usersearchOptions
- the search options to paginate, filter, sort ...- Returns:
- number of pending tasks
- Throws:
SBonitaReadException
-
searchPendingTasksManagedBy
java.util.List<SHumanTaskInstance> searchPendingTasksManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException
Search all pending tasks for the specific manager- Parameters:
managerUserId
- identifier of manager usersearchOptions
- the search options to paginate, filter, sort ...- Returns:
- a list of SHumanTaskInstance objects
- Throws:
SBonitaReadException
-
incrementLoopCounter
void incrementLoopCounter(SLoopActivityInstance loopInstance) throws SActivityModificationException
Increase loopCounter(loopCount+1) for the specific loop instance- Parameters:
loopInstance
- the loopCounter in which will be increased- Throws:
SActivityModificationException
-
getNumberOfOverdueOpenTasksForUsers
java.util.Map<java.lang.Long,java.lang.Long> getNumberOfOverdueOpenTasksForUsers(java.util.List<java.lang.Long> userIds) throws SBonitaReadException
Get number of overdue open tasks for each user- Parameters:
userIds
- identifiers of users- Returns:
- a map containing userId and corresponding number of tasks
- Throws:
SBonitaReadException
-
setLoopMax
void setLoopMax(SLoopActivityInstance loopActivity, java.lang.Integer result) throws SActivityModificationException
Set max loop for the specific loopActvity- Parameters:
loopActivity
- the loopActivityresult
- value for max loop- Throws:
SActivityModificationException
-
setLoopCardinality
void setLoopCardinality(SFlowNodeInstance flowNodeInstance, int intLoopCardinality) throws SActivityModificationException
Set LoopCardinality for the specific loopActvity- Parameters:
flowNodeInstance
- the loopActvityintLoopCardinality
- value of loop cardinality- Throws:
SActivityModificationException
-
addMultiInstanceNumberOfActiveActivities
void addMultiInstanceNumberOfActiveActivities(SMultiInstanceActivityInstance flowNodeInstance, int number) throws SActivityModificationException
Add number of activeInstances for the specific SMultiInstanceActivityInstance object- Parameters:
flowNodeInstance
- an SMultiInstanceActivityInstance objectnumber
- the number will be added- Throws:
SActivityModificationException
-
addMultiInstanceNumberOfTerminatedActivities
void addMultiInstanceNumberOfTerminatedActivities(SMultiInstanceActivityInstance flowNodeInstance, int number) throws SActivityModificationException
Add number of terminated activeInstances for the specific SMultiInstanceActivityInstance object- Parameters:
flowNodeInstance
- an SMultiInstanceActivityInstance objectnumber
- will be added to terminated instances of flowNodeInstance the number will be added- Throws:
SActivityModificationException
-
addMultiInstanceNumberOfCompletedActivities
void addMultiInstanceNumberOfCompletedActivities(SMultiInstanceActivityInstance flowNodeInstance, int number) throws SActivityModificationException
Add number of completed activeInstances for the specific SMultiInstanceActivityInstance object- Parameters:
flowNodeInstance
- an SMultiInstanceActivityInstance object whose completed activity number will be updatednumber
- the number will be added- Throws:
SActivityModificationException
-
getNumberOfActivityInstances
long getNumberOfActivityInstances(java.lang.Class<? extends PersistentObject> entityClass, QueryOptions searchOptions) throws SBonitaReadException
Get total number of activity instances for the specific entity class- Parameters:
entityClass
- to indicate which type of class will be retrievedsearchOptions
- the search options to paginate, filter, sort ...- Returns:
- number of activity instances for the specific entity class
- Throws:
SBonitaReadException
-
searchActivityInstances
java.util.List<SActivityInstance> searchActivityInstances(java.lang.Class<? extends PersistentObject> entityClass, QueryOptions searchOptions) throws SBonitaReadException
Search all activity instances for the specific entity class- Parameters:
entityClass
- to indicate which type of class will be retrievedsearchOptions
- the search options to paginate, filter, sort ...- Returns:
- a list of SActivityInstance objects
- Throws:
SBonitaReadException
-
getNumberOfArchivedActivityInstances
long getNumberOfArchivedActivityInstances(java.lang.Class<? extends PersistentObject> entityClass, QueryOptions searchOptions) throws SBonitaReadException
Get total number of archived activity instances for the specific entity class- Parameters:
entityClass
- to indicate which type of class will be retrievedsearchOptions
- the search options to paginate, filter, sort ...- Returns:
- number of archived activity instances for the specific entity class
- Throws:
SBonitaReadException
-
searchArchivedActivityInstances
java.util.List<SAActivityInstance> searchArchivedActivityInstances(java.lang.Class<? extends PersistentObject> entityClass, QueryOptions searchOptions) throws SBonitaReadException
Search all archived activity instances for the specific entity class- Parameters:
entityClass
- to indicate which type of class will be retrievedsearchOptions
- the search options to paginate, filter, sort ...- Returns:
- a list of SAActivityInstance objects
- Throws:
SBonitaReadException
-
setTokenCount
void setTokenCount(SActivityInstance activityInstance, int tokenCount) throws SFlowNodeModificationException
Set tokenCount for the specific activity instance- Parameters:
activityInstance
- the activityInstance will be updatedtokenCount
- value of tokenCount will be set to the activity- Throws:
SFlowNodeModificationException
-
getNumberOfPendingTasksForUser
long getNumberOfPendingTasksForUser(long userId, QueryOptions searchOptions) throws SBonitaReadException
- Parameters:
userId
-searchOptions
-- Returns:
- Throws:
SBonitaReadException
- Since:
- 6.0
-
searchPendingTasksForUser
java.util.List<SHumanTaskInstance> searchPendingTasksForUser(long userId, QueryOptions searchOptions) throws SBonitaReadException
- Parameters:
userId
-searchOptions
-- Returns:
- Throws:
SBonitaReadException
- Since:
- 6.0
-
getNumberOfPendingTasksAssignedTo
long getNumberOfPendingTasksAssignedTo(long userId, QueryOptions searchOptions) throws SBonitaReadException
- Throws:
SBonitaReadException
- Since:
- 7.5.5
-
searchPendingTasksAssignedTo
java.util.List<SHumanTaskInstance> searchPendingTasksAssignedTo(long userId, QueryOptions searchOptions) throws SBonitaReadException
- Throws:
SBonitaReadException
- Since:
- 7.5.5
-
getPendingMappings
java.util.List<SPendingActivityMapping> getPendingMappings(long humanTaskInstanceId, QueryOptions queryOptions) throws SBonitaReadException
- Parameters:
humanTaskInstanceId
-queryOptions
-- Returns:
- Throws:
SBonitaReadException
-
searchPendingOrAssignedTasks
java.util.List<SHumanTaskInstance> searchPendingOrAssignedTasks(long userId, QueryOptions searchOptions) throws SBonitaReadException
- Parameters:
userId
-searchOptions
-- Returns:
- Throws:
SBonitaReadException
- Since:
- 6.0
-
getNumberOfPendingOrAssignedTasks
long getNumberOfPendingOrAssignedTasks(long userId, QueryOptions searchOptions) throws SBonitaReadException
- Parameters:
userId
-searchOptions
-- Returns:
- Throws:
SBonitaReadException
- Since:
- 6.0
-
searchPendingOrAssignedOrAssignedToOthersTasks
java.util.List<SHumanTaskInstance> searchPendingOrAssignedOrAssignedToOthersTasks(long userId, QueryOptions searchOptions) throws SBonitaReadException
- Parameters:
userId
-searchOptions
-- Returns:
- Throws:
SBonitaReadException
- Since:
- 7.15
-
getNumberOfPendingOrAssignedOrAssignedToOthersTasks
long getNumberOfPendingOrAssignedOrAssignedToOthersTasks(long userId, QueryOptions searchOptions) throws SBonitaReadException
- Parameters:
userId
-searchOptions
-- Returns:
- Throws:
SBonitaReadException
- Since:
- 7.15
-
setAbortedByBoundaryEvent
void setAbortedByBoundaryEvent(SActivityInstance activityInstance, long boundaryEventId) throws SActivityModificationException
- Parameters:
activityInstance
-boundaryEventId
-- Throws:
SActivityModificationException
- Since:
- 6.0
-
getPossibleUserIdsOfPendingTasks
java.util.List<java.lang.Long> getPossibleUserIdsOfPendingTasks(long humanTaskInstanceId, int startIndex, int maxResults) throws SActivityReadException
- Throws:
SActivityReadException
-
isTaskPendingForUser
boolean isTaskPendingForUser(long humanTaskInstanceId, long userId) throws SBonitaReadException
- Throws:
SBonitaReadException
-
getNumberOfUsersWhoCanExecutePendingHumanTaskDeploymentInfo
long getNumberOfUsersWhoCanExecutePendingHumanTaskDeploymentInfo(long humanTaskInstanceId, QueryOptions searchOptions) throws SBonitaReadException
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- Parameters:
searchOptions
- The QueryOptions object containing some query conditions- Returns:
- Throws:
SBonitaReadException
-
searchUsersWhoCanExecutePendingHumanTaskDeploymentInfo
java.util.List<SUser> searchUsersWhoCanExecutePendingHumanTaskDeploymentInfo(long humanTaskInstanceId, QueryOptions searchOptions) throws SBonitaReadException
Search the users according to specific query options, and who can start the task filtered with the search option of the given process definition- Parameters:
searchOptions
- The QueryOptions object containing some query conditions- Returns:
- Throws:
SBonitaReadException
-
getNumberOfAssignedAndPendingHumanTasksFor
long getNumberOfAssignedAndPendingHumanTasksFor(long rootProcessDefinitionId, long userId, QueryOptions queryOptions) throws SBonitaReadException
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.- Parameters:
rootProcessDefinitionId
- The identifier of the root process definitionuserId
- The identifier of the userqueryOptions
- The search conditions and the options for sorting and paging the results.- Returns:
- The assigned and pending human tasks
- Throws:
SBonitaReadException
- Since:
- 6.3.3
-
searchAssignedAndPendingHumanTasksFor
java.util.List<SHumanTaskInstance> searchAssignedAndPendingHumanTasksFor(long rootProcessDefinitionId, long userId, QueryOptions queryOptions) throws SBonitaReadException
Search the assigned and pending human tasks for the specified user, on the specified root process definition, corresponding to the options.- Parameters:
rootProcessDefinitionId
- The identifier of the root process definitionuserId
- The identifier of the userqueryOptions
- The search conditions and the options for sorting and paging the results.- Returns:
- The assigned and pending human tasks
- Throws:
SBonitaReadException
- Since:
- 6.3.3
-
getNumberOfAssignedAndPendingHumanTasks
long getNumberOfAssignedAndPendingHumanTasks(long rootProcessDefinitionId, QueryOptions queryOptions) throws SBonitaReadException
Get the total number of the assigned and pending human tasks for any user, on the specified root process definition, corresponding to the options.- Parameters:
rootProcessDefinitionId
- The identifier of the root process definitionqueryOptions
- The search conditions and the options for sorting and paging the results.- Returns:
- The assigned and pending human tasks
- Throws:
SBonitaReadException
- Since:
- 6.3.3
-
searchAssignedAndPendingHumanTasks
java.util.List<SHumanTaskInstance> searchAssignedAndPendingHumanTasks(long rootProcessDefinitionId, QueryOptions queryOptions) throws SBonitaReadException
Search the assigned and pending human tasks for any user, on the specified root process definition, corresponding to the options.- Parameters:
rootProcessDefinitionId
- The identifier of the root process definitionqueryOptions
- The search conditions and the options for sorting and paging the results.- Returns:
- The assigned and pending human tasks
- Throws:
SBonitaReadException
- Since:
- 6.3.3
-
getNumberOfAssignedAndPendingHumanTasks
long getNumberOfAssignedAndPendingHumanTasks(QueryOptions queryOptions) throws SBonitaReadException
Get the total number of the assigned and pending human tasks for any user corresponding to the options.- Parameters:
queryOptions
- The search conditions and the options for sorting and paging the results.- Returns:
- The assigned and pending human tasks
- Throws:
SBonitaReadException
- Since:
- 7.6.1
-
searchAssignedAndPendingHumanTasks
java.util.List<SHumanTaskInstance> searchAssignedAndPendingHumanTasks(QueryOptions queryOptions) throws SBonitaReadException
Search the assigned and pending human tasks for any user corresponding to the options.- Parameters:
queryOptions
- The search conditions and the options for sorting and paging the results.- Returns:
- The assigned and pending human tasks
- Throws:
SBonitaReadException
- Since:
- 7.6.1
-
-