Interface ProcessDefinitionService
-
- All Known Implementing Classes:
ProcessDefinitionServiceImpl
public interface ProcessDefinitionService- Since:
- 6.0
- Author:
- Matthieu Chaffotte, Yanyan Liu, Celine Souchet, Arthur Freycon
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringGROUP_IDstatic java.lang.StringPROCESS_CACHE_NAMEstatic java.lang.StringPROCESS_DEFINITION_IDstatic java.lang.StringPROCESSDEFINITIONstatic java.lang.StringPROCESSDEFINITION_CONTENTstatic java.lang.StringPROCESSDEFINITION_DEPLOY_INFOstatic java.lang.StringPROCESSDEFINITION_IS_DISABLEDstatic java.lang.StringPROCESSDEFINITION_IS_ENABLEDstatic java.lang.StringPROCESSDEFINITION_IS_RESOLVEDstatic java.lang.StringPROCESSDEFINITION_IS_UNRESOLVEDstatic java.lang.StringROLE_IDstatic java.lang.StringSTARTED_BY_SUFFIXstatic java.lang.StringUNCATEGORIZED_SUFFIXstatic java.lang.StringUNCATEGORIZED_SUPERVISED_BY_SUFFIXstatic java.lang.StringUNCATEGORIZED_USERCANSTART_SUFFIXstatic java.lang.StringUSER_IDstatic java.lang.StringWHOCANSTART_PROCESS_SUFFIX
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddelete(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.org.bonitasoft.engine.bpm.process.DesignProcessDefinitiongetDesignProcessDefinition(long processDefinitionId)Returns a specific process definition that include informations such as tasks definition, actors...longgetLatestProcessDefinitionId(java.lang.String processName)Get the processDefinitionId of the most recent version of the processSFlowNodeDefinitiongetNextFlowNode(SProcessDefinition definition, java.lang.String source)Get target flow node for the given source flow node in the specific processlonggetNumberOfProcessDeploymentInfos()Gets how many processes are defined.longgetNumberOfProcessDeploymentInfos(long userId, QueryOptions countOptions, java.lang.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 userjava.lang.LonggetNumberOfProcessDeploymentInfosUnrelatedToCategory(long categoryId)Get number of SProcessDefinitionDeployInfos unrelated to the specific categorylonggetNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasks(QueryOptions queryOptions)Get 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 definitionSProcessDefinitiongetProcessDefinition(long processDefinitionId)Get processDefinition by its idlonggetProcessDefinitionId(java.lang.String name, java.lang.String version)Get the processDefinitionId by name and versionjava.util.List<java.lang.Long>getProcessDefinitionIds(int fromIndex, int numberOfResult)Get the process definition identifiers.java.util.List<java.lang.Long>getProcessDefinitionIds(org.bonitasoft.engine.bpm.process.ActivationState activationState, int fromIndex, int numberOfResult)Get the process definition identifiers in the given state.SProcessDefinitiongetProcessDefinitionIfIsEnabled(long processDefinitionId)Get processDefinition by its id, if it is enabled.SProcessDefinitionDeployInfogetProcessDeploymentInfo(long processId)Get deployment info of the process definition having the id given in parameterjava.util.List<SProcessDefinitionDeployInfo>getProcessDeploymentInfos(int fromIndex, int numberPerPage, java.lang.String field, OrderByType order)Get process definition deploy info in a specific interval with order, this can be used for paginationjava.util.List<SProcessDefinitionDeployInfo>getProcessDeploymentInfos(java.util.List<java.lang.Long> processIds)java.util.List<SProcessDefinitionDeployInfo>getProcessDeploymentInfos(java.util.List<java.lang.Long> processIds, int fromIndex, int numberOfProcesses, java.lang.String field, OrderByType order)get sub set of processDefinitionDeployInfos in specific orderjava.util.List<SProcessDefinitionDeployInfo>getProcessDeploymentInfos(QueryOptions queryOptions)Get process definition deploy info in a specific interval with order, this can be used for paginationjava.util.Map<java.lang.Long,SProcessDefinitionDeployInfo>getProcessDeploymentInfosFromArchivedProcessInstanceIds(java.util.List<java.lang.Long> archivedProcessInstantsIds)Get A list of SProcessDefinitionDeployInfos for the specific archived processInstancesjava.util.Map<java.lang.Long,SProcessDefinitionDeployInfo>getProcessDeploymentInfosFromProcessInstanceIds(java.util.List<java.lang.Long> processInstanceIds)A list of SProcessDefinitionDeployInfos for the specific processInstancesjava.util.List<SProcessDefinitionDeployInfo>getProcessDeploymentInfosUnrelatedToCategory(long categoryId, int pageIndex, int numberPerPage, org.bonitasoft.engine.bpm.process.ProcessDeploymentInfoCriterion pagingCriterion)Get A list of SProcessDefinitionDeployInfos unrelated to the specific categoryjava.util.List<SProcessDefinitionDeployInfo>getProcessDeploymentInfosWithActorOnlyForGroup(long groupId, QueryOptions queryOptions)List all processes that contain at least one task which actor is mapped only to the specified group.java.util.List<SProcessDefinitionDeployInfo>getProcessDeploymentInfosWithActorOnlyForGroups(java.util.List<java.lang.Long> groupIds, QueryOptions queryOptions)List all processes that contain at least one task which actor is mapped only to the specified groups.java.util.List<SProcessDefinitionDeployInfo>getProcessDeploymentInfosWithActorOnlyForRole(long roleId, QueryOptions queryOptions)List all processes that contain at least one task which actor is mapped only to the specified role.java.util.List<SProcessDefinitionDeployInfo>getProcessDeploymentInfosWithActorOnlyForRoles(java.util.List<java.lang.Long> roleIds, QueryOptions queryOptions)List all processes that contain at least one task which actor is mapped only to the specified roles.java.util.List<SProcessDefinitionDeployInfo>getProcessDeploymentInfosWithActorOnlyForUser(long userId, QueryOptions queryOptions)List all processes that contain at least one task which actor is mapped only to the specified user.java.util.List<SProcessDefinitionDeployInfo>getProcessDeploymentInfosWithActorOnlyForUsers(java.util.List<java.lang.Long> userIds, QueryOptions queryOptions)List all processes that contain at least one task which actor is mapped only to the specified users.voidresolveProcess(long processId)set the process as RESOLVED when it is in UNRESOLVED statejava.util.List<SProcessDefinitionDeployInfo>searchProcessDeploymentInfos(long userId, QueryOptions searchOptions, java.lang.String querySuffix)Search all process definitions for the specific user who can perform the "querySuffix" specified actionjava.util.List<SProcessDefinitionDeployInfo>searchProcessDeploymentInfos(QueryOptions searchOptions)Search all process definition deploy infos according to the specific search criteriajava.util.List<SProcessDefinitionDeployInfo>searchProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions searchOptions)Search all process definitions for the specific user who can startjava.util.List<SProcessDefinitionDeployInfo>searchProcessDeploymentInfosCanBeStartedByUsersManagedBy(long managerUserId, QueryOptions searchOptions)Search all process definitions for the users managed by specific manager, or manager who can startjava.util.List<SProcessDefinitionDeployInfo>searchProcessDeploymentInfosOfCategory(long categoryId, QueryOptions queryOptions)Search all process definitions for a specific category.java.util.List<SProcessDefinitionDeployInfo>searchProcessDeploymentInfosStartedBy(long startedBy, QueryOptions searchOptions)Search all process deploy info started by the specific userjava.util.List<SProcessDefinitionDeployInfo>searchProcessDeploymentInfosWithAssignedOrPendingHumanTasks(QueryOptions queryOptions)Search all process definitions that have instances with one or more human tasks assigned/pending.java.util.List<SProcessDefinitionDeployInfo>searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor(long userId, QueryOptions queryOptions)Search all process definitions that have one or more human tasks assigned/pending for a specific user.java.util.List<SProcessDefinitionDeployInfo>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.java.util.List<SProcessDefinitionDeployInfo>searchUncategorizedProcessDeploymentInfos(QueryOptions searchOptions)Search all uncategorized process definitions according to the search criteria.java.util.List<SProcessDefinitionDeployInfo>searchUncategorizedProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions searchOptions)Search all uncategorized process definitions for the specific user who can startjava.util.List<SProcessDefinitionDeployInfo>searchUncategorizedProcessDeploymentInfosSupervisedBy(long userId, QueryOptions searchOptions)Search all uncategorized process definitions by given query criteria for specific supervisorjava.util.List<SUser>searchUsersWhoCanStartProcessDeploymentInfo(long processDefinitionId, QueryOptions queryOptions)Search users according to specific query options, and who can start the given process definitionSProcessDefinitionstore(org.bonitasoft.engine.bpm.process.DesignProcessDefinition designProcessDefinition)Store the processDefinition to file system and its deploy info to DB.voidupdateExpressionContent(long processDefinitionId, long expressionDefinitionId, java.lang.String content)Updates the content of an Expression, for a given process definition.SProcessDefinitionDeployInfoupdateProcessDefinitionDeployInfo(long processId, EntityUpdateDescriptor descriptor)Update deployment info of the process definition having the id given in parameter
-
-
-
Field Detail
-
PROCESSDEFINITION
static final java.lang.String PROCESSDEFINITION
- See Also:
- Constant Field Values
-
PROCESSDEFINITION_CONTENT
static final java.lang.String PROCESSDEFINITION_CONTENT
- See Also:
- Constant Field Values
-
PROCESSDEFINITION_IS_ENABLED
static final java.lang.String PROCESSDEFINITION_IS_ENABLED
- See Also:
- Constant Field Values
-
PROCESSDEFINITION_IS_DISABLED
static final java.lang.String PROCESSDEFINITION_IS_DISABLED
- See Also:
- Constant Field Values
-
PROCESSDEFINITION_DEPLOY_INFO
static final java.lang.String PROCESSDEFINITION_DEPLOY_INFO
- See Also:
- Constant Field Values
-
PROCESSDEFINITION_IS_RESOLVED
static final java.lang.String PROCESSDEFINITION_IS_RESOLVED
- See Also:
- Constant Field Values
-
PROCESSDEFINITION_IS_UNRESOLVED
static final java.lang.String PROCESSDEFINITION_IS_UNRESOLVED
- See Also:
- Constant Field Values
-
PROCESS_CACHE_NAME
static final java.lang.String PROCESS_CACHE_NAME
- See Also:
- Constant Field Values
-
UNCATEGORIZED_SUFFIX
static final java.lang.String UNCATEGORIZED_SUFFIX
- See Also:
- Constant Field Values
-
UNCATEGORIZED_SUPERVISED_BY_SUFFIX
static final java.lang.String UNCATEGORIZED_SUPERVISED_BY_SUFFIX
- See Also:
- Constant Field Values
-
UNCATEGORIZED_USERCANSTART_SUFFIX
static final java.lang.String UNCATEGORIZED_USERCANSTART_SUFFIX
- See Also:
- Constant Field Values
-
WHOCANSTART_PROCESS_SUFFIX
static final java.lang.String WHOCANSTART_PROCESS_SUFFIX
- See Also:
- Constant Field Values
-
STARTED_BY_SUFFIX
static final java.lang.String STARTED_BY_SUFFIX
- See Also:
- Constant Field Values
-
PROCESS_DEFINITION_ID
static final java.lang.String PROCESS_DEFINITION_ID
- See Also:
- Constant Field Values
-
USER_ID
static final java.lang.String USER_ID
- See Also:
- Constant Field Values
-
ROLE_ID
static final java.lang.String ROLE_ID
- See Also:
- Constant Field Values
-
GROUP_ID
static final java.lang.String GROUP_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
store
SProcessDefinition store(org.bonitasoft.engine.bpm.process.DesignProcessDefinition designProcessDefinition) throws SProcessDefinitionException
Store the processDefinition to file system and its deploy info to DB.- Parameters:
designProcessDefinition- the processDefinition will be stored- Returns:
- the definition will an id
- Throws:
SProcessDefinitionException
-
getProcessDefinition
SProcessDefinition getProcessDefinition(long processDefinitionId) throws SProcessDefinitionNotFoundException, SBonitaReadException
Get processDefinition by its id- Parameters:
processDefinitionId- identifier of processDefinition- Returns:
- the processDefinition corresponding to the parameter processId
- Throws:
SProcessDefinitionNotFoundException- error thrown if no process definition foundSBonitaReadException
-
getProcessDefinitionIfIsEnabled
SProcessDefinition getProcessDefinitionIfIsEnabled(long processDefinitionId) throws SBonitaReadException, SProcessDefinitionException
Get processDefinition by its id, if it is enabled. Throws SProcessDefinitionException otherwise.- Parameters:
processDefinitionId- The identifier of processDefinition- Returns:
- The processDefinition corresponding to the parameter processId
- Throws:
SBonitaReadExceptionSProcessDefinitionException- if process is not enabled.- Since:
- 6.4.0
-
getProcessDeploymentInfo
SProcessDefinitionDeployInfo getProcessDeploymentInfo(long processId) throws SProcessDefinitionNotFoundException, SBonitaReadException
Get deployment info of the process definition having the id given in parameter- 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
-
delete
void delete(long processId) throws SProcessDefinitionNotFoundException, SProcessDeletionException, SDeletingEnabledProcessExceptionDelete the id specified process definition and its deploy info- Parameters:
processId- identifier of processDefinition- Throws:
SProcessDefinitionNotFoundException- error thrown if no process definition foundSProcessDeletionExceptionSDeletingEnabledProcessException- error throw if the process still enabled
-
getProcessDeploymentInfos
java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfos(int fromIndex, int numberPerPage, java.lang.String field, OrderByType order) throws SBonitaReadException
Get process definition deploy info in a specific interval with order, this can be used for pagination- 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
-
enableProcessDeploymentInfo
void enableProcessDeploymentInfo(long processId) throws SProcessDefinitionNotFoundException, SProcessEnablementExceptionEnable 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- 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:
Resolving a process,enableProcess(long, boolean)
-
enableProcess
void enableProcess(long processId, boolean failIfAlreadyEnabled) throws SProcessDefinitionNotFoundException, SProcessEnablementExceptionEnable the specific process definition, when it is in RESOLVED state.- 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
-
disableProcessDeploymentInfo
void disableProcessDeploymentInfo(long processId) throws SProcessDefinitionNotFoundException, SProcessDisablementExceptionDisable the process passed as parameter. If process is already disabled, this method fails with SProcessDisablementException.- 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(long, boolean)
-
disableProcess
void disableProcess(long processId, boolean failIfAlreadyDisabled) throws SProcessDefinitionNotFoundException, SProcessDisablementExceptionDisable the process passed as parameter.- 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
-
resolveProcess
void resolveProcess(long processId) throws SProcessDefinitionNotFoundException, SProcessDisablementExceptionset the process as RESOLVED when it is in UNRESOLVED state- Parameters:
processId- identifier of process definition- Throws:
SProcessDefinitionNotFoundException- error thrown if no process definition found for the given processIdSProcessDisablementException
-
getNumberOfProcessDeploymentInfosByActivationState
long getNumberOfProcessDeploymentInfosByActivationState(org.bonitasoft.engine.bpm.process.ActivationState activationState) throws SBonitaReadExceptionGets how many processes are in the given state.- Parameters:
activationState- the activation state- Returns:
- number of processes are in the given state or 0;
- Throws:
SBonitaReadException
-
getNumberOfProcessDeploymentInfos
long getNumberOfProcessDeploymentInfos() throws SBonitaReadExceptionGets how many processes are defined.- Returns:
- the number of process definitions;
- Throws:
SBonitaReadException- occurs when an exception is thrown during method execution
-
getProcessDefinitionIds
java.util.List<java.lang.Long> getProcessDefinitionIds(org.bonitasoft.engine.bpm.process.ActivationState activationState, int fromIndex, int numberOfResult) throws SBonitaReadExceptionGet the process definition identifiers in the given state.- Parameters:
activationState- the activation statefromIndex- Index of the record to be retrieved from. First record has index 0numberOfResult- 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
java.util.List<java.lang.Long> getProcessDefinitionIds(int fromIndex, int numberOfResult) throws SBonitaReadExceptionGet the process definition identifiers. * @param fromIndex Index of the record to be retrieved from. First record has index 0- Parameters:
numberOfResult- 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
SFlowNodeDefinition getNextFlowNode(SProcessDefinition definition, java.lang.String source)
Get target flow node for the given source flow node in the specific process- Parameters:
definition- the process definition containing source flow nodesource- a flow node in process definition- Returns:
- target flow node of the given source
-
getProcessDeploymentInfos
java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfos(java.util.List<java.lang.Long> processIds, int fromIndex, int numberOfProcesses, java.lang.String field, OrderByType order) throws SProcessDefinitionNotFoundException, SBonitaReadException
get sub set of processDefinitionDeployInfos in specific order- 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:
SProcessDefinitionNotFoundExceptionSBonitaReadException
-
getProcessDeploymentInfos
java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfos(java.util.List<java.lang.Long> processIds) throws SProcessDefinitionNotFoundException, SBonitaReadException
-
getLatestProcessDefinitionId
long getLatestProcessDefinitionId(java.lang.String processName) throws SBonitaReadException, SProcessDefinitionNotFoundExceptionGet the processDefinitionId of the most recent version of the process- Parameters:
processName- name of process definition- Returns:
- the latest process definition
- Throws:
SBonitaReadExceptionSProcessDefinitionNotFoundException
-
getProcessDefinitionId
long getProcessDefinitionId(java.lang.String name, java.lang.String version) throws SBonitaReadException, SProcessDefinitionNotFoundExceptionGet the processDefinitionId by name and version- Parameters:
name- name of process definitionversion- version or process definition- Returns:
- identifier of process definition
- Throws:
SBonitaReadExceptionSProcessDefinitionNotFoundException
-
updateProcessDefinitionDeployInfo
SProcessDefinitionDeployInfo updateProcessDefinitionDeployInfo(long processId, EntityUpdateDescriptor descriptor) throws SProcessDefinitionNotFoundException, SProcessDeploymentInfoUpdateException
Update deployment info of the process definition having the id given in parameter- Parameters:
processId- identifier of process deploy infodescriptor- update description- Throws:
SProcessDefinitionNotFoundException- error thrown when no process deploy info found with the give processIdSProcessDeploymentInfoUpdateException
-
searchProcessDeploymentInfosStartedBy
java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosStartedBy(long startedBy, QueryOptions searchOptions) throws SBonitaReadException
Search all process deploy info started by the specific user- 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
long getNumberOfProcessDeploymentInfosStartedBy(long startedBy, QueryOptions countOptions) throws SBonitaReadExceptionGet number of all process deploy info started by the specific user- 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
java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfos(QueryOptions searchOptions) throws SBonitaReadException
Search all process definition deploy infos according to the specific search criteria- Parameters:
searchOptions- a QueryOptions object containing search criteria- Returns:
- a list of SProcessDefinitionDeployInfo object
- Throws:
SBonitaReadException
-
getNumberOfProcessDeploymentInfos
long getNumberOfProcessDeploymentInfos(QueryOptions countOptions) throws SBonitaReadException
Get number of all process definition deploy infos according to the specific search criteria- Parameters:
countOptions- a QueryOptions object containing query criteria- Returns:
- number of all process definition deploy infos corresponding to the criteria
- Throws:
SBonitaReadException
-
getNumberOfUncategorizedProcessDeploymentInfos
long getNumberOfUncategorizedProcessDeploymentInfos(QueryOptions countOptions) throws SBonitaReadException
Get total number of uncategorized process definitions by given query criteria- Parameters:
countOptions- a QueryOptions object containing query criteria- Returns:
- total number of uncategorized process definitions suit to query criteria
- Throws:
SBonitaReadException
-
getNumberOfUncategorizedProcessDeploymentInfosSupervisedBy
long getNumberOfUncategorizedProcessDeploymentInfosSupervisedBy(long userId, QueryOptions countOptions) throws SBonitaReadExceptionGet total number of uncategorized process definitions by given query criteria for specific supervisor- 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
-
searchUncategorizedProcessDeploymentInfos
java.util.List<SProcessDefinitionDeployInfo> searchUncategorizedProcessDeploymentInfos(QueryOptions searchOptions) throws SBonitaReadException
Search all uncategorized process definitions according to the search criteria.- Parameters:
searchOptions- a QueryOptions object containing query criteria- Returns:
- a list of SProcessDefinitionDeployInfo objects
- Throws:
SBonitaReadException
-
searchProcessDeploymentInfosOfCategory
java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosOfCategory(long categoryId, QueryOptions queryOptions) throws SBonitaReadException
Search all process definitions for a specific category.- Parameters:
categoryId- Identifier of the categoryqueryOptions- a QueryOptions object containing query criteria- Returns:
- a list of SProcessDefinitionDeployInfo objects
- Throws:
SBonitaReadException
-
searchUncategorizedProcessDeploymentInfosSupervisedBy
java.util.List<SProcessDefinitionDeployInfo> searchUncategorizedProcessDeploymentInfosSupervisedBy(long userId, QueryOptions searchOptions) throws SBonitaReadException
Search all uncategorized process definitions by given query criteria for specific supervisor- Parameters:
userId- identifier of a supervisor usersearchOptions- a QueryOptions object containing query criteria- Returns:
- a list of SProcessDefinitionDeployInfo object
- Throws:
SBonitaReadException
-
searchProcessDeploymentInfosCanBeStartedBy
java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions searchOptions) throws SBonitaReadException
Search all process definitions for the specific user who can start- Parameters:
userId- identifier of usersearchOptions- a QueryOptions object containing query criteria- Returns:
- a list of SProcessDefinitionDeployInfo objects
- Throws:
SBonitaReadException
-
getNumberOfProcessDeploymentInfosCanBeStartedBy
long getNumberOfProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions countOptions) throws SBonitaReadExceptionGet number of all process definitions for the specific user who can start- 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
java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosCanBeStartedByUsersManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException
Search all process definitions for the users managed by specific manager, or manager who can start- Parameters:
managerUserId- identifier of managersearchOptions- a QueryOptions object containing query criteria- Returns:
- a list of SProcessDefinitionDeployInfo objects
- Throws:
SBonitaReadException
-
getNumberOfProcessDeploymentInfosCanBeStartedByUsersManagedBy
long getNumberOfProcessDeploymentInfosCanBeStartedByUsersManagedBy(long managerUserId, QueryOptions countOptions) throws SBonitaReadExceptionGet number of all process definitions for the users managed by specific manager, or manager who can start- 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
java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfos(long userId, QueryOptions searchOptions, java.lang.String querySuffix) throws SBonitaReadException
Search all process definitions for the specific user who can perform the "querySuffix" specified action- 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
long getNumberOfProcessDeploymentInfos(long userId, QueryOptions countOptions, java.lang.String querySuffix) throws SBonitaReadExceptionGet total number of process definitions for the specific user who can perform the "querySuffix" specified action- 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
-
searchUncategorizedProcessDeploymentInfosCanBeStartedBy
java.util.List<SProcessDefinitionDeployInfo> searchUncategorizedProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions searchOptions) throws SBonitaReadException
Search all uncategorized process definitions for the specific user who can start- Parameters:
userId- identifier of usersearchOptions- a QueryOptions object containing query criteria- Returns:
- a list of SProcessDefinitionDeployInfo object
- Throws:
SBonitaReadException
-
getNumberOfUncategorizedProcessDeploymentInfosCanBeStartedBy
long getNumberOfUncategorizedProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions countOptions) throws SBonitaReadExceptionGet total number of uncategorized process definitions for the specific user who can start- 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
java.util.Map<java.lang.Long,SProcessDefinitionDeployInfo> getProcessDeploymentInfosFromProcessInstanceIds(java.util.List<java.lang.Long> processInstanceIds) throws SBonitaReadException
A list of SProcessDefinitionDeployInfos for the specific processInstances- Parameters:
processInstanceIds- identifier of process instances- Returns:
- a map containing identifiers of process instance and the corresponding SProcessDefinitionDeployInfo object
- Throws:
SBonitaReadException
-
getProcessDeploymentInfosFromArchivedProcessInstanceIds
java.util.Map<java.lang.Long,SProcessDefinitionDeployInfo> getProcessDeploymentInfosFromArchivedProcessInstanceIds(java.util.List<java.lang.Long> archivedProcessInstantsIds) throws SBonitaReadException
Get A list of SProcessDefinitionDeployInfos for the specific archived processInstances- Parameters:
archivedProcessInstantsIds- identifiers of archived processInstance- Returns:
- a map containing identifiers of archived process instance and the corresponding SProcessDefinitionDeployInfo object
- Throws:
SBonitaReadException
-
getProcessDeploymentInfosUnrelatedToCategory
java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosUnrelatedToCategory(long categoryId, int pageIndex, int numberPerPage, org.bonitasoft.engine.bpm.process.ProcessDeploymentInfoCriterion pagingCriterion) throws SBonitaReadException
Get A list of SProcessDefinitionDeployInfos unrelated to the specific category- Parameters:
categoryId-pagingCriterion-numberPerPage-pageIndex-- Returns:
- A list of SProcessDefinitionDeployInfos unrelated to the specific category
- Throws:
SBonitaReadException
-
getNumberOfProcessDeploymentInfosUnrelatedToCategory
java.lang.Long getNumberOfProcessDeploymentInfosUnrelatedToCategory(long categoryId) throws SBonitaReadExceptionGet number of SProcessDefinitionDeployInfos unrelated to the specific category- Parameters:
categoryId-- Returns:
- Number of SProcessDefinitionDeployInfos unrelated to the specific category
- Throws:
SBonitaReadException
-
getProcessDeploymentInfos
java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfos(QueryOptions queryOptions) throws SBonitaReadException
Get process definition deploy info in a specific interval with order, this can be used for pagination- Parameters:
queryOptions- object containing query criteria- Returns:
- a list of SProcessDefinitionDeployInfo corresponding to the criteria
- Throws:
SBonitaReadException
-
getProcessDeploymentInfosWithActorOnlyForGroup
java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForGroup(long groupId, QueryOptions queryOptions) throws SBonitaReadException
List all processes that contain at least one task which actor is mapped only to the specified group.- 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
java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForGroups(java.util.List<java.lang.Long> groupIds, QueryOptions queryOptions) throws SBonitaReadException
List all processes that contain at least one task which actor is mapped only to the specified groups.- 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
java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForRole(long roleId, QueryOptions queryOptions) throws SBonitaReadException
List all processes that contain at least one task which actor is mapped only to the specified role.- 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
java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForRoles(java.util.List<java.lang.Long> roleIds, QueryOptions queryOptions) throws SBonitaReadException
List all processes that contain at least one task which actor is mapped only to the specified roles.- 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
java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForUser(long userId, QueryOptions queryOptions) throws SBonitaReadException
List all processes that contain at least one task which actor is mapped only to the specified user.- 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
java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForUsers(java.util.List<java.lang.Long> userIds, QueryOptions queryOptions) throws SBonitaReadException
List all processes that contain at least one task which actor is mapped only to the specified users.- 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
long getNumberOfUsersWhoCanStartProcessDeploymentInfo(long processDefinitionId, QueryOptions queryOptions) throws SBonitaReadExceptionGet total number of users according to specific query options, and who can start the given process definition- Parameters:
processDefinitionId- Identifier of the process definitionqueryOptions- The QueryOptions object containing some query conditions- Returns:
- Throws:
SBonitaReadException
-
searchUsersWhoCanStartProcessDeploymentInfo
java.util.List<SUser> searchUsersWhoCanStartProcessDeploymentInfo(long processDefinitionId, QueryOptions queryOptions) throws SBonitaReadException
Search users according to specific query options, and who can start the given process definition- Parameters:
processDefinitionId- Identifier of the process definitionqueryOptions- The QueryOptions object containing some query conditions- Returns:
- Throws:
SBonitaReadException
-
getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor
long getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor(long userId, QueryOptions queryOptions) throws SBonitaReadExceptionGet 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.- 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
java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor(long userId, QueryOptions queryOptions) throws SBonitaReadException
Search 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.- Parameters:
userId- The identifier of the user.queryOptions- The QueryOptions object containing some query conditions- Returns:
- The list of process definitions
- Throws:
SBonitaReadException
-
getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy
long getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy(long userId, QueryOptions queryOptions) throws SBonitaReadExceptionGet 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.- 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.- Since:
- 6.3.3
-
searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy
java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy(long userId, QueryOptions queryOptions) throws SBonitaReadException
Search 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.- 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.- Since:
- 6.3.3
-
getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasks
long getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasks(QueryOptions queryOptions) throws SBonitaReadException
Get 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.- 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.- Since:
- 6.3.3
-
searchProcessDeploymentInfosWithAssignedOrPendingHumanTasks
java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosWithAssignedOrPendingHumanTasks(QueryOptions queryOptions) throws SBonitaReadException
Search 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.- 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.- Since:
- 6.3.3
-
updateExpressionContent
void updateExpressionContent(long processDefinitionId, long expressionDefinitionId, java.lang.String content) throws SProcessDefinitionNotFoundException, SObjectModificationExceptionUpdates 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.- 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.
-
getDesignProcessDefinition
org.bonitasoft.engine.bpm.process.DesignProcessDefinition getDesignProcessDefinition(long processDefinitionId) throws SProcessDefinitionNotFoundException, SBonitaReadExceptionReturns a specific process definition that include informations such as tasks definition, actors...- 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- Since:
- 7.0
-
-