Interface ProcessDefinitionService

All Known Implementing Classes:
ProcessDefinitionServiceImpl

public interface ProcessDefinitionService
Since:
6.0
Author:
Matthieu Chaffotte, Yanyan Liu, Celine Souchet, Arthur Freycon
  • Field Details

  • Method Details

    • 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 found
      SBonitaReadException
    • 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:
      SBonitaReadException
      SProcessDefinitionException - if process is not enabled.
      Since:
      6.4.0
    • getProcessDeploymentInfo

      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 found
      SBonitaReadException
    • delete

      Delete the id specified process definition and its deploy info
      Parameters:
      processId - identifier of processDefinition
      Throws:
      SProcessDefinitionNotFoundException - error thrown if no process definition found
      SProcessDeletionException
      SDeletingEnabledProcessException - error throw if the process still enabled
    • getProcessDeploymentInfos

      List<SProcessDefinitionDeployInfo> getProcessDeploymentInfos(int fromIndex, int numberPerPage, 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 0
      numberPerPage - Number of result we want to get. Maximum number of result returned
      field - the field user to do order
      order - ASC or DESC
      Returns:
      a list of SProcessDefinitionDeployInfo object
      Throws:
      SBonitaReadException
    • enableProcessDeploymentInfo

      void enableProcessDeploymentInfo(long processId) throws SProcessDefinitionNotFoundException, SProcessEnablementException
      Enable 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 processId
      SProcessEnablementException - if process is already enabled or if process is not resolved
      See Also:
    • enableProcess

      void enableProcess(long processId, boolean failIfAlreadyEnabled) throws SProcessDefinitionNotFoundException, SProcessEnablementException
      Enable the specific process definition, when it is in RESOLVED state.
      Parameters:
      processId - identifier of processDefinition
      failIfAlreadyEnabled - should we fail if process is already enabled?
      Throws:
      SProcessDefinitionNotFoundException - error thrown if no process definition found for the given processId
      SProcessEnablementException - if process is already enabled and failIfAlreadyEnabled == true, or if process is not resolved
    • disableProcessDeploymentInfo

      void disableProcessDeploymentInfo(long processId) throws SProcessDefinitionNotFoundException, SProcessDisablementException
      Disable 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 processId
      SProcessDisablementException - if process is already disabled
      See Also:
    • disableProcess

      void disableProcess(long processId, boolean failIfAlreadyDisabled) throws SProcessDefinitionNotFoundException, SProcessDisablementException
      Disable the process passed as parameter.
      Parameters:
      processId - identifier of process definition
      failIfAlreadyDisabled - should we fail if process is already disabled?
      Throws:
      SProcessDefinitionNotFoundException - error thrown if no process definition found for the given processId
      SProcessDisablementException - if process is already disabled and failIfAlreadyDisabled == true
    • resolveProcess

      void resolveProcess(long processId) throws SProcessDefinitionNotFoundException, SProcessDisablementException
      set 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 processId
      SProcessDisablementException
    • getNumberOfProcessDeploymentInfosByActivationState

      long getNumberOfProcessDeploymentInfosByActivationState(org.bonitasoft.engine.bpm.process.ActivationState activationState) throws SBonitaReadException
      Gets 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 SBonitaReadException
      Gets how many processes are defined.
      Returns:
      the number of process definitions;
      Throws:
      SBonitaReadException - occurs when an exception is thrown during method execution
    • getProcessDefinitionIds

      List<Long> getProcessDefinitionIds(org.bonitasoft.engine.bpm.process.ActivationState activationState, int fromIndex, int numberOfResult) throws SBonitaReadException
      Get the process definition identifiers in the given state.
      Parameters:
      activationState - the activation state
      fromIndex - Index of the record to be retrieved from. First record has index 0
      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
    • getProcessDefinitionIds

      List<Long> getProcessDefinitionIds(int fromIndex, int numberOfResult) throws SBonitaReadException
      Get 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, String source)
      Get target flow node for the given source flow node in the specific process
      Parameters:
      definition - the process definition containing source flow node
      source - a flow node in process definition
      Returns:
      target flow node of the given source
    • getProcessDeploymentInfos

      List<SProcessDefinitionDeployInfo> getProcessDeploymentInfos(List<Long> processIds, int fromIndex, int numberOfProcesses, String field, OrderByType order) throws SProcessDefinitionNotFoundException, SBonitaReadException
      get sub set of processDefinitionDeployInfos in specific order
      Parameters:
      processIds - identifiers of process definition
      fromIndex - Index of the record to be retrieved from. First record has index 0
      numberOfProcesses - Number of result we want to get. Maximum number of result returned
      field - filed user to do order
      order - ASC or DESC
      Returns:
      a list of SProcessDefinitionDeployInfo objects
      Throws:
      SProcessDefinitionNotFoundException
      SBonitaReadException
    • getProcessDeploymentInfos

      Throws:
      SProcessDefinitionNotFoundException
      SBonitaReadException
    • getLatestProcessDefinitionId

      long getLatestProcessDefinitionId(String processName) throws SBonitaReadException, SProcessDefinitionNotFoundException
      Get the processDefinitionId of the most recent version of the process
      Parameters:
      processName - name of process definition
      Returns:
      the latest process definition
      Throws:
      SBonitaReadException
      SProcessDefinitionNotFoundException
    • getProcessDefinitionId

      long getProcessDefinitionId(String name, String version) throws SBonitaReadException, SProcessDefinitionNotFoundException
      Get the processDefinitionId by name and version
      Parameters:
      name - name of process definition
      version - version or process definition
      Returns:
      identifier of process definition
      Throws:
      SBonitaReadException
      SProcessDefinitionNotFoundException
    • updateProcessDefinitionDeployInfo

      Update deployment info of the process definition having the id given in parameter
      Parameters:
      processId - identifier of process deploy info
      descriptor - update description
      Throws:
      SProcessDefinitionNotFoundException - error thrown when no process deploy info found with the give processId
      SProcessDeploymentInfoUpdateException
    • searchProcessDeploymentInfosStartedBy

      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 process
      searchOptions - a QueryOptions object containing some query conditions
      Returns:
      a list of SProcessDefinitionDeployInfo objects
      Throws:
      SBonitaReadException
    • getNumberOfProcessDeploymentInfosStartedBy

      long getNumberOfProcessDeploymentInfosStartedBy(long startedBy, QueryOptions countOptions) throws SBonitaReadException
      Get number of all process deploy info started by the specific user
      Parameters:
      startedBy - the name of user who started the process
      countOptions - a QueryOptions object containing some query conditions
      Returns:
      number of all process deploy info to the criteria
      Throws:
      SBonitaReadException
    • searchProcessDeploymentInfos

      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 SBonitaReadException
      Get total number of uncategorized process definitions by given query criteria for specific supervisor
      Parameters:
      userId - identifier of a supervisor user
      countOptions - a QueryOptions object containing query criteria
      Returns:
      number of uncategorized process definitions managed by the specific supervisor
      Throws:
      SBonitaReadException
    • searchUncategorizedProcessDeploymentInfos

      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

      List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosOfCategory(long categoryId, QueryOptions queryOptions) throws SBonitaReadException
      Search all process definitions for a specific category.
      Parameters:
      categoryId - Identifier of the category
      queryOptions - a QueryOptions object containing query criteria
      Returns:
      a list of SProcessDefinitionDeployInfo objects
      Throws:
      SBonitaReadException
    • searchUncategorizedProcessDeploymentInfosSupervisedBy

      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 user
      searchOptions - a QueryOptions object containing query criteria
      Returns:
      a list of SProcessDefinitionDeployInfo object
      Throws:
      SBonitaReadException
    • searchProcessDeploymentInfosCanBeStartedBy

      List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions searchOptions) throws SBonitaReadException
      Search all process definitions for the specific user who can start
      Parameters:
      userId - identifier of user
      searchOptions - a QueryOptions object containing query criteria
      Returns:
      a list of SProcessDefinitionDeployInfo objects
      Throws:
      SBonitaReadException
    • getNumberOfProcessDeploymentInfosCanBeStartedBy

      long getNumberOfProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions countOptions) throws SBonitaReadException
      Get number of all process definitions for the specific user who can start
      Parameters:
      userId - identifier of user
      countOptions - a QueryOptions object containing query criteria
      Returns:
      number of all process definitions for the specific user who can start
      Throws:
      SBonitaReadException
    • searchProcessDeploymentInfosCanBeStartedByUsersManagedBy

      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 manager
      searchOptions - a QueryOptions object containing query criteria
      Returns:
      a list of SProcessDefinitionDeployInfo objects
      Throws:
      SBonitaReadException
    • getNumberOfProcessDeploymentInfosCanBeStartedByUsersManagedBy

      long getNumberOfProcessDeploymentInfosCanBeStartedByUsersManagedBy(long managerUserId, QueryOptions countOptions) throws SBonitaReadException
      Get number of all process definitions for the users managed by specific manager, or manager who can start
      Parameters:
      managerUserId - identifier of manager
      countOptions - 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

      List<SProcessDefinitionDeployInfo> searchProcessDeploymentInfos(long userId, QueryOptions searchOptions, String querySuffix) throws SBonitaReadException
      Search all process definitions for the specific user who can perform the "querySuffix" specified action
      Parameters:
      userId - identifier of user
      searchOptions - a QueryOptions object containing query criteria
      querySuffix - 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, String querySuffix) throws SBonitaReadException
      Get total number of process definitions for the specific user who can perform the "querySuffix" specified action
      Parameters:
      userId - identifier of user
      countOptions - a QueryOptions object containing query criteria
      querySuffix - 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

      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 user
      searchOptions - a QueryOptions object containing query criteria
      Returns:
      a list of SProcessDefinitionDeployInfo object
      Throws:
      SBonitaReadException
    • getNumberOfUncategorizedProcessDeploymentInfosCanBeStartedBy

      long getNumberOfUncategorizedProcessDeploymentInfosCanBeStartedBy(long userId, QueryOptions countOptions) throws SBonitaReadException
      Get total number of uncategorized process definitions for the specific user who can start
      Parameters:
      userId - identifier of user
      countOptions - a QueryOptions object containing query criteria
      Returns:
      number of uncategorized process definitions for the specific user who can start
      Throws:
      SBonitaReadException
    • getProcessDeploymentInfosFromProcessInstanceIds

      Map<Long,SProcessDefinitionDeployInfo> getProcessDeploymentInfosFromProcessInstanceIds(List<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

      Map<Long,SProcessDefinitionDeployInfo> getProcessDeploymentInfosFromArchivedProcessInstanceIds(List<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

      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

      Long getNumberOfProcessDeploymentInfosUnrelatedToCategory(long categoryId) throws SBonitaReadException
      Get number of SProcessDefinitionDeployInfos unrelated to the specific category
      Parameters:
      categoryId -
      Returns:
      Number of SProcessDefinitionDeployInfos unrelated to the specific category
      Throws:
      SBonitaReadException
    • getProcessDeploymentInfos

      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

      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

      List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForGroups(List<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

      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

      List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForRoles(List<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

      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

      List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForUsers(List<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 SBonitaReadException
      Get total number of users according to specific query options, and who can start the given process definition
      Parameters:
      processDefinitionId - Identifier of the process definition
      queryOptions - The QueryOptions object containing some query conditions
      Returns:
      Throws:
      SBonitaReadException
    • searchUsersWhoCanStartProcessDeploymentInfo

      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 definition
      queryOptions - The QueryOptions object containing some query conditions
      Returns:
      Throws:
      SBonitaReadException
    • getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor

      long getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor(long userId, QueryOptions queryOptions) throws SBonitaReadException
      Get 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

      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 SBonitaReadException
      Get 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

      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

      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, String content) throws SProcessDefinitionNotFoundException, SObjectModificationException
      Updates 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 update
      content - 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, SBonitaReadException
      Returns 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