public interface ProcessManagementAPI
ProcessDefinition
, ProcessDeploymentInfo
, Category
, ...
It enables interaction with the lifecycle of the process definition.Modifier and Type | Method and Description |
---|---|
void |
addCategoriesToProcess(long processDefinitionId,
List<Long> categoryIds)
Associates the categories to the process definition.
|
ActorMember |
addGroupToActor(long actorId,
long groupId)
Maps the group to the actor.
|
ActorMember |
addGroupToActor(String actorName,
long groupId,
ProcessDefinition processDefinition)
Maps the group to the actor of the process definition.
|
void |
addProcessDefinitionsToCategory(long categoryId,
List<Long> processDefinitionIds)
Associates a list of process definitions with the category.
|
void |
addProcessDefinitionToCategory(long categoryId,
long processDefinitionId)
Associates the process definition with the category.
|
ActorMember |
addRoleAndGroupToActor(long actorId,
long roleId,
long groupId)
Maps the role and the group to the actor.
|
ActorMember |
addRoleAndGroupToActor(String actorName,
ProcessDefinition processDefinition,
long roleId,
long groupId)
Maps the role and the group to the actor of the process definition.
|
ActorMember |
addRoleToActor(long actorId,
long roleId)
Maps the role to the actor.
|
ActorMember |
addRoleToActor(String actorName,
ProcessDefinition processDefinition,
long roleId)
Maps the role to the actor of the process definition.
|
ActorMember |
addUserToActor(long actorId,
long userId)
Maps the user to the actor.
|
ActorMember |
addUserToActor(String actorName,
ProcessDefinition processDefinition,
long userId)
Maps a user to the actor of the process definition.
|
Category |
createCategory(String name,
String description)
Adds a category.
|
ProcessSupervisor |
createProcessSupervisorForGroup(long processDefinitionId,
long groupId)
Adds the group as a supervisor of the process.
|
ProcessSupervisor |
createProcessSupervisorForMembership(long processDefinitionId,
long groupId,
long roleId)
Adds the membership as a supervisor of the process.
|
ProcessSupervisor |
createProcessSupervisorForRole(long processDefinitionId,
long roleId)
Adds the role as a supervisor of the process.
|
ProcessSupervisor |
createProcessSupervisorForUser(long processDefinitionId,
long userId)
Adds the user as a supervisor of the process.
|
void |
deleteCategory(long categoryId)
Deletes a category and its associations.
|
void |
deleteProcess(long processDefinitionId)
Deprecated.
As of release 6.1, replaced by
deleteProcessDefinition(long) |
void |
deleteProcessDefinition(long processDefinitionId)
Deletes a process definition by giving its identifier.
|
void |
deleteProcessDefinitions(List<Long> processDefinitionIds)
Deletes process definitions by giving their identifiers.
|
void |
deleteProcesses(List<Long> processDefinitionIds)
Deprecated.
As of release 6.1, replaced by
deleteProcessDefinitions(List) |
void |
deleteSupervisor(long supervisorId)
Deletes a process supervisor.
|
void |
deleteSupervisor(Long processDefinitionId,
Long userId,
Long roleId,
Long groupId)
Delete the
ProcessSupervisor object that is identified by this processDefinitionId, 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 processDefinitionId)
Deprecated.
As of release 6.1, replaced by
disableAndDeleteProcessDefinition(long) |
void |
disableAndDeleteProcessDefinition(long processDefinitionId)
Disables and deletes the process.
|
void |
disableProcess(long processDefinitionId)
Disables the process definition by giving its identifier.
|
void |
enableProcess(long processDefinitionId)
Enables the process definition.
|
String |
exportActorMapping(long processDefinitionId)
Exports the actor mapping of the process definition.
|
byte[] |
exportBarProcessContentUnderHome(long processDefinitionId)
Export processes of bar under home by a processDefinition id
|
List<DataDefinition> |
getActivityDataDefinitions(long processDefinitionId,
String activityName,
int startIndex,
int maxResults)
Returns the paged list of data definitions of the activity of the process definition.
|
ActorInstance |
getActor(long actorId)
Returns the actor.
|
ActorInstance |
getActorInitiator(long processDefinitionId)
Returns the actor initiator of the process definition.
|
List<ActorMember> |
getActorMembers(long actorId,
int startIndex,
int maxResults)
Returns a paged list of members of an actor.
|
List<ActorInstance> |
getActors(long processDefinitionId,
int startIndex,
int maxResults,
ActorCriterion sort)
Returns a paged list of actors in a process.
|
Map<Long,ActorInstance> |
getActorsFromActorIds(List<Long> actorIds)
Returns the actor instances.
|
List<Category> |
getCategories(int startIndex,
int maxResults,
CategoryCriterion sortCriterion)
Returns a paged list of categories.
|
List<Category> |
getCategoriesOfProcessDefinition(long processDefinitionId,
int startIndex,
int maxResults,
CategoryCriterion sort)
Get categories from process definition
|
List<Category> |
getCategoriesUnrelatedToProcessDefinition(long processDefinitionId,
int startIndex,
int maxResults,
CategoryCriterion sortingCriterion)
Returns a paged list of categories that are not associated with the process definition.
|
Category |
getCategory(long categoryId)
Returns the category.
|
ConnectorImplementationDescriptor |
getConnectorImplementation(long processDefinitionId,
String connectorName,
String connectorVersion)
Returns the implementation of a connector of the process definition.
|
List<ConnectorImplementationDescriptor> |
getConnectorImplementations(long processDefinitionId,
int startIndex,
int maxsResults,
ConnectorCriterion sortingCriterion)
Returns a paged list of connector implementation descriptors for the process definition.
|
DesignProcessDefinition |
getDesignProcessDefinition(long processDefinitionId)
Returns a specific process definition that include informations such as tasks definition, actors...
|
long |
getLatestProcessDefinitionId(String processName)
Returns the identifier of the most recently deployed process definition with the given name.
|
int |
getNumberOfActivityDataDefinitions(long processDefinitionId,
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 processDefinitionId)
Returns the number of actors in a process definition.
|
long |
getNumberOfCategories()
Counts the number of categories.
|
long |
getNumberOfCategories(long processDefinitionId)
Counts the number of categories of the process definition, that is, the number of categories to which the process belongs.
|
long |
getNumberOfConnectorImplementations(long processDefinitionId)
Returns the number of connector implementations 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 processDefinitionId)
Counts the number of data definitions of the process definition.
|
long |
getNumberOfProcessDefinitionsOfCategory(long categoryId)
Counts the number of process deployment information entries of the category.
|
long |
getNumberOfProcessDeploymentInfos()
Gets the current number of process definitions in all states.
|
long |
getNumberOfProcessDeploymentInfosUnrelatedToCategory(long categoryId)
Counts the number of process definitions that do not belong to 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<User> |
getPossibleUsersOfHumanTask(long processDefinitionId,
String humanTaskName,
int startIndex,
int maxResults)
Lists the possible users (candidates) of the specified human task definition.
|
List<DataDefinition> |
getProcessDataDefinitions(long processDefinitionId,
int startIndex,
int maxResults)
Returns the paged list of data definitions of the process definition.
|
ProcessDefinition |
getProcessDefinition(long processDefinitionId)
Returns the process definition by giving its identifier.
|
long |
getProcessDefinitionId(String name,
String version)
Returns the identifier of the process definition with the specified name and version.
|
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 paged list of process deployment information for a number of processes.
|
Map<Long,ProcessDeploymentInfo> |
getProcessDeploymentInfosFromArchivedProcessInstanceIds(List<Long> archivedProcessInstantsIds)
Get process deployment information from a list of archived processInstance ids
|
Map<Long,ProcessDeploymentInfo> |
getProcessDeploymentInfosFromIds(List<Long> processDefinitionIds)
Returns the process deployment information of the process definitions.
|
Map<Long,ProcessDeploymentInfo> |
getProcessDeploymentInfosFromProcessInstanceIds(List<Long> processInstanceIds)
Get process deployment information from a list of processInstance id
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosOfCategory(long categoryId,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sort)
Returns the paged list of process deployment information items for the category.
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosUnrelatedToCategory(long categoryId,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the paginated list of process deployment information items of the category.
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosWithActorOnlyForGroup(long groupId,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the processes for which a specified group is the only mapped actor.
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosWithActorOnlyForGroups(List<Long> groupIds,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the processes for which one of the listed groups is the only mapped actors.
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosWithActorOnlyForRole(long roleId,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the processes for which the role is the only mapped actor.
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosWithActorOnlyForRoles(List<Long> roleIds,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the processes for which one of the listed roles is the only mapped actors.
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosWithActorOnlyForUser(long userId,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the processes for which the user is the only mapped actor.
|
List<ProcessDeploymentInfo> |
getProcessDeploymentInfosWithActorOnlyForUsers(List<Long> userIds,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the processes for which one of the listed users is the only mapped actor.
|
List<Problem> |
getProcessResolutionProblems(long processDefinitionId)
Returns a list of problems if the process is configured incorrectly or the configuration is incomplete.
|
Map<String,byte[]> |
getProcessResources(long processDefinitionId,
String filenamesPattern)
Retrieves resources inside .bar file representing the deployed process.
|
List<ProcessDeploymentInfo> |
getStartableProcessDeploymentInfosForActors(Set<Long> actorIds,
int startIndex,
int maxResults,
ProcessDeploymentInfoCriterion sortingCriterion)
Returns the paged list of process deployment information items 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 paged list of process deployment information items which have no category.
|
List<Long> |
getUserIdsForActor(long processDefinitionId,
String actorName,
int startIndex,
int maxResults)
Retrieves the list of user identifiers for the given actor and process.
|
void |
importActorMapping(long processDefinitionId,
byte[] actorMappingXML)
Imports to the process definition, the actor mapping in XML format as a byte array.
|
void |
importActorMapping(long processDefinitionId,
String xmlContent)
Imports into the process definition an actor mapping in XML format.
|
boolean |
isAllowedToStartProcess(long processDefinitionId,
Set<Long> actorIds)
Checks whether the actors are allowed to start the process definition.
|
boolean |
isUserProcessSupervisor(long processDefinitionId,
long userId)
Checks whether the user is the process supervisor.
|
void |
removeActorMember(long actorMemberId)
Deletes the actor member.
|
void |
removeAllCategoriesFromProcessDefinition(long processDefinitionId)
Deprecated.
As of release 6.1, replaced by
removeCategoriesFromProcessDefinition(long, int, int) |
void |
removeAllProcessDefinitionsFromCategory(long categoryId)
Deprecated.
As of release 6.1, replaced by
removeProcessDefinitionsFromCategory(long, int, int) |
void |
removeCategoriesFromProcess(long processDefinitionId,
List<Long> categoryIds)
Dissociates the categories from the process definition.
|
long |
removeCategoriesFromProcessDefinition(long processDefinitionId,
int startIndex,
int maxResults)
Deletes the associations of categories related the process definition given as input parameter respecting the pagination parameters.
|
long |
removeProcessDefinitionsFromCategory(long categoryId,
int startIndex,
int maxResults)
Deletes the associations of all the process definitions related to the category given as input parameter respecting the pagination parameters.
|
SearchResult<ProcessDeploymentInfo> |
searchProcessDeploymentInfos(long userId,
SearchOptions searchOptions)
Deprecated.
since 6.3.3
|
SearchResult<ProcessDeploymentInfo> |
searchProcessDeploymentInfos(SearchOptions searchOptions)
Searches for the number and the list of process definitions.
|
SearchResult<ProcessDeploymentInfo> |
searchProcessDeploymentInfosCanBeStartedBy(long userId,
SearchOptions searchOptions)
Searches for the number and the list of processes that the user can start.
|
SearchResult<ProcessDeploymentInfo> |
searchProcessDeploymentInfosCanBeStartedByUsersManagedBy(long managerUserId,
SearchOptions searchOptions)
TODO do not understand the behavior of this
Search for all process definitions that can be started by users managed by a specific user.
|
SearchResult<ProcessDeploymentInfo> |
searchProcessDeploymentInfosStartedBy(long userId,
SearchOptions searchOptions)
Searches for 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)
Deprecated.
6.3.3
|
SearchResult<ProcessSupervisor> |
searchProcessSupervisors(SearchOptions searchOptions)
Searches for the number and the list of processes supervisors.
|
SearchResult<ProcessDeploymentInfo> |
searchUncategorizedProcessDeploymentInfos(SearchOptions searchOptions)
Searches for the number and the list of uncategorized processes.
|
SearchResult<ProcessDeploymentInfo> |
searchUncategorizedProcessDeploymentInfosCanBeStartedBy(long userId,
SearchOptions searchOptions)
Searches the number and the list of processes that the user can start which have no category.
|
SearchResult<ProcessDeploymentInfo> |
searchUncategorizedProcessDeploymentInfosSupervisedBy(long userId,
SearchOptions searchOptions)
Searches for the number and the list of uncategorized processes supervised by the user.
|
SearchResult<ProcessDeploymentInfo> |
searchUncategorizedProcessDeploymentInfosUserCanStart(long userId,
SearchOptions searchOptions)
Deprecated.
|
SearchResult<User> |
searchUsersWhoCanStartProcessDefinition(long processDefinitionId,
SearchOptions searchOptions)
Searches for 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 processDefinitionId,
ProcessDeploymentInfoUpdater processDeploymentInfoUpdater)
Updates the process deployment information for a specified process.
|
ProcessDefinition deploy(BusinessArchive businessArchive) throws AlreadyExistsException, ProcessDeployException
BusinessArchive
which contains a DesignProcessDefinition
and its dependencies.businessArchive
- The archive to deploy.AlreadyExistsException
- If a process with same name and version is already deployed.ProcessDeployException
- If an exception occurs when deploying the archive.BusinessArchive
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 is already deployed.ProcessDeployException
- If an exception occurs when deploying the process.deploy(BusinessArchive)
void enableProcess(long processDefinitionId) throws ProcessDefinitionNotFoundException, ProcessEnablementException
processDefinitionId
- 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 processDefinitionId) throws ProcessDefinitionNotFoundException, ProcessActivationException
processDefinitionId
- 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 processDefinitionId) throws ProcessDefinitionNotFoundException
processDefinitionId
- 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.@Deprecated void deleteProcess(long processDefinitionId) throws DeletionException
deleteProcessDefinition(long)
processDefinitionId
- The identifier of the process definition.DeletionException
- If an exception occurs during process deletion.ProcessInstanceHierarchicalDeletionException
- If a process instance cannot be deleted because of a parent that is still activedeleteProcessDefinition(long)
@Deprecated void deleteProcesses(List<Long> processDefinitionIds) throws DeletionException
deleteProcessDefinitions(List)
processDefinitionIds
- The list of identifiers of process definitions.DeletionException
- If an exception occurs during process deletion.ProcessInstanceHierarchicalDeletionException
- If a process instance cannot be deleted because of a parent that is still activedeleteProcessDefinitions(List)
void deleteProcessDefinition(long processDefinitionId) throws DeletionException
processDefinitionId
- The identifier of the process definition.DeletionException
- If an exception occurs during process deletion.void deleteProcessDefinitions(List<Long> processDefinitionIds) throws DeletionException
processDefinitionIds
- The list of identifiers of process definitions.DeletionException
- If an exception occurs during process deletion.deleteProcess(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
- If a process cannot be enabled.InvalidProcessDefinitionException
- If the designProcessDefinition is invalid.ProcessDeployException
- If an exception occurs when deploying the process.deploy(DesignProcessDefinition)
,
enableProcess(long)
ProcessDefinition deployAndEnableProcess(BusinessArchive businessArchive) throws ProcessDeployException, ProcessEnablementException, AlreadyExistsException
BusinessArchive
.businessArchive
- The archive ready to deploy.ProcessDeployException
- If an exception occurs when deploying the archive.AlreadyExistsException
- If a process with same name and same version already exists.ProcessEnablementException
- If a process cannot be enabled.List<Problem> getProcessResolutionProblems(long processDefinitionId) throws ProcessDefinitionNotFoundException
processDefinitionId
- 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.@Deprecated void disableAndDelete(long processDefinitionId) throws ProcessDefinitionNotFoundException, ProcessActivationException, DeletionException
disableAndDeleteProcessDefinition(long)
processDefinitionId
- The process definition identifier.ProcessDefinitionNotFoundException
- If the identifier does not refer to an existing process definition.ProcessActivationException
- If an exception occurs while disabling the process.DeletionException
- If an exception occurs while deleting the process.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
processDefinitionId
- 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 processDefinitionId, ProcessDeploymentInfoUpdater processDeploymentInfoUpdater) throws ProcessDefinitionNotFoundException, UpdateException
processDefinitionId
- 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 the first result (starting from 0).maxResults
- The maximum number of process deployment information results per page.sortCriterion
- The sorting criterion.RetrieveException
- If an exception occurs when getting the process deployment informations.int getNumberOfActors(long processDefinitionId) throws ProcessDefinitionNotFoundException
processDefinitionId
- 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 processDefinitionId, int startIndex, int maxResults, ActorCriterion sort)
processDefinitionId
- The process definition identifier.startIndex
- The index of the first result (starting from 0).maxResults
- The maximum number of actors per page.sort
- The sorting criterion.List<ActorMember> getActorMembers(long actorId, int startIndex, int maxResults)
actorId
- The identifier of the actor.startIndex
- The index of the first result (starting from 0).maxResults
- The maximum number of actor members per page.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
- If the association already exists.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
- If the association already exists.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 processDefinitionId, String xmlContent) throws ActorMappingImportException
processDefinitionId
- The identifier of the process.xmlContent
- The XML content of the mapping. If null, nothing is performed.ActorMappingImportException
- If an exception occurs when importing the actor mapping.void importActorMapping(long processDefinitionId, byte[] actorMappingXML) throws ActorMappingImportException
processDefinitionId
- The identifier of the process.actorMappingXML
- The XML content of the mapping as a byte array. If null, nothing is performed.ActorMappingImportException
- If an exception occurs when importing the actor mapping.String exportActorMapping(long processDefinitionId) throws ActorMappingExportException
processDefinitionId
- 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 the first result (starting from 0).maxResults
- The maximum 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 processDefinitionId) throws AlreadyExistsException, CreationException
categoryId
- The identifier of the category.processDefinitionId
- The identifier of the process definition.AlreadyExistsException
- If the association category/process already exists.CreationException
- If an exception occurs while adding the process to the category.void addProcessDefinitionsToCategory(long categoryId, List<Long> processDefinitionIds) throws AlreadyExistsException, CreationException
categoryId
- The identifier of the category.processDefinitionIds
- The identifiers of the process definitions.AlreadyExistsException
- If an association category/process already exists.CreationException
- If an exception occurs while adding the process to the category.long getNumberOfCategories(long processDefinitionId)
processDefinitionId
- 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 the first result (starting from 0).maxResults
- The maximum number of process deployment information.sort
- The sorting criterion.List<Category> getCategoriesOfProcessDefinition(long processDefinitionId, int startIndex, int maxResults, CategoryCriterion sort)
processDefinitionId
- The identifier of the process definition.startIndex
- The index of the first result (starting from 0).maxResults
- The maximum number of categories.sort
- The sorting criterion.void updateCategory(long categoryId, CategoryUpdater updater) throws CategoryNotFoundException, UpdateException
categoryId
- The identifier of the category.updater
- The role updater.CategoryNotFoundException
- If the category identifier does not refer to an existing category.UpdateException
- If an exception occurs during the category update.void deleteCategory(long categoryId) throws DeletionException
categoryId
- The identifier of the category.DeletionException
- If an exception occurs when deleting the category.@Deprecated void removeAllProcessDefinitionsFromCategory(long categoryId) throws DeletionException
removeProcessDefinitionsFromCategory(long, int, int)
categoryId
- The identifier of the category.DeletionException
- If an error occurs while removing the process definitions of category.long removeProcessDefinitionsFromCategory(long categoryId, int startIndex, int maxResults) throws DeletionException
categoryId
- The identifier of the category.startIndex
- The indexmaxResults
- The max number of elements to retrieve per pageDeletionException
- If an error occurs while removing the process definitions of category.@Deprecated void removeAllCategoriesFromProcessDefinition(long processDefinitionId) throws DeletionException
removeCategoriesFromProcessDefinition(long, int, int)
processDefinitionId
- The identifier of the process definition.DeletionException
- If an error occurs while removing the process definition from category.long removeCategoriesFromProcessDefinition(long processDefinitionId, int startIndex, int maxResults) throws DeletionException
processDefinitionId
- The identifier of the process definition.startIndex
- The indexmaxResults
- The max number of elements to retrieve per pageDeletionException
- If an error occurs while removing the process definition from category.long 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 processDefinitionId, String activityName, int startIndex, int maxResults) throws ProcessDefinitionNotFoundException, ActivityDefinitionNotFoundException
processDefinitionId
- The identifier of the process definition.activityName
- The name of the activity.startIndex
- The index of the first result (starting from 0).maxResults
- The maximum 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 processDefinitionId, String activityName) throws ProcessDefinitionNotFoundException, ActivityDefinitionNotFoundException
processDefinitionId
- 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 processDefinitionId, int startIndex, int maxResults) throws ProcessDefinitionNotFoundException
processDefinitionId
- The identifier of the process definition.startIndex
- The index of the first result (starting from 0).maxResults
- The maximum number of data definitions.ProcessDefinitionNotFoundException
- If the identifier does not refer to an existing process definition.int getNumberOfProcessDataDefinitions(long processDefinitionId) throws ProcessDefinitionNotFoundException
processDefinitionId
- The identifier of the process definition.ProcessDefinitionNotFoundException
- If the identifier does not refer to an existing process definition.Map<String,byte[]> getProcessResources(long processDefinitionId, String filenamesPattern) throws RetrieveException
processAPI.getProcessResources(processDefinitionId, "resources/folder/image.jpg");to retrieve a map with one entry: the key is the path of the resource, the value is the binary content of the resource.
eg. processAPI().getProcessResources(processDefinitionId, ".*/.\*\.txt")would retrieve all .txt files in a first-level subfolder. The key in the map is the path for each matching resource.
processDefinitionId
- 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 name and version do 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 the first result (starting from 0).maxResults
- The maximum number of process deployment informations.sortingCriterion
- The sort criterionboolean isAllowedToStartProcess(long processDefinitionId, Set<Long> actorIds)
processDefinitionId
- The identifier of the process definition.actorIds
- The identifiers of the actors.ActorInstance getActorInitiator(long processDefinitionId) throws ActorNotFoundException, ProcessDefinitionNotFoundException
processDefinitionId
- 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.@Deprecated 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.ProcessManagementAPI#searchProcessDeploymentInfosCanBeStartedBy(long, SearchOptions)}
SearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfosCanBeStartedBy(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 ProcessDeploymentInfo.SearchException
- If an exception occurs when getting the processes.void addCategoriesToProcess(long processDefinitionId, List<Long> categoryIds) throws AlreadyExistsException, CreationException
processDefinitionId
- 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 processDefinitionId, List<Long> categoryIds) throws DeletionException
processDefinitionId
- 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
- If an exception occurs when searching the process deployment information.@Deprecated SearchResult<ProcessDeploymentInfo> searchUncategorizedProcessDeploymentInfosUserCanStart(long userId, SearchOptions searchOptions) throws SearchException
SearchException
SearchResult<ProcessDeploymentInfo> searchUncategorizedProcessDeploymentInfosCanBeStartedBy(long userId, SearchOptions searchOptions) throws SearchException
userId
- The identifier of the user.searchOptions
- The search criteria.SearchException
- If an exception occurs when searching the process deployment information.Map<Long,ProcessDeploymentInfo> getProcessDeploymentInfosFromIds(List<Long> processDefinitionIds)
processDefinitionIds
- The identifiers of the process definitions.ConnectorImplementationDescriptor getConnectorImplementation(long processDefinitionId, String connectorName, String connectorVersion) throws ConnectorNotFoundException
processDefinitionId
- 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 the first result (starting from 0).maxsResults
- The maximum number of connector implementations.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 the first result (starting from 0).maxResults
- The maximum number of processes.sortingCriterion
- 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 the first result (starting from 0).maxResults
- The maximum number of processes.sortingCriterion
- The sort criterion.List<ProcessDeploymentInfo> getProcessDeploymentInfosWithActorOnlyForRole(long roleId, int startIndex, int maxResults, ProcessDeploymentInfoCriterion sortingCriterion)
roleId
- The identifier of the role.startIndex
- The index of the first result (starting from 0).maxResults
- The maximum number of processes.sortingCriterion
- 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 the first result (starting from 0).maxResults
- The maximum number of processes.sortingCriterion
- The sort criterion.List<ProcessDeploymentInfo> getProcessDeploymentInfosWithActorOnlyForUser(long userId, int startIndex, int maxResults, ProcessDeploymentInfoCriterion sortingCriterion)
userId
- The identifier of the user.startIndex
- The index of the first result (starting from 0).maxResults
- The maximum number of processes.sortingCriterion
- The sort criterion.getProcessDeploymentInfosWithActorOnlyForUsers(List, int, int, ProcessDeploymentInfoCriterion)
List<ProcessDeploymentInfo> getProcessDeploymentInfosWithActorOnlyForUsers(List<Long> userIds, int startIndex, int maxResults, ProcessDeploymentInfoCriterion sortingCriterion)
userIds
- The identifiers of the users.startIndex
- The index of the first result (starting from 0).maxResults
- The maximum number of processes.sortingCriterion
- The sort criterion.getProcessDeploymentInfosWithActorOnlyForUser(long, int, int, ProcessDeploymentInfoCriterion)
DesignProcessDefinition getDesignProcessDefinition(long processDefinitionId) throws ProcessDefinitionNotFoundException
processDefinitionId
- Identifier of process definitionProcessDefinitionNotFoundException
- If the process definition doesn't exist.SearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfosSupervisedBy(long userId, SearchOptions searchOptions) throws SearchException
userId
- The identifier of the user.searchOptions
- The search criterion.SearchException
- If an exception occurs when getting the process deployment information.@Deprecated SearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfosUsersManagedByCanStart(long managerUserId, SearchOptions searchOptions) throws SearchException
managerUserId
- The identifier of the manager.searchOptions
- The search crtierion.SearchException
- If an exception occurs when getting the process deployment information.ProcessManagementAPI#searchProcessDeploymentInfosCanBeStartedByUsersManagedBy(long, SearchOptions)}
SearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfosCanBeStartedByUsersManagedBy(long managerUserId, SearchOptions searchOptions) throws SearchException
managerUserId
- The identifier of the manager.searchOptions
- The search criterion.SearchException
- If an exception occurs when getting the process deployment information.ProcessSupervisor createProcessSupervisorForUser(long processDefinitionId, long userId) throws CreationException, AlreadyExistsException
processDefinitionId
- The identifier of the process definition.userId
- The identifier of the user.CreationException
- If an exception occurs when creating the process supervisor.AlreadyExistsException
- If the user is already the process supervisor.ProcessSupervisor createProcessSupervisorForRole(long processDefinitionId, long roleId) throws CreationException, AlreadyExistsException
processDefinitionId
- The identifier of the process definition.roleId
- The identifier of the role.CreationException
- If an exception occurs when creating the process supervisor.AlreadyExistsException
- If the provided role is already a supervisor for the provided process.ProcessSupervisor createProcessSupervisorForGroup(long processDefinitionId, long groupId) throws CreationException, AlreadyExistsException
processDefinitionId
- The identifier of the process definition.groupId
- The identifier of the group.CreationException
- If an exception occurs when creating the process supervisor.AlreadyExistsException
- If the provided group is already a supervisor for the provided process.ProcessSupervisor createProcessSupervisorForMembership(long processDefinitionId, long groupId, long roleId) throws CreationException, AlreadyExistsException
processDefinitionId
- 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
- If the provided membership (group + role) is already a supervisor for the provided process.boolean isUserProcessSupervisor(long processDefinitionId, long userId)
processDefinitionId
- 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 processDefinitionId, Long userId, Long roleId, Long groupId) throws DeletionException
ProcessSupervisor
object that is identified by this processDefinitionId, 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
processDefinitionId
- The Identifier of the process definition to delete the supervisor for.userId
- The Id of the user used as a supervisor for the given process. Can be null.roleId
- The Id of the role used as a supervisor for the given process. Can be null.groupId
- The Id of the group used as a supervisor for the given process. Can be null.DeletionException
- If a problem occurs while deleting the supervisor for the given process.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 processDefinitionId, int startIndex, int maxResults, CategoryCriterion sortingCriterion)
processDefinitionId
- The identifier of the process definition.startIndex
- The number of the page (the first page number is 0).maxResults
- The maximum 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
processDefinitionId
- 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
- If an export problem occursvoid disableAndDeleteProcessDefinition(long processDefinitionId) throws ProcessDefinitionNotFoundException, ProcessActivationException, DeletionException
processDefinitionId
- The process definition identifier.ProcessDefinitionNotFoundException
- If the identifier does not refer to an existing process definition.ProcessActivationException
- If an exception occurs while disabling the process.DeletionException
- If an exception occurs while deleting the process.disableProcess(long)
,
deleteProcess(long)
List<User> getPossibleUsersOfHumanTask(long processDefinitionId, String humanTaskName, int startIndex, int maxResults)
processDefinitionId
- The identifier of process definitionhumanTaskName
- The name of the human taskstartIndex
- The start indexmaxResults
- The list of usersInvalidSessionException
- If the session is invalid (expired, unknown, ...)RetrieveException
- If an exception occurs while retrieving the usersList<Long> getUserIdsForActor(long processDefinitionId, String actorName, int startIndex, int maxResults)
processDefinitionId
- The process definition identifieractorName
- The actor namestartIndex
- The start index (the first valid value is zero)maxResults
- max number of user identifiers to be retrievedCopyright © 2014 Bonitasoft S.A.. All rights reserved.