public class ProcessDefinitionServiceImpl extends java.lang.Object implements ProcessDefinitionService
| Modifier and Type | Field and Description |
|---|---|
protected org.bonitasoft.engine.bpm.bar.ProcessDefinitionBARContribution |
processDefinitionBARContribution |
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 and Description |
|---|
ProcessDefinitionServiceImpl(Recorder recorder,
ReadPersistenceService persistenceService,
SessionService sessionService,
ReadSessionAccessor sessionAccessor,
QueriableLoggerService queriableLoggerService,
CacheService cacheService) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(long processId)
Delete the id specified process definition and its deploy info
|
void |
disableProcess(long processId,
boolean failIfAlreadyDisabled)
Disable the process passed as parameter.
|
void |
disableProcessDeploymentInfo(long processId)
Disable the process passed as parameter.
|
void |
enableProcess(long processId,
boolean failIfAlreadyEnabled)
Enable the specific process definition, when it is in RESOLVED state.
|
void |
enableProcessDeploymentInfo(long processId)
Enable the specific process definition, set the process as ENABLED when it is in RESOLVED state.
|
protected long |
generateId() |
org.bonitasoft.engine.bpm.process.DesignProcessDefinition |
getDesignProcessDefinition(long processDefinitionId)
Returns a specific process definition that include informations such as tasks definition, actors...
|
protected org.bonitasoft.engine.expression.Expression |
getExpression(org.bonitasoft.engine.bpm.process.DesignProcessDefinition processDefinition,
long expressionDefinitionId) |
long |
getLatestProcessDefinitionId(java.lang.String processName)
Get the processDefinitionId of the most recent version of the process
|
SFlowNodeDefinition |
getNextFlowNode(SProcessDefinition definition,
java.lang.String source)
Get target flow node for the given source flow node in the specific process
|
long |
getNumberOfProcessDeploymentInfos()
Gets how many processes are defined.
|
long |
getNumberOfProcessDeploymentInfos(long userId,
QueryOptions countOptions,
java.lang.String querySuffix)
Get total number of process definitions for the specific user who can perform the "querySuffix" specified action
|
long |
getNumberOfProcessDeploymentInfos(QueryOptions countOptions)
Get number of all process definition deploy infos according to the specific search criteria
|
long |
getNumberOfProcessDeploymentInfosByActivationState(org.bonitasoft.engine.bpm.process.ActivationState activationState)
Gets how many processes are in the given state.
|
long |
getNumberOfProcessDeploymentInfosCanBeStartedBy(long userId,
QueryOptions countOptions)
Get number of all process definitions for the specific user who can start
|
long |
getNumberOfProcessDeploymentInfosCanBeStartedByUsersManagedBy(long managerUserId,
QueryOptions countOptions)
Get number of all process definitions for the users managed by specific manager, or manager who can start
|
long |
getNumberOfProcessDeploymentInfosStartedBy(long startedBy,
QueryOptions countOptions)
Get number of all process deploy info started by the specific user
|
java.lang.Long |
getNumberOfProcessDeploymentInfosUnrelatedToCategory(long categoryId)
Get number of SProcessDefinitionDeployInfos unrelated to the specific category
|
long |
getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasks(QueryOptions queryOptions)
Get the total number of the process definitions that have instances with one or more human tasks assigned/pending.
|
long |
getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor(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.
|
long |
getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy(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.
|
long |
getNumberOfUncategorizedProcessDeploymentInfos(QueryOptions countOptions)
Get total number of uncategorized process definitions by given query criteria
|
long |
getNumberOfUncategorizedProcessDeploymentInfosCanBeStartedBy(long userId,
QueryOptions countOptions)
Get total number of uncategorized process definitions for the specific user who can start
|
long |
getNumberOfUncategorizedProcessDeploymentInfosSupervisedBy(long userId,
QueryOptions countOptions)
Get total number of uncategorized process definitions by given query criteria for specific supervisor
|
long |
getNumberOfUsersWhoCanStartProcessDeploymentInfo(long processDefinitionId,
QueryOptions queryOptions)
Get total number of users according to specific query options, and who can start the given process definition
|
SProcessDefinition |
getProcessDefinition(long processId)
Get processDefinition by its id
|
long |
getProcessDefinitionId(java.lang.String name,
java.lang.String version)
Get the processDefinitionId by name and version
|
java.util.List<java.lang.Long> |
getProcessDefinitionIds(org.bonitasoft.engine.bpm.process.ActivationState activationState,
int fromIndex,
int numberOfResults)
Get the process definition identifiers in the given state.
|
java.util.List<java.lang.Long> |
getProcessDefinitionIds(int fromIndex,
int numberOfResults)
Get the process definition identifiers.
|
SProcessDefinition |
getProcessDefinitionIfIsEnabled(long processDefinitionId)
Get processDefinition by its id, if it is enabled.
|
SProcessDefinitionDeployInfo |
getProcessDeploymentInfo(long processId)
Get deployment info of the process definition having the id given in parameter
|
java.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 pagination
|
java.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 order
|
java.util.List<SProcessDefinitionDeployInfo> |
getProcessDeploymentInfos(QueryOptions queryOptions)
Get process definition deploy info in a specific interval with order, this can be used for pagination
|
java.util.Map<java.lang.Long,SProcessDefinitionDeployInfo> |
getProcessDeploymentInfosFromArchivedProcessInstanceIds(java.util.List<java.lang.Long> archivedProcessInstantsIds)
Get A list of SProcessDefinitionDeployInfos for the specific archived processInstances
|
java.util.Map<java.lang.Long,SProcessDefinitionDeployInfo> |
getProcessDeploymentInfosFromProcessInstanceIds(java.util.List<java.lang.Long> processInstanceIds)
A list of SProcessDefinitionDeployInfos for the specific processInstances
|
java.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 category
|
java.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.
|
protected boolean |
isValidExpressionTypeToUpdate(java.lang.String type) |
void |
resolveProcess(long processId)
set the process as RESOLVED when it is in UNRESOLVED state
|
java.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 action
|
java.util.List<SProcessDefinitionDeployInfo> |
searchProcessDeploymentInfos(QueryOptions searchOptions)
Search all process definition deploy infos according to the specific search criteria
|
java.util.List<SProcessDefinitionDeployInfo> |
searchProcessDeploymentInfosCanBeStartedBy(long userId,
QueryOptions searchOptions)
Search all process definitions for the specific user who can start
|
java.util.List<SProcessDefinitionDeployInfo> |
searchProcessDeploymentInfosCanBeStartedByUsersManagedBy(long managerUserId,
QueryOptions searchOptions)
Search all process definitions for the users managed by specific manager, or manager who can start
|
java.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 user
|
java.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 start
|
java.util.List<SProcessDefinitionDeployInfo> |
searchUncategorizedProcessDeploymentInfosSupervisedBy(long userId,
QueryOptions searchOptions)
Search all uncategorized process definitions by given query criteria for specific supervisor
|
java.util.List<SUser> |
searchUsersWhoCanStartProcessDeploymentInfo(long processDefinitionId,
QueryOptions queryOptions)
Search users according to specific query options, and who can start the given process definition
|
SProcessDefinition |
store(org.bonitasoft.engine.bpm.process.DesignProcessDefinition designProcessDefinition)
Store the processDefinition to file system and its deploy info to DB.
|
void |
updateExpressionContent(long processDefinitionId,
long expressionDefinitionId,
java.lang.String content)
Updates the content of an Expression, for a given process definition.
|
SProcessDefinitionDeployInfo |
updateProcessDefinitionDeployInfo(long processId,
EntityUpdateDescriptor descriptor)
Update deployment info of the process definition having the id given in parameter
|
protected org.bonitasoft.engine.bpm.bar.ProcessDefinitionBARContribution processDefinitionBARContribution
public ProcessDefinitionServiceImpl(Recorder recorder, ReadPersistenceService persistenceService, SessionService sessionService, ReadSessionAccessor sessionAccessor, QueriableLoggerService queriableLoggerService, CacheService cacheService)
public void delete(long processId)
throws SProcessDefinitionNotFoundException,
SProcessDeletionException,
SDeletingEnabledProcessException
ProcessDefinitionServicedelete in interface ProcessDefinitionServiceprocessId - identifier of processDefinitionSProcessDefinitionNotFoundException - error thrown if no process definition foundSProcessDeletionExceptionSDeletingEnabledProcessException - error throw if the process still enabledpublic void disableProcessDeploymentInfo(long processId)
throws SProcessDefinitionNotFoundException,
SProcessDisablementException
ProcessDefinitionServicedisableProcessDeploymentInfo in interface ProcessDefinitionServiceprocessId - identifier of process definitionSProcessDefinitionNotFoundException - error thrown if no process definition found for the given processIdSProcessDisablementException - if process is already disabledProcessDefinitionService.disableProcess(long, boolean)public void disableProcess(long processId,
boolean failIfAlreadyDisabled)
throws SProcessDefinitionNotFoundException,
SProcessDisablementException
ProcessDefinitionServicedisableProcess in interface ProcessDefinitionServiceprocessId - identifier of process definitionfailIfAlreadyDisabled - should we fail if process is already disabled?SProcessDefinitionNotFoundException - error thrown if no process definition found for the given processIdSProcessDisablementException - if process is already disabled and failIfAlreadyDisabled == truepublic void enableProcessDeploymentInfo(long processId)
throws SProcessDefinitionNotFoundException,
SProcessEnablementException
ProcessDefinitionServiceenableProcessDeploymentInfo in interface ProcessDefinitionServiceprocessId - identifier of processDefinitionSProcessDefinitionNotFoundException - error thrown if no process definition found for the given processIdSProcessEnablementException - if process is already enabled or if process is not resolvedResolving a process,
ProcessDefinitionService.enableProcess(long, boolean)public void enableProcess(long processId,
boolean failIfAlreadyEnabled)
throws SProcessDefinitionNotFoundException,
SProcessEnablementException
ProcessDefinitionServiceenableProcess in interface ProcessDefinitionServiceprocessId - identifier of processDefinitionfailIfAlreadyEnabled - should we fail if process is already enabled?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 resolvedpublic java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfos(int fromIndex, int numberPerPage, java.lang.String field, OrderByType order) throws SBonitaReadException
ProcessDefinitionServicegetProcessDeploymentInfos in interface ProcessDefinitionServicefromIndex - 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 DESCSBonitaReadExceptionpublic long getNumberOfProcessDeploymentInfos()
throws SBonitaReadException
ProcessDefinitionServicegetNumberOfProcessDeploymentInfos in interface ProcessDefinitionServiceSBonitaReadException - occurs when an exception is thrown during method executionpublic SProcessDefinition getProcessDefinition(long processId) throws SProcessDefinitionNotFoundException, SBonitaReadException
ProcessDefinitionServicegetProcessDefinition in interface ProcessDefinitionServiceprocessId - identifier of processDefinitionSProcessDefinitionNotFoundException - error thrown if no process definition foundSBonitaReadExceptionpublic SProcessDefinition getProcessDefinitionIfIsEnabled(long processDefinitionId) throws SBonitaReadException, SProcessDefinitionException
ProcessDefinitionServicegetProcessDefinitionIfIsEnabled in interface ProcessDefinitionServiceprocessDefinitionId - The identifier of processDefinitionSBonitaReadExceptionSProcessDefinitionException - if process is not enabled.protected long generateId()
public SProcessDefinitionDeployInfo getProcessDeploymentInfo(long processId) throws SProcessDefinitionNotFoundException, SBonitaReadException
ProcessDefinitionServicegetProcessDeploymentInfo in interface ProcessDefinitionServiceprocessId - id of the process definition on which we want deployment informationSProcessDefinitionNotFoundException - error thrown if no process definition foundSBonitaReadExceptionpublic SProcessDefinition store(org.bonitasoft.engine.bpm.process.DesignProcessDefinition designProcessDefinition) throws SProcessDefinitionException
ProcessDefinitionServicestore in interface ProcessDefinitionServicedesignProcessDefinition - the processDefinition will be storedSProcessDefinitionExceptionpublic void resolveProcess(long processId)
throws SProcessDefinitionNotFoundException,
SProcessDisablementException
ProcessDefinitionServiceresolveProcess in interface ProcessDefinitionServiceprocessId - identifier of process definitionSProcessDefinitionNotFoundException - error thrown if no process definition found for the given processIdSProcessDisablementExceptionpublic long getNumberOfProcessDeploymentInfosByActivationState(org.bonitasoft.engine.bpm.process.ActivationState activationState)
throws SBonitaReadException
ProcessDefinitionServicegetNumberOfProcessDeploymentInfosByActivationState in interface ProcessDefinitionServiceactivationState - the activation stateSBonitaReadExceptionpublic java.util.List<java.lang.Long> getProcessDefinitionIds(org.bonitasoft.engine.bpm.process.ActivationState activationState,
int fromIndex,
int numberOfResults)
throws SBonitaReadException
ProcessDefinitionServicegetProcessDefinitionIds in interface ProcessDefinitionServiceactivationState - 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 returnedSBonitaReadExceptionpublic java.util.List<java.lang.Long> getProcessDefinitionIds(int fromIndex,
int numberOfResults)
throws SBonitaReadException
ProcessDefinitionServicegetProcessDefinitionIds in interface ProcessDefinitionServicenumberOfResults - Number of result we want to get. Maximum number of result returnedSBonitaReadExceptionpublic SFlowNodeDefinition getNextFlowNode(SProcessDefinition definition, java.lang.String source)
ProcessDefinitionServicegetNextFlowNode in interface ProcessDefinitionServicedefinition - the process definition containing source flow nodesource - a flow node in process definitionpublic java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfos(java.util.List<java.lang.Long> processIds, int fromIndex, int numberOfProcesses, java.lang.String field, OrderByType order) throws SBonitaReadException
ProcessDefinitionServicegetProcessDeploymentInfos in interface ProcessDefinitionServiceprocessIds - 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 DESCSBonitaReadExceptionpublic java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfos(java.util.List<java.lang.Long> processIds) throws SBonitaReadException
getProcessDeploymentInfos in interface ProcessDefinitionServiceSBonitaReadExceptionpublic long getLatestProcessDefinitionId(java.lang.String processName)
throws SBonitaReadException,
SProcessDefinitionNotFoundException
ProcessDefinitionServicegetLatestProcessDefinitionId in interface ProcessDefinitionServiceprocessName - name of process definitionSBonitaReadExceptionSProcessDefinitionNotFoundExceptionpublic long getProcessDefinitionId(java.lang.String name,
java.lang.String version)
throws SBonitaReadException,
SProcessDefinitionNotFoundException
ProcessDefinitionServicegetProcessDefinitionId in interface ProcessDefinitionServicename - name of process definitionversion - version or process definitionSBonitaReadExceptionSProcessDefinitionNotFoundExceptionpublic SProcessDefinitionDeployInfo updateProcessDefinitionDeployInfo(long processId, EntityUpdateDescriptor descriptor) throws SProcessDefinitionNotFoundException, SProcessDeploymentInfoUpdateException
ProcessDefinitionServiceupdateProcessDefinitionDeployInfo in interface ProcessDefinitionServiceprocessId - identifier of process deploy infodescriptor - update descriptionSProcessDefinitionNotFoundException - error thrown when no process deploy info found with the give processIdSProcessDeploymentInfoUpdateExceptionpublic java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosStartedBy(long startedBy, QueryOptions searchOptions) throws SBonitaReadException
ProcessDefinitionServicesearchProcessDeploymentInfosStartedBy in interface ProcessDefinitionServicestartedBy - the name of user who started the processsearchOptions - a QueryOptions object containing some query conditionsSBonitaReadExceptionpublic long getNumberOfProcessDeploymentInfosStartedBy(long startedBy,
QueryOptions countOptions)
throws SBonitaReadException
ProcessDefinitionServicegetNumberOfProcessDeploymentInfosStartedBy in interface ProcessDefinitionServicestartedBy - the name of user who started the processcountOptions - a QueryOptions object containing some query conditionsSBonitaReadExceptionpublic java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfos(QueryOptions searchOptions) throws SBonitaReadException
ProcessDefinitionServicesearchProcessDeploymentInfos in interface ProcessDefinitionServicesearchOptions - a QueryOptions object containing search criteriaSBonitaReadExceptionpublic long getNumberOfProcessDeploymentInfos(QueryOptions countOptions) throws SBonitaReadException
ProcessDefinitionServicegetNumberOfProcessDeploymentInfos in interface ProcessDefinitionServicecountOptions - a QueryOptions object containing query criteriaSBonitaReadExceptionpublic java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions searchOptions) throws SBonitaReadException
ProcessDefinitionServicesearchProcessDeploymentInfosCanBeStartedBy in interface ProcessDefinitionServiceuserId - identifier of usersearchOptions - a QueryOptions object containing query criteriaSBonitaReadExceptionpublic long getNumberOfProcessDeploymentInfosCanBeStartedBy(long userId,
QueryOptions countOptions)
throws SBonitaReadException
ProcessDefinitionServicegetNumberOfProcessDeploymentInfosCanBeStartedBy in interface ProcessDefinitionServiceuserId - identifier of usercountOptions - a QueryOptions object containing query criteriaSBonitaReadExceptionpublic java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosCanBeStartedByUsersManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException
ProcessDefinitionServicesearchProcessDeploymentInfosCanBeStartedByUsersManagedBy in interface ProcessDefinitionServicemanagerUserId - identifier of managersearchOptions - a QueryOptions object containing query criteriaSBonitaReadExceptionpublic long getNumberOfProcessDeploymentInfosCanBeStartedByUsersManagedBy(long managerUserId,
QueryOptions countOptions)
throws SBonitaReadException
ProcessDefinitionServicegetNumberOfProcessDeploymentInfosCanBeStartedByUsersManagedBy in interface ProcessDefinitionServicemanagerUserId - identifier of managercountOptions - a QueryOptions object containing query criteriaSBonitaReadExceptionpublic java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfos(long userId, QueryOptions searchOptions, java.lang.String querySuffix) throws SBonitaReadException
ProcessDefinitionServicesearchProcessDeploymentInfos in interface ProcessDefinitionServiceuserId - 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"SBonitaReadExceptionpublic long getNumberOfProcessDeploymentInfos(long userId,
QueryOptions countOptions,
java.lang.String querySuffix)
throws SBonitaReadException
ProcessDefinitionServicegetNumberOfProcessDeploymentInfos in interface ProcessDefinitionServiceuserId - 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"SBonitaReadExceptionpublic long getNumberOfUncategorizedProcessDeploymentInfos(QueryOptions countOptions) throws SBonitaReadException
ProcessDefinitionServicegetNumberOfUncategorizedProcessDeploymentInfos in interface ProcessDefinitionServicecountOptions - a QueryOptions object containing query criteriaSBonitaReadExceptionpublic java.util.List<SProcessDefinitionDeployInfo> searchUncategorizedProcessDeploymentInfos(QueryOptions searchOptions) throws SBonitaReadException
ProcessDefinitionServicesearchUncategorizedProcessDeploymentInfos in interface ProcessDefinitionServicesearchOptions - a QueryOptions object containing query criteriaSBonitaReadExceptionpublic long getNumberOfUncategorizedProcessDeploymentInfosSupervisedBy(long userId,
QueryOptions countOptions)
throws SBonitaReadException
ProcessDefinitionServicegetNumberOfUncategorizedProcessDeploymentInfosSupervisedBy in interface ProcessDefinitionServiceuserId - identifier of a supervisor usercountOptions - a QueryOptions object containing query criteriaSBonitaReadExceptionpublic java.util.List<SProcessDefinitionDeployInfo> searchUncategorizedProcessDeploymentInfosSupervisedBy(long userId, QueryOptions searchOptions) throws SBonitaReadException
ProcessDefinitionServicesearchUncategorizedProcessDeploymentInfosSupervisedBy in interface ProcessDefinitionServiceuserId - identifier of a supervisor usersearchOptions - a QueryOptions object containing query criteriaSBonitaReadExceptionpublic java.util.List<SProcessDefinitionDeployInfo> searchUncategorizedProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions searchOptions) throws SBonitaReadException
ProcessDefinitionServicesearchUncategorizedProcessDeploymentInfosCanBeStartedBy in interface ProcessDefinitionServiceuserId - identifier of usersearchOptions - a QueryOptions object containing query criteriaSBonitaReadExceptionpublic long getNumberOfUncategorizedProcessDeploymentInfosCanBeStartedBy(long userId,
QueryOptions countOptions)
throws SBonitaReadException
ProcessDefinitionServicegetNumberOfUncategorizedProcessDeploymentInfosCanBeStartedBy in interface ProcessDefinitionServiceuserId - identifier of usercountOptions - a QueryOptions object containing query criteriaSBonitaReadExceptionpublic java.util.Map<java.lang.Long,SProcessDefinitionDeployInfo> getProcessDeploymentInfosFromProcessInstanceIds(java.util.List<java.lang.Long> processInstanceIds) throws SBonitaReadException
ProcessDefinitionServicegetProcessDeploymentInfosFromProcessInstanceIds in interface ProcessDefinitionServiceprocessInstanceIds - identifier of process instancesSBonitaReadExceptionpublic java.util.Map<java.lang.Long,SProcessDefinitionDeployInfo> getProcessDeploymentInfosFromArchivedProcessInstanceIds(java.util.List<java.lang.Long> archivedProcessInstantsIds) throws SBonitaReadException
ProcessDefinitionServicegetProcessDeploymentInfosFromArchivedProcessInstanceIds in interface ProcessDefinitionServicearchivedProcessInstantsIds - identifiers of archived processInstanceSBonitaReadExceptionpublic java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosUnrelatedToCategory(long categoryId, int pageIndex, int numberPerPage, org.bonitasoft.engine.bpm.process.ProcessDeploymentInfoCriterion pagingCriterion) throws SBonitaReadException
ProcessDefinitionServicegetProcessDeploymentInfosUnrelatedToCategory in interface ProcessDefinitionServiceSBonitaReadExceptionpublic java.lang.Long getNumberOfProcessDeploymentInfosUnrelatedToCategory(long categoryId)
throws SBonitaReadException
ProcessDefinitionServicegetNumberOfProcessDeploymentInfosUnrelatedToCategory in interface ProcessDefinitionServiceSBonitaReadExceptionpublic java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosOfCategory(long categoryId, QueryOptions queryOptions) throws SBonitaReadException
ProcessDefinitionServicesearchProcessDeploymentInfosOfCategory in interface ProcessDefinitionServicecategoryId - Identifier of the categoryqueryOptions - a QueryOptions object containing query criteriaSBonitaReadExceptionpublic java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfos(QueryOptions queryOptions) throws SBonitaReadException
ProcessDefinitionServicegetProcessDeploymentInfos in interface ProcessDefinitionServicequeryOptions - object containing query criteriaSBonitaReadExceptionpublic java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForGroup(long groupId, QueryOptions queryOptions) throws SBonitaReadException
ProcessDefinitionServicegetProcessDeploymentInfosWithActorOnlyForGroup in interface ProcessDefinitionServicegroupId - the Id of the group from which to retrieve the processes with tasks only it can do.queryOptions - object containing query criteriaSProcessDefinitionDeployInfoSBonitaReadException - in case a read problem occurspublic java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForGroups(java.util.List<java.lang.Long> groupIds, QueryOptions queryOptions) throws SBonitaReadException
ProcessDefinitionServicegetProcessDeploymentInfosWithActorOnlyForGroups in interface ProcessDefinitionServicegroupIds - the Ids of the groups from which to retrieve the processes with tasks only they can do.queryOptions - object containing query criteriaSProcessDefinitionDeployInfoSBonitaReadException - in case a read problem occurspublic java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForRole(long roleId, QueryOptions queryOptions) throws SBonitaReadException
ProcessDefinitionServicegetProcessDeploymentInfosWithActorOnlyForRole in interface ProcessDefinitionServiceroleId - the Id of the role from which to retrieve the processes with tasks only it can do.queryOptions - object containing query criteriaSProcessDefinitionDeployInfoSBonitaReadException - in case a read problem occurspublic java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForRoles(java.util.List<java.lang.Long> roleIds, QueryOptions queryOptions) throws SBonitaReadException
ProcessDefinitionServicegetProcessDeploymentInfosWithActorOnlyForRoles in interface ProcessDefinitionServiceroleIds - the Ids of the roles from which to retrieve the processes with tasks only they can do.queryOptions - object containing query criteriaSProcessDefinitionDeployInfoSBonitaReadException - in case a read problem occurspublic java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForUser(long userId, QueryOptions queryOptions) throws SBonitaReadException
ProcessDefinitionServicegetProcessDeploymentInfosWithActorOnlyForUser in interface ProcessDefinitionServiceuserId - the Id of the user from which to retrieve the processes with tasks only he / she can do.queryOptions - object containing query criteriaSProcessDefinitionDeployInfoSBonitaReadException - in case a read problem occurspublic java.util.List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForUsers(java.util.List<java.lang.Long> userIds, QueryOptions queryOptions) throws SBonitaReadException
ProcessDefinitionServicegetProcessDeploymentInfosWithActorOnlyForUsers in interface ProcessDefinitionServiceuserIds - the Ids of the users from which to retrieve the processes with tasks only they can do.queryOptions - object containing query criteriaSProcessDefinitionDeployInfoSBonitaReadException - in case a read problem occurspublic long getNumberOfUsersWhoCanStartProcessDeploymentInfo(long processDefinitionId,
QueryOptions queryOptions)
throws SBonitaReadException
ProcessDefinitionServicegetNumberOfUsersWhoCanStartProcessDeploymentInfo in interface ProcessDefinitionServiceprocessDefinitionId - Identifier of the process definitionqueryOptions - The QueryOptions object containing some query conditionsSBonitaReadExceptionpublic java.util.List<SUser> searchUsersWhoCanStartProcessDeploymentInfo(long processDefinitionId, QueryOptions queryOptions) throws SBonitaReadException
ProcessDefinitionServicesearchUsersWhoCanStartProcessDeploymentInfo in interface ProcessDefinitionServiceprocessDefinitionId - Identifier of the process definitionSBonitaReadExceptionpublic long getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor(long userId,
QueryOptions queryOptions)
throws SBonitaReadException
ProcessDefinitionServicegetNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor in interface ProcessDefinitionServiceuserId - The identifier of the user.queryOptions - The QueryOptions object containing some query conditionsSBonitaReadExceptionpublic java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor(long userId, QueryOptions queryOptions) throws SBonitaReadException
ProcessDefinitionServicesearchProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor in interface ProcessDefinitionServiceuserId - The identifier of the user.queryOptions - The QueryOptions object containing some query conditionsSBonitaReadExceptionpublic long getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy(long userId,
QueryOptions queryOptions)
throws SBonitaReadException
ProcessDefinitionServicegetNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy in interface ProcessDefinitionServiceuserId - The identifier of the user.queryOptions - The QueryOptions object containing some query conditionsSBonitaReadException - if an exception occurs when getting the process deployment information.public java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy(long userId, QueryOptions queryOptions) throws SBonitaReadException
ProcessDefinitionServicesearchProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy in interface ProcessDefinitionServiceuserId - The identifier of the user.queryOptions - The QueryOptions object containing some query conditionsSBonitaReadException - if an exception occurs when getting the process deployment information.public long getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasks(QueryOptions queryOptions) throws SBonitaReadException
ProcessDefinitionServicegetNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasks in interface ProcessDefinitionServicequeryOptions - The QueryOptions object containing some query conditionsSBonitaReadException - if an exception occurs when getting the process deployment information.public java.util.List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosWithAssignedOrPendingHumanTasks(QueryOptions queryOptions) throws SBonitaReadException
ProcessDefinitionServicesearchProcessDeploymentInfosWithAssignedOrPendingHumanTasks in interface ProcessDefinitionServicequeryOptions - The QueryOptions object containing some query conditionsSBonitaReadException - if an exception occurs when getting the process deployment information.public org.bonitasoft.engine.bpm.process.DesignProcessDefinition getDesignProcessDefinition(long processDefinitionId)
throws SProcessDefinitionNotFoundException,
SBonitaReadException
ProcessDefinitionServicegetDesignProcessDefinition in interface ProcessDefinitionServiceprocessDefinitionId - Identifier of process definitionSProcessDefinitionNotFoundException - If the process definition doesn't exist.SBonitaReadException - If the process definition design cannot be readpublic void updateExpressionContent(long processDefinitionId,
long expressionDefinitionId,
java.lang.String content)
throws SProcessDefinitionNotFoundException,
SObjectModificationException
ProcessDefinitionServiceupdateExpressionContent in interface ProcessDefinitionServiceprocessDefinitionId - 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 expressionSProcessDefinitionNotFoundException - if the referenced process definition does not exist.SObjectModificationException - if the update cannot be performed successfully.protected boolean isValidExpressionTypeToUpdate(java.lang.String type)
protected org.bonitasoft.engine.expression.Expression getExpression(org.bonitasoft.engine.bpm.process.DesignProcessDefinition processDefinition,
long expressionDefinitionId)