Class ProcessDefinitionServiceImpl
java.lang.Object
org.bonitasoft.engine.core.process.definition.ProcessDefinitionServiceImpl
- All Implemented Interfaces:
ProcessDefinitionService
- Author:
- Baptiste Mesta, Matthieu Chaffotte, Zhao Na, Yanyan Liu, Hongwen Zang, Celine Souchet, Arthur Freycon
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.bonitasoft.engine.bpm.bar.ProcessDefinitionBARContributionFields inherited from interface org.bonitasoft.engine.core.process.definition.ProcessDefinitionService
GROUP_ID, PROCESS_CACHE_NAME, PROCESS_DEFINITION_ID, PROCESSDEFINITION, PROCESSDEFINITION_CONTENT, PROCESSDEFINITION_DEPLOY_INFO, PROCESSDEFINITION_IS_DISABLED, PROCESSDEFINITION_IS_ENABLED, PROCESSDEFINITION_IS_RESOLVED, PROCESSDEFINITION_IS_UNRESOLVED, ROLE_ID, STARTED_BY_SUFFIX, UNCATEGORIZED_SUFFIX, UNCATEGORIZED_SUPERVISED_BY_SUFFIX, UNCATEGORIZED_USERCANSTART_SUFFIX, USER_ID, WHOCANSTART_PROCESS_SUFFIX -
Constructor Summary
ConstructorsConstructorDescriptionProcessDefinitionServiceImpl(Recorder recorder, ReadPersistenceService persistenceService, SessionService sessionService, ReadSessionAccessor sessionAccessor, QueriableLoggerService queriableLoggerService, CacheService cacheService) -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(long processId) Delete the id specified process definition and its deploy infovoiddisableProcess(long processId, boolean failIfAlreadyDisabled) Disable the process passed as parameter.voiddisableProcessDeploymentInfo(long processId) Disable the process passed as parameter.voidenableProcess(long processId, boolean failIfAlreadyEnabled) Enable the specific process definition, when it is in RESOLVED state.voidenableProcessDeploymentInfo(long processId) Enable the specific process definition, set the process as ENABLED when it is in RESOLVED state.protected longorg.bonitasoft.engine.bpm.process.DesignProcessDefinitiongetDesignProcessDefinition(long processDefinitionId) Returns a specific process definition that include informations such as tasks definition, actors...protected org.bonitasoft.engine.expression.ExpressiongetExpression(org.bonitasoft.engine.bpm.process.DesignProcessDefinition processDefinition, long expressionDefinitionId) longgetLatestProcessDefinitionId(String processName) Get the processDefinitionId of the most recent version of the processgetNextFlowNode(SProcessDefinition definition, String source) Get target flow node for the given source flow node in the specific processlongGets how many processes are defined.longgetNumberOfProcessDeploymentInfos(long userId, QueryOptions countOptions, String querySuffix) Get total number of process definitions for the specific user who can perform the "querySuffix" specified actionlonggetNumberOfProcessDeploymentInfos(QueryOptions countOptions) Get number of all process definition deploy infos according to the specific search criterialonggetNumberOfProcessDeploymentInfosByActivationState(org.bonitasoft.engine.bpm.process.ActivationState activationState) Gets how many processes are in the given state.longgetNumberOfProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions countOptions) Get number of all process definitions for the specific user who can startlonggetNumberOfProcessDeploymentInfosCanBeStartedByUsersManagedBy(long managerUserId, QueryOptions countOptions) Get number of all process definitions for the users managed by specific manager, or manager who can startlonggetNumberOfProcessDeploymentInfosStartedBy(long startedBy, QueryOptions countOptions) Get number of all process deploy info started by the specific usergetNumberOfProcessDeploymentInfosUnrelatedToCategory(long categoryId) Get number of SProcessDefinitionDeployInfos unrelated to the specific categorylongGet the total number of the process definitions that have instances with one or more human tasks assigned/pending.longgetNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor(long userId, QueryOptions queryOptions) Get the total number of the process definitions that have one or more human tasks assigned/pending for a specific user.longgetNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy(long userId, QueryOptions queryOptions) Get the total number of the process definitions supervised by a specific user, that have instances with one or more human tasks assigned/pending.longgetNumberOfUncategorizedProcessDeploymentInfos(QueryOptions countOptions) Get total number of uncategorized process definitions by given query criterialonggetNumberOfUncategorizedProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions countOptions) Get total number of uncategorized process definitions for the specific user who can startlonggetNumberOfUncategorizedProcessDeploymentInfosSupervisedBy(long userId, QueryOptions countOptions) Get total number of uncategorized process definitions by given query criteria for specific supervisorlonggetNumberOfUsersWhoCanStartProcessDeploymentInfo(long processDefinitionId, QueryOptions queryOptions) Get total number of users according to specific query options, and who can start the given process definitiongetProcessDefinition(long processId) Get processDefinition by its idlonggetProcessDefinitionId(String name, String version) Get the processDefinitionId by name and versiongetProcessDefinitionIds(int fromIndex, int numberOfResults) Get the process definition identifiers.getProcessDefinitionIds(org.bonitasoft.engine.bpm.process.ActivationState activationState, int fromIndex, int numberOfResults) Get the process definition identifiers in the given state.getProcessDefinitionIfIsEnabled(long processDefinitionId) Get processDefinition by its id, if it is enabled.getProcessDeploymentInfo(long processId) Get deployment info of the process definition having the id given in parametergetProcessDeploymentInfos(int fromIndex, int numberPerPage, String field, OrderByType order) Get process definition deploy info in a specific interval with order, this can be used for paginationgetProcessDeploymentInfos(List<Long> processIds) getProcessDeploymentInfos(List<Long> processIds, int fromIndex, int numberOfProcesses, String field, OrderByType order) get sub set of processDefinitionDeployInfos in specific ordergetProcessDeploymentInfos(QueryOptions queryOptions) Get process definition deploy info in a specific interval with order, this can be used for paginationgetProcessDeploymentInfosFromArchivedProcessInstanceIds(List<Long> archivedProcessInstantsIds) Get A list of SProcessDefinitionDeployInfos for the specific archived processInstancesgetProcessDeploymentInfosFromProcessInstanceIds(List<Long> processInstanceIds) A list of SProcessDefinitionDeployInfos for the specific processInstancesgetProcessDeploymentInfosUnrelatedToCategory(long categoryId, int pageIndex, int numberPerPage, org.bonitasoft.engine.bpm.process.ProcessDeploymentInfoCriterion pagingCriterion) Get A list of SProcessDefinitionDeployInfos unrelated to the specific categorygetProcessDeploymentInfosWithActorOnlyForGroup(long groupId, QueryOptions queryOptions) List all processes that contain at least one task which actor is mapped only to the specified group.getProcessDeploymentInfosWithActorOnlyForGroups(List<Long> groupIds, QueryOptions queryOptions) List all processes that contain at least one task which actor is mapped only to the specified groups.getProcessDeploymentInfosWithActorOnlyForRole(long roleId, QueryOptions queryOptions) List all processes that contain at least one task which actor is mapped only to the specified role.getProcessDeploymentInfosWithActorOnlyForRoles(List<Long> roleIds, QueryOptions queryOptions) List all processes that contain at least one task which actor is mapped only to the specified roles.getProcessDeploymentInfosWithActorOnlyForUser(long userId, QueryOptions queryOptions) List all processes that contain at least one task which actor is mapped only to the specified user.getProcessDeploymentInfosWithActorOnlyForUsers(List<Long> userIds, QueryOptions queryOptions) List all processes that contain at least one task which actor is mapped only to the specified users.protected booleanvoidresolveProcess(long processId) set the process as RESOLVED when it is in UNRESOLVED statesearchProcessDeploymentInfos(long userId, QueryOptions searchOptions, String querySuffix) Search all process definitions for the specific user who can perform the "querySuffix" specified actionsearchProcessDeploymentInfos(QueryOptions searchOptions) Search all process definition deploy infos according to the specific search criteriasearchProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions searchOptions) Search all process definitions for the specific user who can startsearchProcessDeploymentInfosCanBeStartedByUsersManagedBy(long managerUserId, QueryOptions searchOptions) Search all process definitions for the users managed by specific manager, or manager who can startsearchProcessDeploymentInfosOfCategory(long categoryId, QueryOptions queryOptions) Search all process definitions for a specific category.searchProcessDeploymentInfosStartedBy(long startedBy, QueryOptions searchOptions) Search all process deploy info started by the specific userSearch all process definitions that have instances with one or more human tasks assigned/pending.searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor(long userId, QueryOptions queryOptions) Search all process definitions that have one or more human tasks assigned/pending for a specific user.searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy(long userId, QueryOptions queryOptions) Search all process definitions supervised by a specific user, that have instances with one or more human tasks assigned/pending.searchUncategorizedProcessDeploymentInfos(QueryOptions searchOptions) Search all uncategorized process definitions according to the search criteria.searchUncategorizedProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions searchOptions) Search all uncategorized process definitions for the specific user who can startsearchUncategorizedProcessDeploymentInfosSupervisedBy(long userId, QueryOptions searchOptions) Search all uncategorized process definitions by given query criteria for specific supervisorsearchUsersWhoCanStartProcessDeploymentInfo(long processDefinitionId, QueryOptions queryOptions) Search users according to specific query options, and who can start the given process definitionstore(org.bonitasoft.engine.bpm.process.DesignProcessDefinition designProcessDefinition) Store the processDefinition to file system and its deploy info to DB.voidupdateExpressionContent(long processDefinitionId, long expressionDefinitionId, String content) Updates the content of an Expression, for a given process definition.updateProcessDefinitionDeployInfo(long processId, EntityUpdateDescriptor descriptor) Update deployment info of the process definition having the id given in parameter
-
Field Details
-
processDefinitionBARContribution
protected org.bonitasoft.engine.bpm.bar.ProcessDefinitionBARContribution processDefinitionBARContribution
-
-
Constructor Details
-
ProcessDefinitionServiceImpl
public ProcessDefinitionServiceImpl(Recorder recorder, ReadPersistenceService persistenceService, SessionService sessionService, ReadSessionAccessor sessionAccessor, QueriableLoggerService queriableLoggerService, CacheService cacheService)
-
-
Method Details
-
delete
public void delete(long processId) throws SProcessDefinitionNotFoundException, SProcessDeletionException, SDeletingEnabledProcessException Description copied from interface:ProcessDefinitionServiceDelete the id specified process definition and its deploy info- Specified by:
deletein interfaceProcessDefinitionService- Parameters:
processId- identifier of processDefinition- Throws:
SProcessDefinitionNotFoundException- error thrown if no process definition foundSProcessDeletionExceptionSDeletingEnabledProcessException- error throw if the process still enabled
-
disableProcessDeploymentInfo
public void disableProcessDeploymentInfo(long processId) throws SProcessDefinitionNotFoundException, SProcessDisablementException Description copied from interface:ProcessDefinitionServiceDisable the process passed as parameter. If process is already disabled, this method fails with SProcessDisablementException.- Specified by:
disableProcessDeploymentInfoin interfaceProcessDefinitionService- Parameters:
processId- identifier of process definition- Throws:
SProcessDefinitionNotFoundException- error thrown if no process definition found for the given processIdSProcessDisablementException- if process is already disabled- See Also:
-
disableProcess
public void disableProcess(long processId, boolean failIfAlreadyDisabled) throws SProcessDefinitionNotFoundException, SProcessDisablementException Description copied from interface:ProcessDefinitionServiceDisable the process passed as parameter.- Specified by:
disableProcessin interfaceProcessDefinitionService- Parameters:
processId- identifier of process definitionfailIfAlreadyDisabled- should we fail if process is already disabled?- Throws:
SProcessDefinitionNotFoundException- error thrown if no process definition found for the given processIdSProcessDisablementException- if process is already disabled and failIfAlreadyDisabled == true
-
enableProcessDeploymentInfo
public void enableProcessDeploymentInfo(long processId) throws SProcessDefinitionNotFoundException, SProcessEnablementException Description copied from interface:ProcessDefinitionServiceEnable the specific process definition, set the process as ENABLED when it is in RESOLVED state. If process is already enabled, this method fails with SProcessEnablementException- Specified by:
enableProcessDeploymentInfoin interfaceProcessDefinitionService- Parameters:
processId- identifier of processDefinition- Throws:
SProcessDefinitionNotFoundException- error thrown if no process definition found for the given processIdSProcessEnablementException- if process is already enabled or if process is not resolved- See Also:
-
enableProcess
public void enableProcess(long processId, boolean failIfAlreadyEnabled) throws SProcessDefinitionNotFoundException, SProcessEnablementException Description copied from interface:ProcessDefinitionServiceEnable the specific process definition, when it is in RESOLVED state.- Specified by:
enableProcessin interfaceProcessDefinitionService- Parameters:
processId- identifier of processDefinitionfailIfAlreadyEnabled- should we fail if process is already enabled?- Throws:
SProcessDefinitionNotFoundException- error thrown if no process definition found for the given processIdSProcessEnablementException- if process is already enabled and failIfAlreadyEnabled == true, or if process is not resolved
-
getProcessDeploymentInfos
public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfos(int fromIndex, int numberPerPage, String field, OrderByType order) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet process definition deploy info in a specific interval with order, this can be used for pagination- Specified by:
getProcessDeploymentInfosin interfaceProcessDefinitionService- Parameters:
fromIndex- Index of the record to be retrieved from. First record has index 0numberPerPage- Number of result we want to get. Maximum number of result returnedfield- the field user to do orderorder- ASC or DESC- Returns:
- a list of SProcessDefinitionDeployInfo object
- Throws:
SBonitaReadException
-
getNumberOfProcessDeploymentInfos
Description copied from interface:ProcessDefinitionServiceGets how many processes are defined.- Specified by:
getNumberOfProcessDeploymentInfosin interfaceProcessDefinitionService- Returns:
- the number of process definitions;
- Throws:
SBonitaReadException- occurs when an exception is thrown during method execution
-
getProcessDefinition
public SProcessDefinition getProcessDefinition(long processId) throws SProcessDefinitionNotFoundException, SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet processDefinition by its id- Specified by:
getProcessDefinitionin interfaceProcessDefinitionService- Parameters:
processId- identifier of processDefinition- Returns:
- the processDefinition corresponding to the parameter processId
- Throws:
SProcessDefinitionNotFoundException- error thrown if no process definition foundSBonitaReadException
-
getProcessDefinitionIfIsEnabled
public SProcessDefinition getProcessDefinitionIfIsEnabled(long processDefinitionId) throws SBonitaReadException, SProcessDefinitionException Description copied from interface:ProcessDefinitionServiceGet processDefinition by its id, if it is enabled. Throws SProcessDefinitionException otherwise.- Specified by:
getProcessDefinitionIfIsEnabledin interfaceProcessDefinitionService- Parameters:
processDefinitionId- The identifier of processDefinition- Returns:
- The processDefinition corresponding to the parameter processId
- Throws:
SBonitaReadExceptionSProcessDefinitionException- if process is not enabled.
-
generateId
protected long generateId() -
getProcessDeploymentInfo
public SProcessDefinitionDeployInfo getProcessDeploymentInfo(long processId) throws SProcessDefinitionNotFoundException, SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet deployment info of the process definition having the id given in parameter- Specified by:
getProcessDeploymentInfoin interfaceProcessDefinitionService- Parameters:
processId- id of the process definition on which we want deployment information- Returns:
- an SProcessDefinitionDeployInfo object to the process definition
- Throws:
SProcessDefinitionNotFoundException- error thrown if no process definition foundSBonitaReadException
-
store
public SProcessDefinition store(org.bonitasoft.engine.bpm.process.DesignProcessDefinition designProcessDefinition) throws SProcessDefinitionException Description copied from interface:ProcessDefinitionServiceStore the processDefinition to file system and its deploy info to DB.- Specified by:
storein interfaceProcessDefinitionService- Parameters:
designProcessDefinition- the processDefinition will be stored- Returns:
- the definition will an id
- Throws:
SProcessDefinitionException
-
resolveProcess
public void resolveProcess(long processId) throws SProcessDefinitionNotFoundException, SProcessDisablementException Description copied from interface:ProcessDefinitionServiceset the process as RESOLVED when it is in UNRESOLVED state- Specified by:
resolveProcessin interfaceProcessDefinitionService- Parameters:
processId- identifier of process definition- Throws:
SProcessDefinitionNotFoundException- error thrown if no process definition found for the given processIdSProcessDisablementException
-
getNumberOfProcessDeploymentInfosByActivationState
public long getNumberOfProcessDeploymentInfosByActivationState(org.bonitasoft.engine.bpm.process.ActivationState activationState) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGets how many processes are in the given state.- Specified by:
getNumberOfProcessDeploymentInfosByActivationStatein interfaceProcessDefinitionService- Parameters:
activationState- the activation state- Returns:
- number of processes are in the given state or 0;
- Throws:
SBonitaReadException
-
getProcessDefinitionIds
public List<Long> getProcessDefinitionIds(org.bonitasoft.engine.bpm.process.ActivationState activationState, int fromIndex, int numberOfResults) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet the process definition identifiers in the given state.- Specified by:
getProcessDefinitionIdsin interfaceProcessDefinitionService- Parameters:
activationState- the activation statefromIndex- Index of the record to be retrieved from. First record has index 0numberOfResults- Number of result we want to get. Maximum number of result returned- Returns:
- the paginated list of process definition identifiers or an empty list
- Throws:
SBonitaReadException
-
getProcessDefinitionIds
public List<Long> getProcessDefinitionIds(int fromIndex, int numberOfResults) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet the process definition identifiers. * @param fromIndex Index of the record to be retrieved from. First record has index 0- Specified by:
getProcessDefinitionIdsin interfaceProcessDefinitionServicenumberOfResults- Number of result we want to get. Maximum number of result returned- Returns:
- the paginated list of process definition identifiers or an empty list
- Throws:
SBonitaReadException
-
getNextFlowNode
Description copied from interface:ProcessDefinitionServiceGet target flow node for the given source flow node in the specific process- Specified by:
getNextFlowNodein interfaceProcessDefinitionService- Parameters:
definition- the process definition containing source flow nodesource- a flow node in process definition- Returns:
- target flow node of the given source
-
getProcessDeploymentInfos
public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfos(List<Long> processIds, int fromIndex, int numberOfProcesses, String field, OrderByType order) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceget sub set of processDefinitionDeployInfos in specific order- Specified by:
getProcessDeploymentInfosin interfaceProcessDefinitionService- Parameters:
processIds- identifiers of process definitionfromIndex- Index of the record to be retrieved from. First record has index 0numberOfProcesses- Number of result we want to get. Maximum number of result returnedfield- filed user to do orderorder- ASC or DESC- Returns:
- a list of SProcessDefinitionDeployInfo objects
- Throws:
SBonitaReadException
-
getProcessDeploymentInfos
public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfos(List<Long> processIds) throws SBonitaReadException - Specified by:
getProcessDeploymentInfosin interfaceProcessDefinitionService- Throws:
SBonitaReadException
-
getLatestProcessDefinitionId
public long getLatestProcessDefinitionId(String processName) throws SBonitaReadException, SProcessDefinitionNotFoundException Description copied from interface:ProcessDefinitionServiceGet the processDefinitionId of the most recent version of the process- Specified by:
getLatestProcessDefinitionIdin interfaceProcessDefinitionService- Parameters:
processName- name of process definition- Returns:
- the latest process definition
- Throws:
SBonitaReadExceptionSProcessDefinitionNotFoundException
-
getProcessDefinitionId
public long getProcessDefinitionId(String name, String version) throws SBonitaReadException, SProcessDefinitionNotFoundException Description copied from interface:ProcessDefinitionServiceGet the processDefinitionId by name and version- Specified by:
getProcessDefinitionIdin interfaceProcessDefinitionService- Parameters:
name- name of process definitionversion- version or process definition- Returns:
- identifier of process definition
- Throws:
SBonitaReadExceptionSProcessDefinitionNotFoundException
-
updateProcessDefinitionDeployInfo
public SProcessDefinitionDeployInfo updateProcessDefinitionDeployInfo(long processId, EntityUpdateDescriptor descriptor) throws SProcessDefinitionNotFoundException, SProcessDeploymentInfoUpdateException Description copied from interface:ProcessDefinitionServiceUpdate deployment info of the process definition having the id given in parameter- Specified by:
updateProcessDefinitionDeployInfoin interfaceProcessDefinitionService- Parameters:
processId- identifier of process deploy infodescriptor- update description- Throws:
SProcessDefinitionNotFoundException- error thrown when no process deploy info found with the give processIdSProcessDeploymentInfoUpdateException
-
searchProcessDeploymentInfosStartedBy
public List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosStartedBy(long startedBy, QueryOptions searchOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceSearch all process deploy info started by the specific user- Specified by:
searchProcessDeploymentInfosStartedByin interfaceProcessDefinitionService- Parameters:
startedBy- the name of user who started the processsearchOptions- a QueryOptions object containing some query conditions- Returns:
- a list of SProcessDefinitionDeployInfo objects
- Throws:
SBonitaReadException
-
getNumberOfProcessDeploymentInfosStartedBy
public long getNumberOfProcessDeploymentInfosStartedBy(long startedBy, QueryOptions countOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet number of all process deploy info started by the specific user- Specified by:
getNumberOfProcessDeploymentInfosStartedByin interfaceProcessDefinitionService- Parameters:
startedBy- the name of user who started the processcountOptions- a QueryOptions object containing some query conditions- Returns:
- number of all process deploy info to the criteria
- Throws:
SBonitaReadException
-
searchProcessDeploymentInfos
public List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfos(QueryOptions searchOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceSearch all process definition deploy infos according to the specific search criteria- Specified by:
searchProcessDeploymentInfosin interfaceProcessDefinitionService- Parameters:
searchOptions- a QueryOptions object containing search criteria- Returns:
- a list of SProcessDefinitionDeployInfo object
- Throws:
SBonitaReadException
-
getNumberOfProcessDeploymentInfos
public long getNumberOfProcessDeploymentInfos(QueryOptions countOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet number of all process definition deploy infos according to the specific search criteria- Specified by:
getNumberOfProcessDeploymentInfosin interfaceProcessDefinitionService- Parameters:
countOptions- a QueryOptions object containing query criteria- Returns:
- number of all process definition deploy infos corresponding to the criteria
- Throws:
SBonitaReadException
-
searchProcessDeploymentInfosCanBeStartedBy
public List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions searchOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceSearch all process definitions for the specific user who can start- Specified by:
searchProcessDeploymentInfosCanBeStartedByin interfaceProcessDefinitionService- Parameters:
userId- identifier of usersearchOptions- a QueryOptions object containing query criteria- Returns:
- a list of SProcessDefinitionDeployInfo objects
- Throws:
SBonitaReadException
-
getNumberOfProcessDeploymentInfosCanBeStartedBy
public long getNumberOfProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions countOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet number of all process definitions for the specific user who can start- Specified by:
getNumberOfProcessDeploymentInfosCanBeStartedByin interfaceProcessDefinitionService- Parameters:
userId- identifier of usercountOptions- a QueryOptions object containing query criteria- Returns:
- number of all process definitions for the specific user who can start
- Throws:
SBonitaReadException
-
searchProcessDeploymentInfosCanBeStartedByUsersManagedBy
public List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosCanBeStartedByUsersManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceSearch all process definitions for the users managed by specific manager, or manager who can start- Specified by:
searchProcessDeploymentInfosCanBeStartedByUsersManagedByin interfaceProcessDefinitionService- Parameters:
managerUserId- identifier of managersearchOptions- a QueryOptions object containing query criteria- Returns:
- a list of SProcessDefinitionDeployInfo objects
- Throws:
SBonitaReadException
-
getNumberOfProcessDeploymentInfosCanBeStartedByUsersManagedBy
public long getNumberOfProcessDeploymentInfosCanBeStartedByUsersManagedBy(long managerUserId, QueryOptions countOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet number of all process definitions for the users managed by specific manager, or manager who can start- Specified by:
getNumberOfProcessDeploymentInfosCanBeStartedByUsersManagedByin interfaceProcessDefinitionService- Parameters:
managerUserId- identifier of managercountOptions- a QueryOptions object containing query criteria- Returns:
- Number of all process definitions for the users managed by specific manager, or manager who can start
- Throws:
SBonitaReadException
-
searchProcessDeploymentInfos
public List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfos(long userId, QueryOptions searchOptions, String querySuffix) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceSearch all process definitions for the specific user who can perform the "querySuffix" specified action- Specified by:
searchProcessDeploymentInfosin interfaceProcessDefinitionService- Parameters:
userId- identifier of usersearchOptions- a QueryOptions object containing query criteriaquerySuffix- query suffix to specify the thing the user can do, it can be "UserSupervised" or "UserCanStart"- Returns:
- a list of SProcessDefinitionDeployInfo object
- Throws:
SBonitaReadException
-
getNumberOfProcessDeploymentInfos
public long getNumberOfProcessDeploymentInfos(long userId, QueryOptions countOptions, String querySuffix) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet total number of process definitions for the specific user who can perform the "querySuffix" specified action- Specified by:
getNumberOfProcessDeploymentInfosin interfaceProcessDefinitionService- Parameters:
userId- identifier of usercountOptions- a QueryOptions object containing query criteriaquerySuffix- query suffix to specify the thing the user can do, it can be "UserSupervised" or "UserCanStart"- Returns:
- number of process definitions for the specific user with specific action
- Throws:
SBonitaReadException
-
getNumberOfUncategorizedProcessDeploymentInfos
public long getNumberOfUncategorizedProcessDeploymentInfos(QueryOptions countOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet total number of uncategorized process definitions by given query criteria- Specified by:
getNumberOfUncategorizedProcessDeploymentInfosin interfaceProcessDefinitionService- Parameters:
countOptions- a QueryOptions object containing query criteria- Returns:
- total number of uncategorized process definitions suit to query criteria
- Throws:
SBonitaReadException
-
searchUncategorizedProcessDeploymentInfos
public List<SProcessDefinitionDeployInfo> searchUncategorizedProcessDeploymentInfos(QueryOptions searchOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceSearch all uncategorized process definitions according to the search criteria.- Specified by:
searchUncategorizedProcessDeploymentInfosin interfaceProcessDefinitionService- Parameters:
searchOptions- a QueryOptions object containing query criteria- Returns:
- a list of SProcessDefinitionDeployInfo objects
- Throws:
SBonitaReadException
-
getNumberOfUncategorizedProcessDeploymentInfosSupervisedBy
public long getNumberOfUncategorizedProcessDeploymentInfosSupervisedBy(long userId, QueryOptions countOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet total number of uncategorized process definitions by given query criteria for specific supervisor- Specified by:
getNumberOfUncategorizedProcessDeploymentInfosSupervisedByin interfaceProcessDefinitionService- Parameters:
userId- identifier of a supervisor usercountOptions- a QueryOptions object containing query criteria- Returns:
- number of uncategorized process definitions managed by the specific supervisor
- Throws:
SBonitaReadException
-
searchUncategorizedProcessDeploymentInfosSupervisedBy
public List<SProcessDefinitionDeployInfo> searchUncategorizedProcessDeploymentInfosSupervisedBy(long userId, QueryOptions searchOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceSearch all uncategorized process definitions by given query criteria for specific supervisor- Specified by:
searchUncategorizedProcessDeploymentInfosSupervisedByin interfaceProcessDefinitionService- Parameters:
userId- identifier of a supervisor usersearchOptions- a QueryOptions object containing query criteria- Returns:
- a list of SProcessDefinitionDeployInfo object
- Throws:
SBonitaReadException
-
searchUncategorizedProcessDeploymentInfosCanBeStartedBy
public List<SProcessDefinitionDeployInfo> searchUncategorizedProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions searchOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceSearch all uncategorized process definitions for the specific user who can start- Specified by:
searchUncategorizedProcessDeploymentInfosCanBeStartedByin interfaceProcessDefinitionService- Parameters:
userId- identifier of usersearchOptions- a QueryOptions object containing query criteria- Returns:
- a list of SProcessDefinitionDeployInfo object
- Throws:
SBonitaReadException
-
getNumberOfUncategorizedProcessDeploymentInfosCanBeStartedBy
public long getNumberOfUncategorizedProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions countOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet total number of uncategorized process definitions for the specific user who can start- Specified by:
getNumberOfUncategorizedProcessDeploymentInfosCanBeStartedByin interfaceProcessDefinitionService- Parameters:
userId- identifier of usercountOptions- a QueryOptions object containing query criteria- Returns:
- number of uncategorized process definitions for the specific user who can start
- Throws:
SBonitaReadException
-
getProcessDeploymentInfosFromProcessInstanceIds
public Map<Long,SProcessDefinitionDeployInfo> getProcessDeploymentInfosFromProcessInstanceIds(List<Long> processInstanceIds) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceA list of SProcessDefinitionDeployInfos for the specific processInstances- Specified by:
getProcessDeploymentInfosFromProcessInstanceIdsin interfaceProcessDefinitionService- Parameters:
processInstanceIds- identifier of process instances- Returns:
- a map containing identifiers of process instance and the corresponding SProcessDefinitionDeployInfo object
- Throws:
SBonitaReadException
-
getProcessDeploymentInfosFromArchivedProcessInstanceIds
public Map<Long,SProcessDefinitionDeployInfo> getProcessDeploymentInfosFromArchivedProcessInstanceIds(List<Long> archivedProcessInstantsIds) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet A list of SProcessDefinitionDeployInfos for the specific archived processInstances- Specified by:
getProcessDeploymentInfosFromArchivedProcessInstanceIdsin interfaceProcessDefinitionService- Parameters:
archivedProcessInstantsIds- identifiers of archived processInstance- Returns:
- a map containing identifiers of archived process instance and the corresponding SProcessDefinitionDeployInfo object
- Throws:
SBonitaReadException
-
searchProcessDeploymentInfosOfCategory
public List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosOfCategory(long categoryId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceSearch all process definitions for a specific category.- Specified by:
searchProcessDeploymentInfosOfCategoryin interfaceProcessDefinitionService- Parameters:
categoryId- Identifier of the categoryqueryOptions- a QueryOptions object containing query criteria- Returns:
- a list of SProcessDefinitionDeployInfo objects
- Throws:
SBonitaReadException
-
getProcessDeploymentInfos
public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfos(QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet process definition deploy info in a specific interval with order, this can be used for pagination- Specified by:
getProcessDeploymentInfosin interfaceProcessDefinitionService- Parameters:
queryOptions- object containing query criteria- Returns:
- a list of SProcessDefinitionDeployInfo corresponding to the criteria
- Throws:
SBonitaReadException
-
getProcessDeploymentInfosWithActorOnlyForGroup
public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForGroup(long groupId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceList all processes that contain at least one task which actor is mapped only to the specified group.- Specified by:
getProcessDeploymentInfosWithActorOnlyForGroupin interfaceProcessDefinitionService- Parameters:
groupId- the Id of the group from which to retrieve the processes with tasks only it can do.queryOptions- object containing query criteria- Returns:
- the list of matching processes, as a List of
SProcessDefinitionDeployInfo - Throws:
SBonitaReadException- in case a read problem occurs
-
getProcessDeploymentInfosWithActorOnlyForGroups
public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForGroups(List<Long> groupIds, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceList all processes that contain at least one task which actor is mapped only to the specified groups.- Specified by:
getProcessDeploymentInfosWithActorOnlyForGroupsin interfaceProcessDefinitionService- Parameters:
groupIds- the Ids of the groups from which to retrieve the processes with tasks only they can do.queryOptions- object containing query criteria- Returns:
- the list of matching processes, as a List of
SProcessDefinitionDeployInfo - Throws:
SBonitaReadException- in case a read problem occurs
-
getProcessDeploymentInfosWithActorOnlyForRole
public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForRole(long roleId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceList all processes that contain at least one task which actor is mapped only to the specified role.- Specified by:
getProcessDeploymentInfosWithActorOnlyForRolein interfaceProcessDefinitionService- Parameters:
roleId- the Id of the role from which to retrieve the processes with tasks only it can do.queryOptions- object containing query criteria- Returns:
- the list of matching processes, as a List of
SProcessDefinitionDeployInfo - Throws:
SBonitaReadException- in case a read problem occurs
-
getProcessDeploymentInfosWithActorOnlyForRoles
public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForRoles(List<Long> roleIds, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceList all processes that contain at least one task which actor is mapped only to the specified roles.- Specified by:
getProcessDeploymentInfosWithActorOnlyForRolesin interfaceProcessDefinitionService- Parameters:
roleIds- the Ids of the roles from which to retrieve the processes with tasks only they can do.queryOptions- object containing query criteria- Returns:
- the list of matching processes, as a List of
SProcessDefinitionDeployInfo - Throws:
SBonitaReadException- in case a read problem occurs
-
getProcessDeploymentInfosWithActorOnlyForUser
public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForUser(long userId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceList all processes that contain at least one task which actor is mapped only to the specified user.- Specified by:
getProcessDeploymentInfosWithActorOnlyForUserin interfaceProcessDefinitionService- Parameters:
userId- the Id of the user from which to retrieve the processes with tasks only he / she can do.queryOptions- object containing query criteria- Returns:
- the list of matching processes, as a List of
SProcessDefinitionDeployInfo - Throws:
SBonitaReadException- in case a read problem occurs
-
getProcessDeploymentInfosWithActorOnlyForUsers
public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForUsers(List<Long> userIds, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceList all processes that contain at least one task which actor is mapped only to the specified users.- Specified by:
getProcessDeploymentInfosWithActorOnlyForUsersin interfaceProcessDefinitionService- Parameters:
userIds- the Ids of the users from which to retrieve the processes with tasks only they can do.queryOptions- object containing query criteria- Returns:
- the list of matching processes, as a List of
SProcessDefinitionDeployInfo - Throws:
SBonitaReadException- in case a read problem occurs
-
getNumberOfUsersWhoCanStartProcessDeploymentInfo
public long getNumberOfUsersWhoCanStartProcessDeploymentInfo(long processDefinitionId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet total number of users according to specific query options, and who can start the given process definition- Specified by:
getNumberOfUsersWhoCanStartProcessDeploymentInfoin interfaceProcessDefinitionService- Parameters:
processDefinitionId- Identifier of the process definitionqueryOptions- The QueryOptions object containing some query conditions- Returns:
- Throws:
SBonitaReadException
-
searchUsersWhoCanStartProcessDeploymentInfo
public List<SUser> searchUsersWhoCanStartProcessDeploymentInfo(long processDefinitionId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceSearch users according to specific query options, and who can start the given process definition- Specified by:
searchUsersWhoCanStartProcessDeploymentInfoin interfaceProcessDefinitionService- Parameters:
processDefinitionId- Identifier of the process definitionqueryOptions- The QueryOptions object containing some query conditions- Returns:
- Throws:
SBonitaReadException
-
getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor
public long getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor(long userId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet the total number of the process definitions that have one or more human tasks assigned/pending for a specific user. The tasks are in stable state, not in terminal/executing state.- Specified by:
getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksForin interfaceProcessDefinitionService- Parameters:
userId- The identifier of the user.queryOptions- The QueryOptions object containing some query conditions- Returns:
- The number of the process definition
- Throws:
SBonitaReadException
-
searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor
public List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor(long userId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceSearch all process definitions that have one or more human tasks assigned/pending for a specific user. The tasks are in stable state, not in terminal/executing state.- Specified by:
searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksForin interfaceProcessDefinitionService- Parameters:
userId- The identifier of the user.queryOptions- The QueryOptions object containing some query conditions- Returns:
- The list of process definitions
- Throws:
SBonitaReadException
-
getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy
public long getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy(long userId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet the total number of the process definitions supervised by a specific user, that have instances with one or more human tasks assigned/pending. The tasks are in stable state, not in terminal/executing state.- Specified by:
getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedByin interfaceProcessDefinitionService- Parameters:
userId- The identifier of the user.queryOptions- The QueryOptions object containing some query conditions- Returns:
- The number of the process definition
- Throws:
SBonitaReadException- if an exception occurs when getting the process deployment information.
-
searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy
public List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy(long userId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceSearch all process definitions supervised by a specific user, that have instances with one or more human tasks assigned/pending. The tasks are in stable state, not in terminal/executing state.- Specified by:
searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedByin interfaceProcessDefinitionService- Parameters:
userId- The identifier of the user.queryOptions- The QueryOptions object containing some query conditions- Returns:
- The list of process definitions
- Throws:
SBonitaReadException- if an exception occurs when getting the process deployment information.
-
getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasks
public long getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasks(QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceGet the total number of the process definitions that have instances with one or more human tasks assigned/pending. The tasks are in stable state, not in terminal/executing state.- Specified by:
getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksin interfaceProcessDefinitionService- Parameters:
queryOptions- The QueryOptions object containing some query conditions- Returns:
- The number of the process definition
- Throws:
SBonitaReadException- if an exception occurs when getting the process deployment information.
-
searchProcessDeploymentInfosWithAssignedOrPendingHumanTasks
public List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosWithAssignedOrPendingHumanTasks(QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:ProcessDefinitionServiceSearch all process definitions that have instances with one or more human tasks assigned/pending. The tasks are in stable state, not in terminal/executing state.- Specified by:
searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksin interfaceProcessDefinitionService- Parameters:
queryOptions- The QueryOptions object containing some query conditions- Returns:
- The list of process definitions
- Throws:
SBonitaReadException- if an exception occurs when getting the process deployment information.
-
getDesignProcessDefinition
public org.bonitasoft.engine.bpm.process.DesignProcessDefinition getDesignProcessDefinition(long processDefinitionId) throws SProcessDefinitionNotFoundException, SBonitaReadException Description copied from interface:ProcessDefinitionServiceReturns a specific process definition that include informations such as tasks definition, actors...- Specified by:
getDesignProcessDefinitionin interfaceProcessDefinitionService- Parameters:
processDefinitionId- Identifier of process definition- Returns:
- The corresponding process definition with informations.
- Throws:
SProcessDefinitionNotFoundException- If the process definition doesn't exist.SBonitaReadException- If the process definition design cannot be read
-
updateExpressionContent
public void updateExpressionContent(long processDefinitionId, long expressionDefinitionId, String content) throws SProcessDefinitionNotFoundException, SObjectModificationException Description copied from interface:ProcessDefinitionServiceUpdates the content of an Expression, for a given process definition. Any further use of this expresssion will then use the new content, as if it was designed like this in the first place.- Specified by:
updateExpressionContentin interfaceProcessDefinitionService- Parameters:
processDefinitionId- the ID of the process definition on which the Expression content will be updated.expressionDefinitionId- the ID of the expression definition to updatecontent- the new String content of the expression- Throws:
SProcessDefinitionNotFoundException- if the referenced process definition does not exist.SObjectModificationException- if the update cannot be performed successfully.
-
isValidExpressionTypeToUpdate
-
getExpression
protected org.bonitasoft.engine.expression.Expression getExpression(org.bonitasoft.engine.bpm.process.DesignProcessDefinition processDefinition, long expressionDefinitionId)
-