public interface ProcessManagementAPI
ProcessDefinition
, ProcessDeploymentInfo
, Category
, ...
It enables to interact with the cycle life of the process definition.Modifier and Type | Method and Description |
---|---|
void |
addCategoriesToProcess(long processId,
List<Long> categoryIds)
Associates the categories to process definition.
|
ActorMember |
addGroupToActor(long actorId,
long groupId)
Associates the group with the actor.
|
ActorMember |
addGroupToActor(String actorName,
long groupId,
ProcessDefinition processDefinition)
Associates the group with the actor.
|
void |
addProcessDefinitionsToCategory(long categoryId,
List<Long> processIds)
Associates a list of process definitions with the category.
|
void |
addProcessDefinitionToCategory(long categoryId,
long processId)
Associates the process definition with the category.
|
ActorMember |
addRoleAndGroupToActor(long actorId,
long roleId,
long groupId)
Associates the role and the group with the actor.
|
ActorMember |
addRoleAndGroupToActor(String actorName,
ProcessDefinition processDefinition,
long roleId,
long groupId)
Associates the role and the group with the actor.
|
ActorMember |
addRoleToActor(long actorId,
long roleId)
Associates the role with the actor.
|
ActorMember |
addRoleToActor(String actorName,
ProcessDefinition processDefinition,
long roleId)
Associates the role with the actor.
|
ActorMember |
addUserToActor(long actorId,
long userId)
Associates the user with the actor.
|
ActorMember |
addUserToActor(String actorName,
ProcessDefinition processDefinition,
long userId)
Associates a user with the actor of the process definition.
|
Category |
createCategory(String name,
String description)
Adds the category.
|
ProcessSupervisor |
createProcessSupervisorForGroup(long processId,
long groupId)
Adds the group as a supervisor of the process.
|
ProcessSupervisor |
createProcessSupervisorForMembership(long processId,
long groupId,
long roleId)
Adds the membership as a supervisor of the process.
|
ProcessSupervisor |
createProcessSupervisorForRole(long processId,
long roleId)
Adds the role as a supervisor of the process.
|
ProcessSupervisor |
createProcessSupervisorForUser(long processId,
long userId)
Adds the user as a supervisor of the process.
|
void |
deleteCategory(long categoryId)
Deletes a category and its associations.
|
void |
deleteProcess(long processId)
Deletes a process definition by giving its identifier.
|
void |
deleteProcesses(List<Long> processIds)
Deletes process definitions by giving their identifiers.
|
void |
deleteSupervisor(long supervisorId)
Deletes the process supervisor.
|
void |
deleteSupervisor(Long processId,
Long userId,
Long roleId,
Long groupId)
TODO hard to use
Delete the
ProcessSupervisor object that is identified by this processId, userId, roleId and groupId |
ProcessDefinition |
deploy(BusinessArchive businessArchive)
Deploys a
BusinessArchive which contains a DesignProcessDefinition and its dependencies. |
ProcessDefinition |
deploy(DesignProcessDefinition designProcessDefinition)
Deploys a simple
DesignProcessDefinition (without any dependencies). |
ProcessDefinition |
deployAndEnableProcess(BusinessArchive businessArchive)
Deploys and enables a process by giving a
BusinessArchive . |
ProcessDefinition |
deployAndEnableProcess(DesignProcessDefinition designProcessDefinition)
Deploys, enables and returns a process.
|
void |
disableAndDelete(long processId)
Disables and deletes the process.
|
void |
disableProcess(long processId)
Disables the process definition by giving its identifier.
|
void |
enableProcess(long processId)
Enables the process definition.
|
String |
exportActorMapping(long processId)
Exports the actor mapping of the process definition.
|
byte[] |
exportBarProcessContentUnderHome(long processDefinitionId)
FIXME What is the need?
Export processes of bar under home by a processDefinition id
|
List<DataDefinition> |
getActivityDataDefinitions(long processId,
String activityName,
int startIndex,
int maxResults)
Returns the paginated list of data definitions of the activity of the process definition.
|
ActorInstance |
getActor(long actorId)
Returns the actor.
|
ActorInstance |
getActorInitiator(long processId)
Returns the actor initiator of the process definition.
|
List<ActorMember> |
getActorMembers(long actorId,
int startIndex,
int maxResults)
Returns a list of paginated of members of an actor.
|
List<ActorInstance> |
getActors(long processId,
int startIndex,
int maxResults,
ActorCriterion sort)
Returns a list of paginated actors of a process.
|
Map<Long,ActorInstance> |
getActorsFromActorIds(List<Long> actorIds)
Returns the actor instances.
|
List<Category> |
getCategories(int startIndex,
int maxResults,
CategoryCriterion sortCriterion)
Returns the paginated list of categories.
|
List<Category> |
getCategoriesOfProcessDefinition(long processId,
int startIndex,
int maxResults,
CategoryCriterion sort)
Get categories from process definition
|
List<Category> |
getCategoriesUnrelatedToProcessDefinition(long processId,
int startIndex,
int maxResults,
CategoryCriterion sortingCriterion)
Returns the paginated list of categories that are not associated to the process definition.
|
Category |
getCategory(long categoryId)
Returns the category.
|
ConnectorImplementationDescriptor |
getConnectorImplementation(long processId,
String connectorName,
String connectorVersion)
Returns the implementation of the connector of the process definition.
|
List<ConnectorImplementationDescriptor> |
getConnectorImplementations(long processDefinitionId,
int startIndex,
int maxsResults,
ConnectorCriterion sortingCriterion)
Returns the paginated list of connector implementation descriptors of the process definition.
|
long |
getLatestProcessDefinitionId(String processName)
Returns the identifier of the latest version of the process definition.
|
int |
getNumberOfActivityDataDefinitions(long processId,
String activityName)
Counts the number of data definitions of the activity of the process definition.
|
long |
getNumberOfActorMembers(long actorId)
Counts the number of members mapped to the actor.
|
int |
getNumberOfActors(long processId)
Returns the number of actors of the process definition.
|
long |
getNumberOfCategories()
Counts the number of categories.
|
long |
getNumberOfCategories(long processId)
Counts the number of categories of the process definition.
|
long |
getNumberOfConnectorImplementations(long processDefinitionId)
Returns the number of connector implementation of the process definition.
|
long |
getNumberOfGroupsOfActor(long actorId)
Counts the number of groups mapped to the actor.
|
long |
getNumberOfMembershipsOfActor(long actorId)
Counts the number of memberships mapped to the actor.
|
int |
getNumberOfProcessDataDefinitions(long processId)
Counts the number of data definitions of the process definition.
|
long |
getNumberOfProcessDefinitionsOfCategory(long categoryId)
Counts the number of process deployment informations of the category.
|
long |
getNumberOfProcessDeploymentInfos()
Gets the current number of process definitions.
|
long |
getNumberOfProcessDeploymentInfosUnrelatedToCategory(long categoryId)
Counts the number of process definitions that have not the category.
|
long |
getNumberOfRolesOfActor(long actorId)
Counts the number of roles mapped to the actor.
|
long |
getNumberOfUncategorizedProcessDefinitions()
Counts the number of process definitions which have no category.
|
long |
getNumberOfUsersOfActor(long actorId)
Counts the number of users mapped to the actor.
|
List<DataDefinition> |
getProcessDataDefinitions(long processId,
int startIndex,
int maxResults)
Returns the paginated list of data definitions of the process definition.
|
ProcessDefinition |
getProcessDefinition(long processId)
Returns the process definition by giving its identifier.
|
long |
getProcessDefinitionId(String name,
String version)
Returns the identifier of the process definition.
|
ProcessDeploymentInfo |
getProcessDeploymentInfo(long processDefinitionId)
Gets the deployment information of a process definition by giving the process definition identifier.
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfos(int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortCriterion)
Returns a list of paginated processes deployment informations.
|
Map<Long,ProcessDeploymentInfo> |
getProcessDeploymentInfosFromArchivedProcessInstanceIds(List<Long> archivedProcessInstantsIds)
FIXME in ProcessRuntimeAPI?
Get process deployment information from a list of archived processInstance ids
|
Map<Long,ProcessDeploymentInfo> |
getProcessDeploymentInfosFromIds(List<Long> processIds)
Returns the process deployment informations of the process definitions.
|
Map<Long,ProcessDeploymentInfo> |
getProcessDeploymentInfosFromProcessInstanceIds(List<Long> processInstanceIds)
FIXME in ProcessRuntimeAPI?
Get process deployment information from a list of processInstance id
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosOfCategory(long categoryId,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sort)
Returns the paginated list of process deployment informations of the category.
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosUnrelatedToCategory(long categoryId,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the paginated list of process deployment informations of the category.
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosWithActorOnlyForGroup(long groupId,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the processes that the group is the last remaining actor.
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosWithActorOnlyForGroups(List<Long> groupIds,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the processes that the groups are the last remaining actor(s).
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosWithActorOnlyForRole(long roleId,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the processes that the role is the last remaining actor.
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosWithActorOnlyForRoles(List<Long> roleIds,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the processes that the roles are the last remaining actor(s).
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosWithActorOnlyForUser(long userId,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the processes for that the user is the last remaining actor.
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosWithActorOnlyForUsers(List<Long> userIds,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the processes that the users are the last remaining actor(s).
|
List<Problem> |
getProcessResolutionProblems(long processId)
Returns a list of problems if the process is configured incorrectly.
|
Map<String,byte[]> |
getProcessResources(long processId,
String filenamesPattern)
Returns the resources of the process according to the file names' pattern.
|
List<ProcessDeploymentInfo> |
getStartableProcessDeploymentInfosForActors(Set<Long> actorIds,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the paginated list of process deployment informations that the actors can start.
|
Set<String> |
getSupportedStates(FlowNodeType nodeType)
Returns the states of the flow node type.
|
List<ProcessDeploymentInfo> |
getUncategorizedProcessDeploymentInfos(int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortCriterion)
Returns the paginated list of process deployment informations which have no category.
|
void |
importActorMapping(long processId,
byte[] actorMappingXML)
Imports to the process definition, the actor mapping in an XML format as a byte array.
|
void |
importActorMapping(long processId,
String xmlContent)
Imports to the process definition, the actor mapping in an XML format.
|
boolean |
isAllowedToStartProcess(long processDefinitionId,
Set<Long> actorIds)
Checks whether the actors are allowed to start the process definition.
|
boolean |
isUserProcessSupervisor(long processId,
long userId)
Checks whether the user is the process supervisor.
|
void |
removeActorMember(long actorMemberId)
Deletes the actor member.
|
void |
removeAllCategoriesFromProcessDefinition(long processDefinitionId)
Deletes the associations of all categories related the process definition.
|
void |
removeAllProcessDefinitionsFromCategory(long categoryId)
Deletes the associations of all the process definitions related to the category.
|
void |
removeCategoriesFromProcess(long processId,
List<Long> categoryIds)
Dissociates the categories from the process definition.
|
SearchResult<ProcessDeploymentInfo> |
searchProcessDeploymentInfos(long userId,
SearchOptions searchOptions)
Searches the number and the list of processes that the user can start.
|
SearchResult<ProcessDeploymentInfo> |
searchProcessDeploymentInfos(SearchOptions searchOptions)
Searches the number and the list of process definitions.
|
SearchResult<ProcessDeploymentInfo> |
searchProcessDeploymentInfosStartedBy(long userId,
SearchOptions searchOptions)
Searches the number and the list of processes which have been recently started by the user.
|
SearchResult<ProcessDeploymentInfo> |
searchProcessDeploymentInfosSupervisedBy(long userId,
SearchOptions searchOptions)
Searches the number and the list of processes supervised by the user.
|
SearchResult<ProcessDeploymentInfo> |
searchProcessDeploymentInfosUsersManagedByCanStart(long managerUserId,
SearchOptions searchOptions)
TODO do not understand the behaviour of this
Search all process definitions that at least one of the actor initiators is a user of manager, or manager.
|
SearchResult<ProcessSupervisor> |
searchProcessSupervisors(SearchOptions searchOptions)
Searches the number and the list of processes supervisors.
|
SearchResult<ProcessDeploymentInfo> |
searchUncategorizedProcessDeploymentInfos(SearchOptions searchOptions)
Searches the number and the list of processes which have no category.
|
SearchResult<ProcessDeploymentInfo> |
searchUncategorizedProcessDeploymentInfosSupervisedBy(long userId,
SearchOptions searchOptions)
Searches the number and the list of processes which have no category supervised by the user.
|
SearchResult<ProcessDeploymentInfo> |
searchUncategorizedProcessDeploymentInfosUserCanStart(long userId,
SearchOptions searchOptions)
Searches the number and the list of processes which have no category that the user can start.
|
SearchResult<User> |
searchUsersWhoCanStartProcessDefinition(long processDefinitionId,
SearchOptions searchOptions)
Searches the number and the list of users who can start the process.
|
ActorInstance |
updateActor(long actorId,
ActorUpdater actorUpdater)
Updates the actor.
|
void |
updateCategory(long categoryId,
CategoryUpdater updater)
Updates the category according to the updater values.
|
void |
updateProcessDeploymentInfo(long processId,
ProcessDeploymentInfoUpdater processDeploymentInfoUpdater)
Updates the process deployment information by giving the process definition identifier.
|
ProcessDefinition deploy(BusinessArchive businessArchive) throws AlreadyExistsException, ProcessDeployException
BusinessArchive
which contains a DesignProcessDefinition
and its dependencies.businessArchive
- the archive ready to deploy.AlreadyExistsException
- if a process with same name and version was already deployed.ProcessDeployException
- if an exception occurs when deploying the archive.BusinessArchive
,
BusinessArchiveBuilder
,
BusinessArchiveFactory
ProcessDefinition deploy(DesignProcessDefinition designProcessDefinition) throws AlreadyExistsException, ProcessDeployException
DesignProcessDefinition
(without any dependencies).designProcessDefinition
- the description of a process definition.AlreadyExistsException
- if a process with same name and version was already deployed.ProcessDeployException
- if an exception occurs when deploying the process.deploy(BusinessArchive)
void enableProcess(long processId) throws ProcessDefinitionNotFoundException, ProcessEnablementException
processId
- the process definition identifier.ProcessDefinitionNotFoundException
- if the identifier does not refer to an existing process definition.ProcessEnablementException
- if an exception occurs during the process enablement.void disableProcess(long processId) throws ProcessDefinitionNotFoundException, ProcessActivationException
processId
- the process definition identifier.ProcessDefinitionNotFoundException
- if the identifier does not refer to an existing process definition.ProcessActivationException
- if an exception occurs during the process disablement.ProcessDefinition getProcessDefinition(long processId) throws ProcessDefinitionNotFoundException
processId
- the identifier of the process definition.ProcessDefinitionNotFoundException
- if the identifier does not refer to an existing process definition.RetrieveException
- if an exception occurs when getting the process definition.void deleteProcess(long processId) throws DeletionException
processId
- the identifier of the process definition.DeletionException
- if an exception occurs during process deletion.ProcessInstanceHierarchicalDeletionException
- if a process instance can't be deleted because of a parent that is still activevoid deleteProcesses(List<Long> processIds) throws DeletionException
processIds
- the list of identifiers of process definitions.DeletionException
- if an exception occurs during process deletion.ProcessInstanceHierarchicalDeletionException
- if a process instance can't be deleted because of a parent that is still activedeleteProcess(long)
ProcessDefinition deployAndEnableProcess(DesignProcessDefinition designProcessDefinition) throws ProcessDeployException, ProcessEnablementException, AlreadyExistsException, InvalidProcessDefinitionException
designProcessDefinition
- the description of a process definition.AlreadyExistsException
- if a process with same name and version was already deployed.ProcessEnablementException
- When a process cannot be enabledInvalidProcessDefinitionException
- When the designProcessDefinition is invalidProcessDeployException
- if an exception occurs when deploying the archive.deploy(DesignProcessDefinition)
,
enableProcess(long)
ProcessDefinition deployAndEnableProcess(BusinessArchive businessArchive) throws ProcessDeployException, ProcessEnablementException, AlreadyExistsException
BusinessArchive
.businessArchive
- the archive ready to deploy.ProcessDeployException
- Generic exception thrown if this process definition has any exceptionsAlreadyExistsException
- When a process with same name and same version existsProcessEnablementException
- When a process cannot be enabled
FIXMEList<Problem> getProcessResolutionProblems(long processId) throws ProcessDefinitionNotFoundException
processId
- the process definition identifier.ProcessDefinitionNotFoundException
- if the identifier does not refer to an existing process definition.RetrieveException
- if an exception occurs when getting the problems of the process definition.void disableAndDelete(long processId) throws ProcessDefinitionNotFoundException, ProcessActivationException, DeletionException
processId
- the process definition identifier.ProcessDefinitionNotFoundException
- if the identifier does not refer to an existing process definition.ProcessActivationException
DeletionException
- if has exception during the process to disable.disableProcess(long)
,
deleteProcess(long)
long getNumberOfProcessDeploymentInfos()
RetrieveException
- if an exception occurs when getting the number of the process definitions.ProcessDeploymentInfo getProcessDeploymentInfo(long processDefinitionId) throws ProcessDefinitionNotFoundException
processId
- the process definition identifier.ProcessDefinitionNotFoundException
- if the identifier does not refer to an existing process definition.RetrieveException
- if an exception occurs when getting the process deployment information.void updateProcessDeploymentInfo(long processId, ProcessDeploymentInfoUpdater processDeploymentInfoUpdater) throws ProcessDefinitionNotFoundException, UpdateException
processId
- the process definition identifier.processDeploymentInfoUpdater
- the description which describe how to update the process deployment information.ProcessDefinitionNotFoundException
- if the identifier does not refer to an existing process definition.UpdateException
- if an exception occurs when updating the process deployment information.List<ProcessDeploymentInfo> getProcessDeploymentInfos(int startIndex, int maxResults, ProcessDeploymentInfoCriterion sortCriterion)
startIndex
- the index of first result (starting from 0).maxResults
- the max number of process deployment information.sortCriterion
- the sorting criterion.RetrieveException
- if an exception occurs when getting the process deployment informations.int getNumberOfActors(long processId) throws ProcessDefinitionNotFoundException
processId
- the process definition identifier.ProcessDefinitionNotFoundException
- if the identifier does not refer to an existing process definition.ActorInstance getActor(long actorId) throws ActorNotFoundException
actorId
- the identifier of the actor.ActorNotFoundException
- if an identifier does not refer to an existing actor.List<ActorInstance> getActors(long processId, int startIndex, int maxResults, ActorCriterion sort)
processId
- the process definition identifier.startIndex
- the index of first result (starting from 0).maxResults
- the max number of actors.sort
- the sorting criterion.List<ActorMember> getActorMembers(long actorId, int startIndex, int maxResults)
actorId
- the identifier of the actor.startIndex
- the index of first result (starting from 0).maxResults
- the max number of actor members.sort
- the sorting criterion.long getNumberOfActorMembers(long actorId)
actorId
- the identifier of the actor.long getNumberOfUsersOfActor(long actorId)
actorId
- the identifier of the actor.long getNumberOfRolesOfActor(long actorId)
actorId
- the identifier of the actor.long getNumberOfGroupsOfActor(long actorId)
actorId
- the identifier of the actor.long getNumberOfMembershipsOfActor(long actorId)
actorId
- the identifier of the actor.ActorInstance updateActor(long actorId, ActorUpdater actorUpdater) throws ActorNotFoundException, UpdateException
actorId
- the identifier of the actor.actorUpdater
- the descriptor which contains the fields to update.ActorNotFoundException
- if an identifier does not refer to an existing actor.UpdateException
- if an exception occurs when updating the actor.ActorMember addUserToActor(long actorId, long userId) throws CreationException, AlreadyExistsException
ActorMember
.actorId
- the identifier of the actor.userId
- the identifier of the user.CreationException
- if an exception occurs when creating the actor mapping.AlreadyExistsException
UserAPI.getUser(long)
ActorMember addUserToActor(String actorName, ProcessDefinition processDefinition, long userId) throws ActorNotFoundException, CreationException, AlreadyExistsException
ActorMember
.actorName
- the name of the actor.processDefinition
- the process definition.userId
- the identifier of the user.ActorNotFoundException
- if the name does not refer to an existing actor of the process definition.CreationException
- if an exception occurs when creating the actor mapping.AlreadyExistsException
UserAPI.getUser(long)
ActorMember addGroupToActor(long actorId, long groupId) throws CreationException, AlreadyExistsException
actorId
- the identifier of the actor.groupId
- the identifier of the group.CreationException
- if the exception occurs when creating the actor mapping.AlreadyExistsException
- if the association already exists.GroupAPI.getGroup(long)
ActorMember addGroupToActor(String actorName, long groupId, ProcessDefinition processDefinition) throws ActorNotFoundException, CreationException, AlreadyExistsException
actorName
- the name of the actor.groupId
- the identifier of the group.processDefinition
- the process definition.ActorNotFoundException
- if the name does not refer to an existing actor of the process definition.CreationException
- if an exception occurs when creating the actor mapping.AlreadyExistsException
- if the association already exists.ActorMember addRoleToActor(long actorId, long roleId) throws CreationException
actorId
- the identifier of the actor.roleId
- the identifier of the role.CreationException
- if an exception occurs when creating the actor mapping.ActorMember addRoleToActor(String actorName, ProcessDefinition processDefinition, long roleId) throws ActorNotFoundException, CreationException
actorName
- the name of the actor.processDefinition
- the process definition.roleId
- the identifier of the role.ActorNotFoundException
- if the name does not refer to an existing actor of the process definition.CreationException
- if an exception occurs when creating the actor mapping.ActorMember addRoleAndGroupToActor(long actorId, long roleId, long groupId) throws CreationException
actorId
- the identifier of the actor.roleId
- the identifier of the role.groupId
- the identifier of the group.CreationException
- if an exception occurs when creating the actor mapping.ActorMember addRoleAndGroupToActor(String actorName, ProcessDefinition processDefinition, long roleId, long groupId) throws ActorNotFoundException, CreationException
actorName
- the name of the actor.processDefinition
- the process definition.roleId
- the identifier of the role.groupId
- the identifier of the role.ActorNotFoundException
- if the actor name does not refer to an existing actor in the process definition.CreationException
- if an exception occurs when creating the actor mapping.void removeActorMember(long actorMemberId) throws DeletionException
actorMemberId
- the identifier of the actor memberDeletionException
- if an exception occurs when deleting the actor mapping.void importActorMapping(long processId, String xmlContent) throws ActorMappingImportException
processId
- the identifier of the process.xmlContent
- the XML content of the mapping.ActorMappingImportException
- if an exception occurs when importing the actor mapping.void importActorMapping(long processId, byte[] actorMappingXML) throws ActorMappingImportException
processId
- the identifier of the process.actorMappingXML
- the XML content of the mapping as a byte array.ActorMappingImportException
- if an exception occurs when importing the actor mapping.String exportActorMapping(long processId) throws ActorMappingExportException
processId
- the identifier of the process.ActorMappingExportException
- if an exception occurs when exporting the actor mapping.Category createCategory(String name, String description) throws AlreadyExistsException, CreationException
name
- The name of the category.description
- The description of the category.AlreadyExistsException
- if a category already exists with the given name.CreationException
- if an exception occurs when creating the category.long getNumberOfCategories()
List<Category> getCategories(int startIndex, int maxResults, CategoryCriterion sortCriterion)
startIndex
- the index of first result (starting from 0).maxResults
- the max number of categories.sortCriterion
- the sorting criterion.Category getCategory(long categoryId) throws CategoryNotFoundException
categoryId
- the identifier of the category.CategoryNotFoundException
- if the identifier does not refer to an existing category.void addProcessDefinitionToCategory(long categoryId, long processId) throws AlreadyExistsException, CreationException
categoryId
- the identifier of the category.processId
- the identifier of the process definition.AlreadyExistsException
- if the association category/process already exists.CreationException
- TODOvoid addProcessDefinitionsToCategory(long categoryId, List<Long> processIds) throws AlreadyExistsException, CreationException
categoryId
- the identifier of the category.processIds
- the identifiers of the process definitions.AlreadyExistsException
- if an association category/process already exists.CreationException
- TODOlong getNumberOfCategories(long processId)
processId
- the identifier of the process definition.long getNumberOfProcessDefinitionsOfCategory(long categoryId)
categoryId
- the identifier of the category.List<ProcessDeploymentInfo> getProcessDeploymentInfosOfCategory(long categoryId, int startIndex, int maxResults, ProcessDeploymentInfoCriterion sort)
categoryId
- the identifier of the category.startIndex
- the index of first result (starting from 0).maxResults
- the max number of process deployment information.sort
- the sorting criterion.List<Category> getCategoriesOfProcessDefinition(long processId, int startIndex, int maxResults, CategoryCriterion sort)
processId
- the identifier of the process definition.startIndex
- the index of first result (starting from 0).maxResults
- the max number of categories.sort
- the sorting criterion.void updateCategory(long categoryId, CategoryUpdater updater) throws CategoryNotFoundException, UpdateException
categoryId
- the identifier of the categoryupdater
- the role updaterCategoryNotFoundException
- If the category identifier does not refer to an existing categoryUpdateException
- If an exception occurs during the category updatevoid deleteCategory(long categoryId) throws DeletionException
categoryId
- the identifier of the category.DeletionException
- if an exception occurs when deleting the category.void removeAllProcessDefinitionsFromCategory(long categoryId) throws DeletionException
categoryId
- the identifier of the category.DeletionException
- if an error occurs while removing the process definitions of categoryvoid removeAllCategoriesFromProcessDefinition(long processDefinitionId) throws DeletionException
processDefinitionId
- the identifier of the process definition.DeletionException
- if an error occurs while removing the process definition from categorylong getNumberOfUncategorizedProcessDefinitions()
List<ProcessDeploymentInfo> getUncategorizedProcessDeploymentInfos(int startIndex, int maxResults, ProcessDeploymentInfoCriterion sortCriterion)
startIndex
- the number of the page (the first page number is 0).maxResults
- the number of categories.sortCriterion
- the sorting criterion.List<DataDefinition> getActivityDataDefinitions(long processId, String activityName, int startIndex, int maxResults) throws ProcessDefinitionNotFoundException, ActivityDefinitionNotFoundException
processId
- the identifier of the process definition.activityName
- the name of the activity.startIndex
- the index of first result (starting from 0).maxResults
- the max number of data definitions.ProcessDefinitionNotFoundException
- if the identifier does not refer to an existing process definition.ActivityDefinitionNotFoundException
- if the name does not refer to an existing activity.int getNumberOfActivityDataDefinitions(long processId, String activityName) throws ProcessDefinitionNotFoundException, ActivityDefinitionNotFoundException
processId
- the identifier of the process definition.activityName
- the name of the activity.ProcessDefinitionNotFoundException
- if the identifier does not refer to an existing process definition.ActivityDefinitionNotFoundException
- if the name does not refer to an existing activity.List<DataDefinition> getProcessDataDefinitions(long processId, int startIndex, int maxResults) throws ProcessDefinitionNotFoundException
processId
- the identifier of the process definition.startIndex
- the index of first result (starting from 0).maxResults
- the max number of data definitions.ProcessDefinitionNotFoundException
- if the identifier does not refer to an existing process definition.int getNumberOfProcessDataDefinitions(long processId) throws ProcessDefinitionNotFoundException
processId
- the identifier of the process definition.ProcessDefinitionNotFoundException
- if the identifier does not refer to an existing process definition.Map<String,byte[]> getProcessResources(long processId, String filenamesPattern) throws RetrieveException
processId
- the identifier of the process definition.filenamesPattern
- the pattern to retrieve the resources.RetrieveException
- if an exception occurs when getting the resources of the process definition.long getLatestProcessDefinitionId(String processName) throws ProcessDefinitionNotFoundException
processName
- the process definition name.ProcessDefinitionNotFoundException
- if the identifier does not refer to an existing process definition.Set<String> getSupportedStates(FlowNodeType nodeType)
nodeType
- the flow node type.long getProcessDefinitionId(String name, String version) throws ProcessDefinitionNotFoundException
name
- the name of the process definition.version
- the version of the process definition.ProcessDefinitionNotFoundException
- if the identifier does not refer to an existing process definition.List<ProcessDeploymentInfo> getStartableProcessDeploymentInfosForActors(Set<Long> actorIds, int startIndex, int maxResults, ProcessDeploymentInfoCriterion sortingCriterion)
actorIds
- the identifiers of the actors.startIndex
- the index of first result (starting from 0).maxResults
- the max number of process deployment informations.sortingCriterion
- the sort criterionboolean isAllowedToStartProcess(long processDefinitionId, Set<Long> actorIds)
processId
- the identifier of the process definition.actorIds
- the identifiers of the actors.ActorInstance getActorInitiator(long processId) throws ActorNotFoundException, ProcessDefinitionNotFoundException
processId
- the identifier of the process definition.ActorNotFoundException
- if the process definition does not have an actor initiator.ProcessDefinitionNotFoundException
- if the process definition corresponding to the given identifier is not foundSearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfosStartedBy(long userId, SearchOptions searchOptions) throws SearchException
userId
- the identifier of the user.searchOptions
- the search criteria.SearchException
- if an exception occurs when getting the processes.SearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfos(long userId, SearchOptions searchOptions) throws SearchException
userId
- the identifier of the user.searchOptions
- the search criteria.SearchException
- if an exception occurs when getting the processes.SearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfos(SearchOptions searchOptions) throws SearchException
searchOptions
- The criterion used to search ProcessDeploymentInfoSearchException
- if an exception occurs when getting the processes.void addCategoriesToProcess(long processId, List<Long> categoryIds) throws AlreadyExistsException, CreationException
processId
- the identifier of the process definition.categoryIds
- the identifiers of the categories.AlreadyExistsException
- if the association category/process has already added.CreationException
- if an exception occurs when associating the process with the categories.void removeCategoriesFromProcess(long processId, List<Long> categoryIds) throws DeletionException
processId
- the identifier of the process definition.categoryIds
- the identifiers of the categories.DeletionException
- if an exception occurs when dissociating the categories from the process definition.SearchResult<ProcessDeploymentInfo> searchUncategorizedProcessDeploymentInfos(SearchOptions searchOptions) throws SearchException
searchOptions
- the search criteria.SearchException
- if an exception occurs when searching the process deployment information.SearchResult<ProcessDeploymentInfo> searchUncategorizedProcessDeploymentInfosSupervisedBy(long userId, SearchOptions searchOptions) throws SearchException
userId
- the identifier of the user.searchOptions
- the search criteria.SearchException
- TODOSearchResult<ProcessDeploymentInfo> searchUncategorizedProcessDeploymentInfosUserCanStart(long userId, SearchOptions searchOptions) throws SearchException
userId
- the identifier of the user.searchOptions
- the search criteria.SearchException
- TODOMap<Long,ProcessDeploymentInfo> getProcessDeploymentInfosFromIds(List<Long> processIds)
processIds
- the identifiers of the process definitions.ConnectorImplementationDescriptor getConnectorImplementation(long processId, String connectorName, String connectorVersion) throws ConnectorNotFoundException
processId
- the identifier of the process definition.connectorName
- the name of the connector.connectorVersion
- the version of the connector.ConnectorNotFoundException
- if an exception occurs when getting the connector implementation.List<ConnectorImplementationDescriptor> getConnectorImplementations(long processDefinitionId, int startIndex, int maxsResults, ConnectorCriterion sortingCriterion)
processDefinitionId
- the identifier of the process definition.startIndex
- the index of first result (starting from 0).maxsResults
- the max number of categories.sortingCriterion
- the sort criterion.long getNumberOfConnectorImplementations(long processDefinitionId)
processDefinitionId
- the identifier of the process definition.Map<Long,ActorInstance> getActorsFromActorIds(List<Long> actorIds)
actorIds
- the identifiers of the actors.List<ProcessDeploymentInfo> getProcessDeploymentInfosWithActorOnlyForGroup(long groupId, int startIndex, int maxResults, ProcessDeploymentInfoCriterion sortingCriterion)
groupId
- the identifier of the group.startIndex
- the index of first result (starting from 0).maxResults
- the max number of processessortingCriterion
- the sort criterion.List<ProcessDeploymentInfo> getProcessDeploymentInfosWithActorOnlyForGroups(List<Long> groupIds, int startIndex, int maxResults, ProcessDeploymentInfoCriterion sortingCriterion)
groupIds
- the identifiers of the groups.startIndex
- the index of first result (starting from 0).maxResults
- the max number of processessortingCriterion
- the sort criterion.List<ProcessDeploymentInfo> getProcessDeploymentInfosWithActorOnlyForRole(long roleId, int startIndex, int maxResults, ProcessDeploymentInfoCriterion sortingCriterion)
roleId
- the identifier of the role.startIndex
- the index of first result (starting from 0).maxResults
- the max number of processessortingCriterion
- the sort criterion.List<ProcessDeploymentInfo> getProcessDeploymentInfosWithActorOnlyForRoles(List<Long> roleIds, int startIndex, int maxResults, ProcessDeploymentInfoCriterion sortingCriterion)
roleIds
- the identifiers of the roles.startIndex
- the index of first result (starting from 0).maxResults
- the max number of processessortingCriterion
- the sort criterion.List<ProcessDeploymentInfo> getProcessDeploymentInfosWithActorOnlyForUser(long userId, int startIndex, int maxResults, ProcessDeploymentInfoCriterion sortingCriterion)
userId
- the identifier of the user.startIndex
- the index of first result (starting from 0).maxResults
- the max number of processessortingCriterion
- the sort criterion.List<ProcessDeploymentInfo> getProcessDeploymentInfosWithActorOnlyForUsers(List<Long> userIds, int startIndex, int maxResults, ProcessDeploymentInfoCriterion sortingCriterion)
userIds
- the identifiers of the users.startIndex
- the index of first result (starting from 0).maxResults
- the max number of processessortingCriterion
- the sort criterion.#getProcessesWithActorOnlyForUser
SearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfosSupervisedBy(long userId, SearchOptions searchOptions) throws SearchException
userId
- the identifier of the user.searchOptions
- the search criteria.SearchException
- if an exception occurs when getting the process deployment informations.SearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfosUsersManagedByCanStart(long managerUserId, SearchOptions searchOptions) throws SearchException
managerUserId
- searchOptions
- the search options parametersSearchException
ProcessSupervisor createProcessSupervisorForUser(long processId, long userId) throws CreationException, AlreadyExistsException
processId
- the identifier of the process definition.userId
- the identifier of the user.CreationException
- if an exception occurs when creating the process supervisor.AlreadyExistsException
ProcessSupervisor createProcessSupervisorForRole(long processId, long roleId) throws CreationException, AlreadyExistsException
processId
- the identifier of the process definition.roleId
- the identifier of the role.CreationException
- if an exception occurs when creating the process supervisor.AlreadyExistsException
ProcessSupervisor createProcessSupervisorForGroup(long processId, long groupId) throws CreationException, AlreadyExistsException
processId
- the identifier of the process definition.groupId
- the identifier of the group.CreationException
- if an exception occurs when creating the process supervisor.AlreadyExistsException
ProcessSupervisor createProcessSupervisorForMembership(long processId, long groupId, long roleId) throws CreationException, AlreadyExistsException
processId
- the identifier of the process definition.groupId
- the identifier of the group.roleId
- the identifier of the role.CreationException
- if an exception occurs when creating the process supervisor.AlreadyExistsException
boolean isUserProcessSupervisor(long processId, long userId)
processId
- the identifier of the process definition.userId
- the identifier of the user.void deleteSupervisor(long supervisorId) throws DeletionException
supervisorId
- the identifier of the ProcessSupervisor
.DeletionException
- if an exception occurs when deleting the process supervisor.void deleteSupervisor(Long processId, Long userId, Long roleId, Long groupId) throws DeletionException
ProcessSupervisor
object that is identified by this processId, userId, roleId and groupId
e.g. to delete the process supervisor that is set for userId 12 and process id 255 call deleteSupervisor(255, 12, null, null)
be careful if the user is supervisor because he is in e.g. a group of super visor calling this method with the userId will do nothing, you must find the
ProcessSupervisor
that link the user to the process
processId
- userId
- roleId
- groupId
- DeletionException
SearchResult<ProcessSupervisor> searchProcessSupervisors(SearchOptions searchOptions) throws SearchException
searchOptions
- the search criteria.SearchException
- if an exception occurs when getting the processes supervisors.List<Category> getCategoriesUnrelatedToProcessDefinition(long processId, int startIndex, int maxResults, CategoryCriterion sortingCriterion)
processId
- the identifier of the process definition.startIndex
- the number of the page (the first page number is 0).maxResults
- the number of categories.sortingCriterion
- the sort criterion.long getNumberOfProcessDeploymentInfosUnrelatedToCategory(long categoryId)
categoryId
- the identifier of the category.List<ProcessDeploymentInfo> getProcessDeploymentInfosUnrelatedToCategory(long categoryId, int startIndex, int maxResults, ProcessDeploymentInfoCriterion sortingCriterion)
categoryId
- the identifier of the category.startIndex
- the number of the page (the first page number is 0).maxResults
- the number of process deployment informations.sortingCriterion
- the sort criterion.SearchResult<User> searchUsersWhoCanStartProcessDefinition(long processDefinitionId, SearchOptions searchOptions) throws SearchException
processId
- the identifier of the process definition.searchOptions
- the search criteria.SearchException
- if an exception occurs when getting the users.Map<Long,ProcessDeploymentInfo> getProcessDeploymentInfosFromProcessInstanceIds(List<Long> processInstanceIds)
processInstanceIds
- Identifier of the processInstanceMap<Long,ProcessDeploymentInfo> getProcessDeploymentInfosFromArchivedProcessInstanceIds(List<Long> archivedProcessInstantsIds)
archivedProcessInstantsIds
- Identifier of the archived process instancebyte[] exportBarProcessContentUnderHome(long processDefinitionId) throws ProcessExportException
processDefinitionId
- Identifier of the processDefinitionProcessExportException
- TODOCopyright © 2013 BonitaSoft. All Rights Reserved.