public interface ProcessManagementAPI extends ProcessManagementAPI
ProcessManagementAPI
extends ProcessManagementAPI
and adds capabilities on Parameter
s, activity
replay, connector implementation hot-replace.Modifier and Type | Method and Description |
---|---|
List<ConnectorInstance> |
getConnectorInstancesOfActivity(long activityInstanceId,
int startIndex,
int maxResults,
ConnectorInstanceCriterion sortingCriterion)
Retrieve the list of connector instances on an activity instance
|
List<ConnectorInstance> |
getConnectorInstancesOfProcess(long processInstanceId,
int startIndex,
int maxResults,
ConnectorInstanceCriterion sortingCriterion)
Retrieve the list of connector instances on a process instance
|
long |
getNumberOfProcessSupervisorsForGroup(long processDefinitionId)
Get the number of processes supervisors mapped to a group on a specific process definition.
|
long |
getNumberOfProcessSupervisorsForMembership(long processDefinitionId)
Get the number of processes supervisors mapped to a membership on a specific process definition.
|
long |
getNumberOfProcessSupervisorsForRole(long processDefinitionId)
Get the number of processes supervisors mapped to a role on a specific process definition.
|
long |
getNumberOfProcessSupervisorsForUser(long processDefinitionId)
Get the number of processes supervisors mapped to a user on a specific process definition.
|
ParameterInstance |
getParameterInstance(long processDefinitionId,
String parameterName)
Deprecated.
|
List<ParameterInstance> |
getParameterInstances(long processDefinitionId,
int startIndex,
int maxResults,
ParameterCriterion sort)
|
void |
importParameters(long processDefinitionId,
byte[] parameters)
Imports the parameters of the process definition.
|
void |
replayActivity(long activityInstanceId)
Set state of
FlowNodeInstance to its previous state and then execute it. |
void |
replayActivity(long activityInstanceId,
Map<Long,ConnectorStateReset> connectorsToReset)
Set state of
FlowNodeInstance to its previous state and then execute it. |
void |
setConnectorImplementation(long processDefinitionId,
String connectorName,
String connectorVersion,
byte[] connectorImplementationArchive)
Updates the implementation version of the connector of the process definition.
|
void |
setConnectorInstanceState(long connectorInstanceId,
ConnectorStateReset state)
Allows to reset the state of an instance of connector
|
void |
setConnectorInstanceState(Map<Long,ConnectorStateReset> connectorsToReset)
Allows to reset connector instance states for a Collection of connector instances at once.
|
void |
updateExpressionContent(long processDefintionId,
long expressionDefinitionId,
String content)
Updates an expression content at runtime, for all instances of a given process definition.
|
FormMapping |
updateFormMapping(long formMappingId,
String url,
Long pageId)
Update a form mapping with the given values
|
void |
updateParameterInstanceValue(long processDefinitionId,
String parameterName,
String parameterValue)
Update an existing parameter of a process definition.
|
addCategoriesToProcess, addGroupToActor, addGroupToActor, addProcessDefinitionsToCategory, addProcessDefinitionToCategory, addRoleAndGroupToActor, addRoleAndGroupToActor, addRoleToActor, addRoleToActor, addUserToActor, addUserToActor, createCategory, createProcessSupervisorForGroup, createProcessSupervisorForMembership, createProcessSupervisorForRole, createProcessSupervisorForUser, deleteCategory, deleteProcessDefinition, deleteProcessDefinitions, deleteSupervisor, deleteSupervisor, deploy, deploy, deployAndEnableProcess, deployAndEnableProcess, disableAndDeleteProcessDefinition, disableProcess, enableProcess, exportActorMapping, exportBarProcessContentUnderHome, getActivityDataDefinitions, getActor, getActorInitiator, getActorMembers, getActors, getActorsFromActorIds, getCategories, getCategoriesOfProcessDefinition, getCategoriesUnrelatedToProcessDefinition, getCategory, getConnectorImplementation, getConnectorImplementations, getDesignProcessDefinition, getFormMapping, getLatestProcessDefinitionId, getNumberOfActivityDataDefinitions, getNumberOfActorMembers, getNumberOfActors, getNumberOfCategories, getNumberOfCategories, getNumberOfConnectorImplementations, getNumberOfGroupsOfActor, getNumberOfMembershipsOfActor, getNumberOfParameterInstances, getNumberOfProcessDataDefinitions, getNumberOfProcessDefinitionsOfCategory, getNumberOfProcessDeploymentInfos, getNumberOfProcessDeploymentInfosUnrelatedToCategory, getNumberOfRolesOfActor, getNumberOfUncategorizedProcessDefinitions, getNumberOfUsersOfActor, getParameterInstances, getPossibleUsersOfHumanTask, getProcessDataDefinitions, getProcessDefinition, getProcessDefinitionId, getProcessDeploymentInfo, getProcessDeploymentInfos, getProcessDeploymentInfosFromArchivedProcessInstanceIds, getProcessDeploymentInfosFromIds, getProcessDeploymentInfosFromProcessInstanceIds, getProcessDeploymentInfosOfCategory, getProcessDeploymentInfosUnrelatedToCategory, getProcessDeploymentInfosWithActorOnlyForGroup, getProcessDeploymentInfosWithActorOnlyForGroups, getProcessDeploymentInfosWithActorOnlyForRole, getProcessDeploymentInfosWithActorOnlyForRoles, getProcessDeploymentInfosWithActorOnlyForUser, getProcessDeploymentInfosWithActorOnlyForUsers, getProcessResolutionProblems, getProcessResources, getStartableProcessDeploymentInfosForActors, getSupportedStates, getUncategorizedProcessDeploymentInfos, getUserIdsForActor, importActorMapping, importActorMapping, isAllowedToStartProcess, isUserProcessSupervisor, purgeClassLoader, removeActorMember, removeCategoriesFromProcess, removeCategoriesFromProcessDefinition, removeProcessDefinitionsFromCategory, searchFormMappings, searchProcessDeploymentInfos, searchProcessDeploymentInfosCanBeStartedBy, searchProcessDeploymentInfosCanBeStartedByUsersManagedBy, searchProcessDeploymentInfosStartedBy, searchProcessDeploymentInfosSupervisedBy, searchProcessSupervisors, searchUncategorizedProcessDeploymentInfos, searchUncategorizedProcessDeploymentInfosCanBeStartedBy, searchUncategorizedProcessDeploymentInfosSupervisedBy, searchUsersWhoCanStartProcessDefinition, updateActor, updateCategory, updateProcessDeploymentInfo
@Deprecated ParameterInstance getParameterInstance(long processDefinitionId, String parameterName) throws ParameterNotFoundException
ProcessManagementAPI.getParameterInstance(long, String)
getParameterInstance
in interface ProcessManagementAPI
processDefinitionId
- The identifier of the processDefinitionparameterName
- The parameter name for get ParameterInstanceParameterNotFoundException
- Error thrown if the given parameter is not found.InvalidSessionException
- Generic exception thrown if API Session is invalid, e.g session has expired.@Deprecated List<ParameterInstance> getParameterInstances(long processDefinitionId, int startIndex, int maxResults, ParameterCriterion sort)
ProcessManagementAPI.getParameterInstances(long, int, int, org.bonitasoft.engine.bpm.parameter.ParameterCriterion)
processDefinitionId
- The identifier of the processDefinitionstartIndex
- The index of the page to be returned. First page has index 0.maxResults
- The number of result per page. Maximum number of result returned.sort
- The criterion to sort the resultInvalidSessionException
- Generic exception thrown if API Session is invalid, e.g session has expired.void updateParameterInstanceValue(long processDefinitionId, String parameterName, String parameterValue) throws ParameterNotFoundException, UpdateException
processDefinitionId
- The identifier of the processDefinitionparameterName
- The parameter nameparameterValue
- The new value of the parameterParameterNotFoundException
- Error thrown if the given parameter is not found.UpdateException
- If the update cannot be fullfilled.InvalidSessionException
- Generic exception thrown if API Session is invalid, e.g session has expired.void importParameters(long processDefinitionId, byte[] parameters) throws ImportParameterException
processDefinitionId
- The identifier of the process definitionparameters
- The content of the properties file as a byte array. If null or empty byte[], nothing is done, and the process does not reset to unresolved but
stays the same.ImportParameterException
- If an exception occurs while importing the parametersInvalidSessionException
- If the session is invalid (expired, unknown, ...)List<ConnectorInstance> getConnectorInstancesOfActivity(long activityInstanceId, int startIndex, int maxResults, ConnectorInstanceCriterion sortingCriterion)
activityInstanceId
- The identifier of the element on which we want the connector instancesstartIndex
- The index of the page to be returned. First page has index 0.maxResults
- The number of result per page. Maximum number of result returned.sortingCriterion
- The criterion to sort the resultList<ConnectorInstance> getConnectorInstancesOfProcess(long processInstanceId, int startIndex, int maxResults, ConnectorInstanceCriterion sortingCriterion)
processInstanceId
- The identifier of the element on which we want the connector instancesstartIndex
- The index of the page to be returned. First page has index 0.maxResults
- The number of result per page. Maximum number of result returned.sortingCriterion
- The criterion to sort the resultvoid setConnectorInstanceState(long connectorInstanceId, ConnectorStateReset state) throws UpdateException, ConnectorInstanceNotFoundException
connectorInstanceId
- The identifier of the connector to changestate
- The state to set on the connectorUpdateException
- If the set operation cannot be fullfilled.ConnectorInstanceNotFoundException
- If the connector instance cannot be found with the provided connectorInstanceIdInvalidSessionException
- If no current valid engine session is foundvoid setConnectorInstanceState(Map<Long,ConnectorStateReset> connectorsToReset) throws ConnectorInstanceNotFoundException, UpdateException
connectorsToReset
- A Map containing, as key, the connector instance id, and as value, the ConnectorStateReset
value to reset the connector instance
to.ConnectorInstanceNotFoundException
- If the connector instance cannot be found with the provided connectorInstanceIdUpdateException
- If the set operation cannot be fullfilled.InvalidSessionException
- If no current valid engine session is foundvoid setConnectorImplementation(long processDefinitionId, String connectorName, String connectorVersion, byte[] connectorImplementationArchive) throws InvalidConnectorImplementationException, UpdateException
processDefinitionId
- The identifier of the process definition.connectorName
- The name of the connector.connectorVersion
- The version of the connector.connectorImplementationArchive
- The zipped .impl file contented as a byte array. The file is exported from studio.InvalidConnectorImplementationException
- If the implementation is not valid. (e.g. wrong format)UpdateException
- If the set operation cannot be fullfilled.InvalidSessionException
- If the session is invalid, e.g. the session has expired.void replayActivity(long activityInstanceId, Map<Long,ConnectorStateReset> connectorsToReset) throws ActivityInstanceNotFoundException, ActivityExecutionException
FlowNodeInstance
to its previous state and then execute it. Pre-condition: the
FlowNodeInstance
must be in the FAILED state.
Failed ConnectorInstance
s can be re-executed or skipped. If you want to re-execute all failed connectors
you can use directly the method ProcessRuntimeAPI.retryTask(long)
that is equivalent of calling the current method with
ConnectorStateReset.TO_RE_EXECUTE
for all failed connectors.
activityInstanceId
- The identifier of the FlowNodeInstance
connectorsToReset
- The map of connectors to be reset before retrying the task. The key represents the ConnectorInstance
identifier and the value
represents new ConnectorStateReset
.ActivityInstanceNotFoundException
- If no FlowNodeInstance
can be found with the provided activityInstanceIdActivityExecutionException
- If the FlowNodeInstance
failed to replay.InvalidSessionException
- when API Session is invalid, e.g session has expired.ProcessRuntimeAPI.retryTask(long)
,
ConnectorStateReset
,
FlowNodeInstance
void replayActivity(long activityInstanceId) throws ActivityInstanceNotFoundException, ActivityExecutionException
FlowNodeInstance
to its previous state and then execute it. Pre-condition: the
FlowNodeInstance
must be in the FAILED state. The FlowNodeInstance
can be replayed if no
ConnectorInstance
is in the failed state. If that is the case, use the method
ProcessRuntimeAPI.retryTask(long)
that will automatically re-execute failed
connectors or the method replayActivity(long, java.util.Map)
that allows to re-execute or skip failed connectors.activityInstanceId
- The identifier of the FlowNodeInstance
ActivityInstanceNotFoundException
- If no FlowNodeInstance
can be found with the provided activityInstanceIdActivityExecutionException
- If the FlowNodeInstance
failed to replay.InvalidSessionException
- when API Session is invalid, e.g session has expired.ProcessRuntimeAPI.retryTask(long)
,
replayActivity(long, java.util.Map)
,
ConnectorInstance
long getNumberOfProcessSupervisorsForUser(long processDefinitionId)
processDefinitionId
- the id of the process definitionlong getNumberOfProcessSupervisorsForGroup(long processDefinitionId)
processDefinitionId
- the id of the process definitionlong getNumberOfProcessSupervisorsForRole(long processDefinitionId)
processDefinitionId
- the id of the process definitionlong getNumberOfProcessSupervisorsForMembership(long processDefinitionId)
processDefinitionId
- the id of the process definitionFormMapping updateFormMapping(long formMappingId, String url, Long pageId) throws FormMappingNotFoundException, UpdateException
formMappingId
- the form mapping to updateurl
- the name of the form or the url to the formpageId
- FormMappingNotFoundException
- when the formMappingId is not an existing form mappingUpdateException
- when there is an issue when updating the form mappingvoid updateExpressionContent(long processDefintionId, long expressionDefinitionId, String content) throws ProcessDefinitionNotFoundException, UpdateException
processDefintionId
- the ID of the process on which to change the expression contentexpressionDefinitionId
- the ID of the expression to updatecontent
- the new content of the expressionProcessDefinitionNotFoundException
- if the process or the expression is not found for the given IDs.UpdateException
- if a problem occurs during updating, or if the expression type does not support update. Only scripts and constant expression
content can be updated.Copyright © 2016 Bonitasoft S.A.. All rights reserved.