public interface ProcessRuntimeAPI
ProcessRuntimeAPI
deals with Process runtime notions such as starting a new instance of a process, retrieving and executing tasks, accessing to
all types of tasks, assigning a user to a task, retrieving archived versions of a task, accessing / updating data / variable values, adding / retrieving
process comments ...
It generally allows all BPM runtime actions, that is, once process instances are running of finished executing.Modifier and Type | Method and Description |
---|---|
Comment |
addComment(long processInstanceId,
String comment)
Deprecated.
use
addProcessComment(long, String) instead, that can throw CreationException is case of inexistant Process Instance |
Comment |
addProcessComment(long processInstanceId,
String comment)
Add a comment on a process instance.
|
void |
assignUserTask(long userTaskId,
long userId)
Assign a task to a user with given user identifier.
|
void |
cancelProcessInstance(long processInstanceId)
Cancels the process instance and all of its active flownodes.
|
boolean |
canExecuteTask(long activityInstanceId,
long userId)
Check whether a specified task can be executed by a given user.
|
long |
countAttachments(SearchOptions searchOptions)
Get the number of attachments matching the search conditions.
|
long |
countComments(SearchOptions searchOptions)
Get the number of comments matching the search conditions.
|
long |
deleteArchivedProcessInstances(long processDefinitionId,
int startIndex,
int maxResults)
Delete archived process instances of process definition given as input parameter respecting the pagination parameters.
|
void |
deleteProcessInstance(long processInstanceId)
Delete the specified process instance.
|
void |
deleteProcessInstances(long processDefinitionId)
Deprecated.
As of release 6.1, replaced by
deleteProcessInstances(long, int, int) and deleteArchivedProcessInstances(long, int, int) .
As these new methods are paginated, to delete ALL archived and non-archived process instances, use some code like:
long nbDeleted = 0; processAPI.disableProcess(processDefinitionId); do { nbDeleted = processAPI.deleteProcessInstances(processDefinitionId, 0, 100); } while (nbDeleted > 0); do { nbDeleted = processAPI.deleteArchivedProcessInstances(processDefinitionId, 0, 100); } while (nbDeleted > 0); |
long |
deleteProcessInstances(long processDefinitionId,
int startIndex,
int maxResults)
Delete active process instances, and their elements, of process definition given as input parameter respecting the pagination parameters.
|
Map<String,Serializable> |
evaluateExpressionOnCompletedProcessInstance(long processInstanceId,
Map<Expression,Map<String,Serializable>> expressions)
Evaluate expressions with values valid on a completed process instance scope.
|
Serializable |
evaluateExpressionOnProcessDefinition(Expression expression,
Map<String,Serializable> context,
long processDefinitionId)
Evaluate an expression in the context of the specified process.
|
Map<String,Serializable> |
evaluateExpressionsAtProcessInstanciation(long processInstanceId,
Map<Expression,Map<String,Serializable>> expressions)
Evaluate expressions with values valid at process instantiation scope.
|
Map<String,Serializable> |
evaluateExpressionsOnActivityInstance(long activityInstanceId,
Map<Expression,Map<String,Serializable>> expressions)
Evaluate expressions with values valid on an activity instance scope.
|
Map<String,Serializable> |
evaluateExpressionsOnCompletedActivityInstance(long activityInstanceId,
Map<Expression,Map<String,Serializable>> expressions)
Evaluate expressions with values valid on a completed activity instance scope.
|
Map<String,Serializable> |
evaluateExpressionsOnProcessDefinition(long processDefinitionId,
Map<Expression,Map<String,Serializable>> expressions)
Evaluate expressions with values valid on a process definition scope.
|
Map<String,Serializable> |
evaluateExpressionsOnProcessInstance(long processInstanceId,
Map<Expression,Map<String,Serializable>> expressions)
Evaluate expressions with values valid on a process instance scope.
|
Map<String,Serializable> |
executeConnectorOnProcessDefinition(String connectorDefinitionId,
String connectorDefinitionVersion,
Map<String,Expression> connectorInputParameters,
Map<String,Map<String,Serializable>> inputValues,
List<Operation> operations,
Map<String,Serializable> operationInputValues,
long processDefinitionId)
Execute a connector in a specified processDefinition with operations.
|
Map<String,Serializable> |
executeConnectorOnProcessDefinition(String connectorDefinitionId,
String connectorDefinitionVersion,
Map<String,Expression> connectorInputParameters,
Map<String,Map<String,Serializable>> inputValues,
long processDefinitionId)
Execute a connector in a specified processDefinition.
|
void |
executeFlowNode(long flownodeInstanceId)
Execute an activity that is in an unstable state.
|
void |
executeFlowNode(long userId,
long flownodeInstanceId)
Start an flow node that is is a non stable state on behalf of a given user
Will make the flow node go in the next stable state and then continue the execution of the process
If userId equals 0, the logged-in user is declared as the executer of the flow node.
|
List<ActivityInstance> |
getActivities(long processInstanceId,
int startIndex,
int maxResults)
Returns all activities (active and finished) of a process instance.
|
DataInstance |
getActivityDataInstance(String dataName,
long activityInstanceId)
Get a named data instance from a specified activity instance.
|
List<DataInstance> |
getActivityDataInstances(long activityInstanceId,
int startIndex,
int maxResults)
Get a list of the data instances from a specified activity instance.
|
ActivityInstance |
getActivityInstance(long activityInstanceId)
Get the specified activity instance.
|
String |
getActivityInstanceState(long activityInstanceId)
Get the state of a specified activity instance.
|
Date |
getActivityReachedStateDate(long activityInstanceId,
String state)
Get the date when the specified activity instance reached the given state.
|
ArchivedDataInstance |
getArchivedActivityDataInstance(String dataName,
long activityInstanceId)
Gets the last archived data instance of the named data of the specified activity instance.
|
List<ArchivedDataInstance> |
getArchivedActivityDataInstances(long activityInstanceId,
int startIndex,
int maxResults)
Lists the last archived instances of data of the specified activity instance.
|
ArchivedActivityInstance |
getArchivedActivityInstance(long activityInstanceId)
Get an activity instance that is archived.
|
List<ArchivedActivityInstance> |
getArchivedActivityInstances(long processInstanceId,
int startIndex,
int maxResults,
ActivityInstanceCriterion criterion)
Get a paged list of archived activity instances for a process instance.
|
ArchivedComment |
getArchivedComment(long archivedCommentId)
Retrieve an
ArchivedComment specified by its identifier. |
ArchivedFlowNodeInstance |
getArchivedFlowNodeInstance(long archivedFlowNodeInstanceId)
Retrieve an
ArchivedFlowNodeInstance specified by its identifier. |
ArchivedDataInstance |
getArchivedProcessDataInstance(String dataName,
long processInstanceId)
Gets the last archived data instance of the named data of the specified process instance.
|
List<ArchivedDataInstance> |
getArchivedProcessDataInstances(long processInstanceId,
int startIndex,
int maxResults)
Lists the last archived instances of data of the specified process instance.
|
ArchivedProcessInstance |
getArchivedProcessInstance(long archivedProcessInstanceId)
Retrieve an
ArchivedProcessInstance specified by its identifier. |
List<ArchivedProcessInstance> |
getArchivedProcessInstances(int startIndex,
int maxResults,
ProcessInstanceCriterion criterion)
Get a paged list of archived process instances.
|
List<ArchivedProcessInstance> |
getArchivedProcessInstances(long processInstanceId,
int startIndex,
int maxResults)
List the archived process instances for the specified process instance.
|
List<HumanTaskInstance> |
getAssignedHumanTaskInstances(long userId,
int startIndex,
int maxResults,
ActivityInstanceCriterion criterion)
Get the list of human task instances assigned to the specified user.
|
List<Long> |
getChildrenInstanceIdsOfProcessInstance(long processInstanceId,
int startIndex,
int maxResults,
ProcessInstanceCriterion criterion)
Get the children instances (sub process or call activity) of a process instance.
|
List<Comment> |
getComments(long processInstanceId)
Deprecated.
use paginated version
searchComments(SearchOptions) instead, passing a filter on processInstanceId field. |
List<EventInstance> |
getEventInstances(long rootContainerId,
int startIndex,
int maxResults,
EventCriterion sortingType)
Get a list of event instances related to a process instance that match the specified conditions.
|
List<FailedJob> |
getFailedJobs(int startIndex,
int maxResults)
Returns the list of jobs that failed.
|
ArchivedProcessInstance |
getFinalArchivedProcessInstance(long processInstanceId)
Get the last archived instance of a process instance.
|
FlowNodeInstance |
getFlowNodeInstance(long flowNodeInstanceId)
Get a specified flow node instance.
|
HumanTaskInstance |
getHumanTaskInstance(long activityInstanceId)
Retrieve a human task instance by the corresponding activity instance id.
|
List<HumanTaskInstance> |
getHumanTaskInstances(long processInstanceId,
String taskName,
int startIndex,
int maxResults)
List the named human tasks belonging to the specified process instance.
|
HumanTaskInstance |
getLastStateHumanTaskInstance(long processInstanceId,
String taskName)
Return the last created human task instance with the specified name for the given process instance.
|
long |
getNumberOfActivityDataInstances(long activityInstanceId)
Get the number of activity data instances by activity id.
|
long |
getNumberOfArchivedProcessInstances()
Get the number of archived process instances.
|
long |
getNumberOfAssignedHumanTaskInstances(long userId)
Count the total number of human task instances assigned to the specified user.
|
int |
getNumberOfOpenedActivityInstances(long processInstanceId)
Get the total number of open activity instances by process instance id.
|
Map<Long,Long> |
getNumberOfOpenTasks(List<Long> userIds)
For a specified list of users, get the number of pending tasks.
|
Map<Long,Long> |
getNumberOfOverdueOpenTasks(List<Long> userIds)
Get the number of assigned and pending overdue tasks for the specified users.
|
long |
getNumberOfPendingHumanTaskInstances(long userId)
Count the number of pending human task instances available to a specified user.
|
long |
getNumberOfProcessDataInstances(long processInstanceId)
Get the number of process data instances by process id.
|
long |
getNumberOfProcessInstances()
Get the number of open process instances.
|
long |
getOneAssignedUserTaskInstanceOfProcessDefinition(long processDefinitionId,
long userId)
Get an instance of a task asssigned to a given user for the specified process definition.
|
long |
getOneAssignedUserTaskInstanceOfProcessInstance(long processInstanceId,
long userId)
Get an instance of a task asssigned to a given user for the specified process instance.
|
List<ActivityInstance> |
getOpenActivityInstances(long processInstanceId,
int startIndex,
int maxResults,
ActivityInstanceCriterion criterion)
Retrieve a paged list of open activities for a given process instance.
|
List<HumanTaskInstance> |
getPendingHumanTaskInstances(long userId,
int startIndex,
int maxResults,
ActivityInstanceCriterion pagingCriterion)
Get the list of pending human task instances available to the specified user.
|
List<User> |
getPossibleUsersOfPendingHumanTask(long humanTaskInstanceId,
int startIndex,
int maxResults)
Lists the possible users (candidates) of the specified human task instance.
|
DataInstance |
getProcessDataInstance(String dataName,
long processInstanceId)
Get the value of named data item from a specified process instance.
|
List<DataInstance> |
getProcessDataInstances(long processInstanceId,
int startIndex,
int maxResults)
Returns all data of a process instance.
|
long |
getProcessDefinitionIdFromActivityInstanceId(long activityInstanceId)
Get the process definition id from an activity instance id.
|
long |
getProcessDefinitionIdFromProcessInstanceId(long processInstanceId)
Get the process definition id from an process instance id.
|
ProcessInstance |
getProcessInstance(long processInstanceId)
Get the specified process instance.
|
long |
getProcessInstanceIdFromActivityInstanceId(long activityInstanceId)
Get the process instance id from an activity instance id.
|
List<ProcessInstance> |
getProcessInstances(int startIndex,
int maxResults,
ProcessInstanceCriterion criterion)
Get a paged list of all process instances.
|
void |
hideTasks(long userId,
Long... activityInstanceId)
Hides a list of tasks from a specified user.
|
boolean |
isInvolvedInProcessInstance(long userId,
long processInstanceId)
Check whether a specified user is involved in a process instance.
|
boolean |
isTaskHidden(long userTaskId,
long userId)
Checks whether a specified task is hidden from a given user.
|
void |
releaseUserTask(long userTaskId)
Release a task (unclaim or unassign).
|
void |
replayFailedJob(long jobDescriptorId)
Replays the failed job in order to unlock it.
|
void |
replayFailedJob(long jobDescriptorId,
Map<String,Serializable> parameters)
Replays the failed job in order to unlock it.
|
void |
retryTask(long activityInstanceId)
Reset the state of a failed activity instance to its previous state and then execute it.
|
SearchResult<ActivityInstance> |
searchActivities(SearchOptions searchOptions)
Search for activity instances.
|
SearchResult<ArchivedActivityInstance> |
searchArchivedActivities(SearchOptions searchOptions)
Search for archived activity instances in terminal states.
|
SearchResult<ArchivedComment> |
searchArchivedComments(SearchOptions searchOptions)
Search for archived comments.
|
SearchResult<ArchivedConnectorInstance> |
searchArchivedConnectorInstances(SearchOptions searchOptions)
Search for archived connector instances.
|
SearchResult<ArchivedFlowNodeInstance> |
searchArchivedFlowNodeInstances(SearchOptions searchOptions)
Search for archived flow node instances (activities, gateways and events)
|
SearchResult<ArchivedHumanTaskInstance> |
searchArchivedHumanTasks(SearchOptions searchOptions)
Search the archived human tasks for tasks that match the search options.
|
SearchResult<ArchivedHumanTaskInstance> |
searchArchivedHumanTasksManagedBy(long managerUserId,
SearchOptions searchOptions)
Search for archived human tasks managed by the specified user.
|
SearchResult<ArchivedHumanTaskInstance> |
searchArchivedHumanTasksSupervisedBy(long supervisorId,
SearchOptions searchOptions)
Search for archived tasks assigned to users supervised by the specified user.
|
SearchResult<ArchivedProcessInstance> |
searchArchivedProcessInstances(SearchOptions searchOptions)
Search for archived process instances.
|
SearchResult<ArchivedProcessInstance> |
searchArchivedProcessInstancesInAllStates(SearchOptions searchOptions)
Search for archived process instances in all states (even intermediate states).
|
SearchResult<ArchivedProcessInstance> |
searchArchivedProcessInstancesInvolvingUser(long userId,
SearchOptions searchOptions)
Search for archived process instances that the specified user can access.
|
SearchResult<ArchivedProcessInstance> |
searchArchivedProcessInstancesSupervisedBy(long userId,
SearchOptions searchOptions)
Search for archived process instances supervised by the specified user.
|
SearchResult<HumanTaskInstance> |
searchAssignedTasksManagedBy(long managerUserId,
SearchOptions searchOptions)
Search the assigned human tasks for tasks that match the search options and are administered by the specified user.
|
SearchResult<HumanTaskInstance> |
searchAssignedTasksSupervisedBy(long supervisorId,
SearchOptions searchOptions)
Search for tasks assigned to users supervised by the specified user.
|
SearchResult<Comment> |
searchComments(SearchOptions searchOptions)
Search for comments related to the specified process instance.
|
SearchResult<Comment> |
searchCommentsInvolvingUser(long userId,
SearchOptions searchOptions)
Get the comments on process instances that the specified user can access.
|
SearchResult<Comment> |
searchCommentsManagedBy(long managerUserId,
SearchOptions searchOptions)
Get all the comments managed by the specified user.
|
SearchResult<ConnectorInstance> |
searchConnectorInstances(SearchOptions searchOptions)
Search for connector instances.
|
SearchResult<FlowNodeInstance> |
searchFlowNodeInstances(SearchOptions searchOptions)
Search for flow node instances (activities, gateways and events).
|
SearchResult<HumanTaskInstance> |
searchHumanTaskInstances(SearchOptions searchOptions)
Search for human task instances.
|
SearchResult<HumanTaskInstance> |
searchMyAvailableHumanTasks(long userId,
SearchOptions searchOptions)
Search for all tasks available to a specified user.
|
SearchResult<ProcessInstance> |
searchOpenProcessInstances(SearchOptions searchOptions)
List all open root process instances.
|
SearchResult<ProcessInstance> |
searchOpenProcessInstancesInvolvingUser(long userId,
SearchOptions searchOptions)
Search for open process instances that the specified user can access.
|
SearchResult<ProcessInstance> |
searchOpenProcessInstancesInvolvingUsersManagedBy(long managerUserId,
SearchOptions searchOptions)
Search for open process instances that all subordinates of the specified user can access.
|
SearchResult<ProcessInstance> |
searchOpenProcessInstancesSupervisedBy(long userId,
SearchOptions searchOptions)
List all open process instances supervised by a user.
|
SearchResult<HumanTaskInstance> |
searchPendingHiddenTasks(long userId,
SearchOptions searchOptions)
Search for pending hidden tasks that are available to the specified user.
|
SearchResult<HumanTaskInstance> |
searchPendingTasksForUser(long userId,
SearchOptions searchOptions)
Search the pending human tasks for tasks available to the specified user.
|
SearchResult<HumanTaskInstance> |
searchPendingTasksManagedBy(long managerUserId,
SearchOptions searchOptions)
Search the pending human tasks for tasks that match the search options and are managed by the specified user.
|
SearchResult<HumanTaskInstance> |
searchPendingTasksSupervisedBy(long userId,
SearchOptions searchOptions)
Search the pending human tasks for tasks that match the search options and are supervised by the specified user.
|
SearchResult<ProcessInstance> |
searchProcessInstances(SearchOptions searchOptions)
List all process instances.
|
void |
sendMessage(String messageName,
Expression targetProcess,
Expression targetFlowNode,
Map<Expression,Expression> messageContent)
Send a BPMN message event.
|
void |
sendMessage(String messageName,
Expression targetProcess,
Expression targetFlowNode,
Map<Expression,Expression> messageContent,
Map<Expression,Expression> correlations)
Send a BPMN message event, with message correlation.
|
void |
sendSignal(String signalName)
Send a BPMN signal event.
|
void |
setActivityStateById(long activityInstanceId,
int stateId)
Set the state of an activity instance.
|
void |
setActivityStateByName(long activityInstanceId,
String state)
Set the state of an activity instance.
|
void |
setProcessInstanceState(ProcessInstance processInstance,
String state)
Set a state of a process instance.
|
void |
setTaskPriority(long userTaskInstanceId,
TaskPriority priority)
Set the priority of a user task.
|
ProcessInstance |
startProcess(long processDefinitionId)
Start an instance of the process with the specified process definition, using the current session user.
|
ProcessInstance |
startProcess(long processDefinitionId,
List<Operation> operations,
Map<String,Serializable> context)
Start an instance of the process with the specified process definition id, and set the initial values of the data with the given operations.
|
ProcessInstance |
startProcess(long userId,
long processDefinitionId)
Start an instance of the process with the specified process definition id on behalf of a given user.
|
ProcessInstance |
startProcess(long userId,
long processDefinitionId,
List<Operation> operations,
Map<String,Serializable> context)
Start an instance of the process with the specified process definition id on behalf of a given user, and set the initial values of the data with the
given operations.
|
ProcessInstance |
startProcess(long processDefinitionId,
Map<String,Serializable> initialVariables)
Instantiates a process.
|
void |
unhideTasks(long userId,
Long... activityInstanceId)
Un-hides a list of tasks for a specified user.
|
void |
updateActivityDataInstance(String dataName,
long activityInstanceId,
Serializable dataValue)
Update the value of a named data instance in a specified activity instance.
|
void |
updateActivityInstanceVariables(List<Operation> operations,
long activityInstanceId,
Map<String,Serializable> expressionContexts)
Update the values of variables in an activity instance using expressions.
|
void |
updateActivityInstanceVariables(long activityInstanceId,
Map<String,Serializable> variables)
Update the given variables of an activity instance.
|
void |
updateActorsOfUserTask(long userTaskId)
Updates the actors of the user task.
|
void |
updateDueDateOfTask(long userTaskId,
Date dueDate)
Update the due date of a task.
|
void |
updateProcessDataInstance(String dataName,
long processInstanceId,
Serializable dataValue)
Update the value of a named data item in a specified process instance.
|
void |
updateProcessDataInstances(long processInstanceId,
Map<String,Serializable> dataNameValues)
Update the value of a named data item in a specified process instance.
|
SearchResult<HumanTaskInstance> searchPendingHiddenTasks(long userId, SearchOptions searchOptions) throws SearchException
userId
- The identifier of the user for whom to list the hidden tasks.searchOptions
- The search criterion.SearchException
- If an exception occurs when getting the list of tasks.SearchResult<ProcessInstance> searchOpenProcessInstances(SearchOptions searchOptions) throws SearchException
searchOptions
- The search criterion.SearchException
- If an exception occurs when getting the list of tasks.SearchResult<ProcessInstance> searchProcessInstances(SearchOptions searchOptions) throws SearchException
searchOptions
- The search criterion.SearchException
- If an exception occurs when getting the list of tasks.SearchResult<ProcessInstance> searchOpenProcessInstancesSupervisedBy(long userId, SearchOptions searchOptions) throws SearchException
userId
- The identifier of the user.searchOptions
- The search criterion.SearchException
- If an exception occurs when getting the list of process instances.long getNumberOfProcessDataInstances(long processInstanceId) throws ProcessInstanceNotFoundException
processInstanceId
- The identifier of the process instance.ProcessInstanceNotFoundException
- If the specified ProcessInstance does not refer to a process instance.long getNumberOfActivityDataInstances(long activityInstanceId) throws ActivityInstanceNotFoundException
activityInstanceId
- The identifier of the activity instance.ActivityInstanceNotFoundException
- If the specified activity instance does not refer to an activity instance.List<ProcessInstance> getProcessInstances(int startIndex, int maxResults, ProcessInstanceCriterion criterion)
startIndex
- The index of the first result (starting from 0).maxResults
- The maximum number of results per page.criterion
- The sort criterion.InvalidSessionException
- If the session is invalid, e.g. the session has expired.List<ArchivedProcessInstance> getArchivedProcessInstances(int startIndex, int maxResults, ProcessInstanceCriterion criterion)
startIndex
- The index of the first result (starting from 0).maxResults
- The maximum number of results per page.criterion
- The sort criterion.List<ArchivedActivityInstance> getArchivedActivityInstances(long processInstanceId, int startIndex, int maxResults, ActivityInstanceCriterion criterion)
processInstanceId
- The identifier of the process instance.startIndex
- The index of the first result (starting from 0).maxResults
- The maximum number of result per page.criterion
- The sort criterion.List<ActivityInstance> getOpenActivityInstances(long processInstanceId, int startIndex, int maxResults, ActivityInstanceCriterion criterion)
processInstanceId
- The identifier of the process instance.startIndex
- The index of the first result (starting from 0).maxResults
- The maximum number of results per page.criterion
- The sort criterion.int getNumberOfOpenedActivityInstances(long processInstanceId) throws ProcessInstanceNotFoundException
processInstanceId
- The identifier of the process instance.ProcessInstanceNotFoundException
- If no matching process definition is found for parameter processInstanceIdlong getNumberOfProcessInstances()
long getNumberOfArchivedProcessInstances()
void deleteProcessInstance(long processInstanceId) throws DeletionException
processInstanceId
- The identifier of the process instance to delete.ProcessInstanceHierarchicalDeletionException
- If a process instance cannot be deleted because of a parent that is still active.DeletionException
- If an error occurs during deletion.@Deprecated void deleteProcessInstances(long processDefinitionId) throws DeletionException
deleteProcessInstances(long, int, int)
and deleteArchivedProcessInstances(long, int, int)
.
As these new methods are paginated, to delete ALL archived and non-archived process instances, use some code like:
long nbDeleted = 0; processAPI.disableProcess(processDefinitionId); do { nbDeleted = processAPI.deleteProcessInstances(processDefinitionId, 0, 100); } while (nbDeleted > 0); do { nbDeleted = processAPI.deleteArchivedProcessInstances(processDefinitionId, 0, 100); } while (nbDeleted > 0);
processDefinitionId
- The identifier of the processDefinition.ProcessInstanceHierarchicalDeletionException
- If a process instance cannot be deleted because of a parent that still exists.DeletionException
- If other deletion problem occurs.long deleteProcessInstances(long processDefinitionId, int startIndex, int maxResults) throws DeletionException
Long.MAX_VALUE
as maxResults is discouraged as the amount of operations may be large and may thus result in timeout operation.
Instead, to delete all Process instances of a specific process definition, should you should use a loop and delete instances in bulk.processDefinitionId
- Identifier of the processDefinitionstartIndex
- The indexmaxResults
- The max number of elements to retrieve per pageDeletionException
- If a process instance can't be deleted because of a parent that is still activelong deleteArchivedProcessInstances(long processDefinitionId, int startIndex, int maxResults) throws DeletionException
Long.MAX_VALUE
as maxResults is discouraged as the amount of operations may be large and may thus result in timeout operation.
Instead, to delete all archived process instances of a specific process definition, you should use a loop and delete archived instances in bulk.processDefinitionId
- Identifier of the processDefinitionstartIndex
- The indexmaxResults
- The max number of elements to retrieve per pageDeletionException
- If a process instance can't be deleted because of a parent that is still activeProcessInstance startProcess(long processDefinitionId) throws ProcessDefinitionNotFoundException, ProcessActivationException, ProcessExecutionException
processDefinitionId
- The identifier of the process definition for which an instance will be started.ProcessDefinitionNotFoundException
- If no matching process definition is found.ProcessActivationException
- If an exception occurs during activation.ProcessExecutionException
- If a problem occurs when starting the process.ProcessInstance startProcess(long processDefinitionId, Map<String,Serializable> initialVariables) throws ProcessDefinitionNotFoundException, ProcessActivationException, ProcessExecutionException
processDefinitionId
- The identifier of the processDefinitioninitialVariables
- The couples of initial variable/valueProcessDefinitionNotFoundException
- If The identifier of process definition does not refer to any existing process definitionProcessExecutionException
- If the process fails to startProcessActivationException
- If the process is disableProcessInstance startProcess(long processDefinitionId, List<Operation> operations, Map<String,Serializable> context) throws ProcessDefinitionNotFoundException, ProcessActivationException, ProcessExecutionException
processDefinitionId
- The identifier of the process definition for which an instance will be started.operations
- The operations to execute to set the initial values of the data.context
- The context in which operations are executed.ProcessDefinitionNotFoundException
- If no matching process definition is found.ProcessActivationException
- If an exception occurs during activation.ProcessExecutionException
- If a problem occurs when starting the process.ProcessInstance startProcess(long userId, long processDefinitionId) throws UserNotFoundException, ProcessDefinitionNotFoundException, ProcessActivationException, ProcessExecutionException
userId
- The user id of the user.processDefinitionId
- The identifier of the process definition for which an instance will be started.UserNotFoundException
- If the given user does not exist.ProcessDefinitionNotFoundException
- If no matching process definition is found.ProcessActivationException
- If a problem occurs when starting the process.ProcessExecutionException
- If an execution problem occurs when starting the process.ProcessInstance startProcess(long userId, long processDefinitionId, List<Operation> operations, Map<String,Serializable> context) throws UserNotFoundException, ProcessDefinitionNotFoundException, ProcessActivationException, ProcessExecutionException
userId
- The identifier of the user.processDefinitionId
- The identifier of the process definition for which an instance will be started.operations
- The operations to execute to set the initial values of the data.context
- The context in which the operations are executed.InvalidSessionException
- If the session is invalid, e.g. the session has expired.ProcessDefinitionNotFoundException
- If no matching process definition is found.ProcessActivationException
- If an exception occurs during activation.UserNotFoundException
- If there is no user with the specified userId.ProcessExecutionException
- If a problem occurs when starting the process.void executeFlowNode(long flownodeInstanceId) throws FlowNodeExecutionException
flownodeInstanceId
- The identifier of the flow node to execute.FlowNodeExecutionException
- If an execution exception occurs.void executeFlowNode(long userId, long flownodeInstanceId) throws FlowNodeExecutionException
userId
- The identifier of the user for which you want to execute the flow nodeflownodeInstanceId
- The identifier of the flow node to executeFlowNodeExecutionException
- If an execution exception occursList<ActivityInstance> getActivities(long processInstanceId, int startIndex, int maxResults)
processInstanceId
- The identifier of the process instance,startIndex
- The index of the first result (starting from 0).maxResults
- The maximum number of results to get.ProcessInstance getProcessInstance(long processInstanceId) throws ProcessInstanceNotFoundException
processInstanceId
- The identifier of the process instance.ProcessInstanceNotFoundException
- If there is no process instance with the specified identifier.ActivityInstance getActivityInstance(long activityInstanceId) throws ActivityInstanceNotFoundException
activityInstanceId
- The identifier of the activity instance.InvalidSessionException
- If the session is invalid, e.g. the session has expired.ActivityInstanceNotFoundException
- If the activity cannot be found.RetrieveException
- If the activity instance cannot be retrieved.FlowNodeInstance getFlowNodeInstance(long flowNodeInstanceId) throws FlowNodeInstanceNotFoundException
flowNodeInstanceId
- The identifier of the flow node instance.FlowNodeInstanceNotFoundException
- If the given flow node instance does not exist.ArchivedActivityInstance getArchivedActivityInstance(long activityInstanceId) throws ActivityInstanceNotFoundException
activityInstanceId
- The identifier of the activity instance.InvalidSessionException
- If the session is invalid, e.g. the session has expired.ActivityInstanceNotFoundException
- If the archived activity instance cannot be found.RetrieveException
- If the archived activity instance cannot be retrieved.List<HumanTaskInstance> getAssignedHumanTaskInstances(long userId, int startIndex, int maxResults, ActivityInstanceCriterion criterion)
userId
- The identifier of the user.startIndex
- The index of the first result (starting from 0).maxResults
- The maximum number of elements to get per page.criterion
- The sort criterion.InvalidSessionException
- Occurs when the session is invalid.RetrieveException
- If a task instance cannot be retrieved.List<HumanTaskInstance> getPendingHumanTaskInstances(long userId, int startIndex, int maxResults, ActivityInstanceCriterion pagingCriterion)
ActorMember
or through a UserFilter
. Hidden tasks for this user are not retrieved (see
hideTasks(long, Long...)
).userId
- The identifier of the user.startIndex
- The index of the first result (starting from 0).maxResults
- The maximum number of elements to get per page.pagingCriterion
- The criterion for sorting the items over pages.InvalidSessionException
- Occurs when the session is invalid.long getNumberOfAssignedHumanTaskInstances(long userId)
userId
- The identifier of a user.InvalidSessionException
- If the session is invalid, e.g. the session has expired.RetrieveException
- If an error occurs while retrieving an instance of an activity.Map<Long,Long> getNumberOfOpenTasks(List<Long> userIds)
userIds
- A list of user identifiers.InvalidSessionException
- If the session is invalid, e.g. the session has expired.RetrieveException
- can't retrieve an instance of activitylong getNumberOfPendingHumanTaskInstances(long userId)
userId
- The identifier of a user.InvalidSessionException
- If the session is invalid, e.g. the session has expired.RetrieveException
- If an error occurs while retrieving an instance of an activity.HumanTaskInstance getHumanTaskInstance(long activityInstanceId) throws ActivityInstanceNotFoundException
activityInstanceId
- The identifier of the activity instance.InvalidSessionException
- If the session is invalid, e.g. the session has expired.ActivityInstanceNotFoundException
- If the human task cannot be found.RetrieveException
- If an error occurs while retrieving the instance of the activity.List<EventInstance> getEventInstances(long rootContainerId, int startIndex, int maxResults, EventCriterion sortingType)
rootContainerId
- The identifier of the containing root process instance.startIndex
- The index of the first result (starting from 0).maxResults
- The maximum number of results to get.sortingType
- The criterion for sorting event instances.InvalidSessionException
- If the session is invalid, e.g. the session has expired.void assignUserTask(long userTaskId, long userId) throws UpdateException
userTaskId
- The identifier of the user task.userId
- The identifier of the user.InvalidSessionException
- If the session is invalid, e.g. the session has expired.UpdateException
- If an error occurs while updating the activity instance.void updateActorsOfUserTask(long userTaskId) throws UpdateException
userTaskId
- The identifier of the user taskUpdateException
- If an exception occurs during the evaluation of actors.List<DataInstance> getProcessDataInstances(long processInstanceId, int startIndex, int maxResults)
processInstanceId
- The identifier of the process instance.startIndex
- The index of the page of results to get (starting from 0).maxResults
- The maximum number of results to get.DataInstance getProcessDataInstance(String dataName, long processInstanceId) throws DataNotFoundException
dataName
- The name of the data item.processInstanceId
- The identifier of the process instance.InvalidSessionException
- If the session is invalid, e.g. the session has expired.DataNotFoundException
- If the specified data value cannot be found.void updateProcessDataInstance(String dataName, long processInstanceId, Serializable dataValue) throws UpdateException
dataName
- The name of the data item.processInstanceId
- The identifier of the process instance.dataValue
- The new value for the data item.InvalidSessionException
- If the session is invalid, e.g. the session has expired.UpdateException
- If a problem occurs while updating the data value.void updateProcessDataInstances(long processInstanceId, Map<String,Serializable> dataNameValues) throws UpdateException
processInstanceId
- The identifier of the process instance.dataNameValues
- The mapping between the data name and its value to update to.InvalidSessionException
- If the session is invalid, e.g. the session has expired.UpdateException
- If a problem occurs while updating the data value.List<DataInstance> getActivityDataInstances(long activityInstanceId, int startIndex, int maxResults)
activityInstanceId
- The identifier of the activity instance.startIndex
- The index of the first result (starting at 0).maxResults
- The maximum number of results to get.DataInstance getActivityDataInstance(String dataName, long activityInstanceId) throws DataNotFoundException
dataName
- The name of the data item.activityInstanceId
- The identifier of the activity instance.InvalidSessionException
- If the session is invalid, e.g. the session has expired.DataNotFoundException
- If the specified data value cannot be found.void updateActivityDataInstance(String dataName, long activityInstanceId, Serializable dataValue) throws UpdateException
dataName
- The name of the data instance.activityInstanceId
- The identifier of the activity instance.dataValue
- The new value of the data to set.InvalidSessionException
- If the session is invalid, e.g. the session has expired.UpdateException
- If an error occurs during the update.Date getActivityReachedStateDate(long activityInstanceId, String state)
activityInstanceId
- The identifier of the activity instance.state
- The state of interest.InvalidSessionException
- If the session is invalid, e.g. the session has expired.RetrieveException
- If an error occurs while retrieving the activity instance.void updateActivityInstanceVariables(long activityInstanceId, Map<String,Serializable> variables) throws UpdateException
activityInstanceId
- The activity identifier.variables
- A map which contains several pairs of variable name and value.UpdateException
- If a problem occurs while updating one of the data instance value.InvalidSessionException
- If the session is invalid, e.g. the session has expired.void updateActivityInstanceVariables(List<Operation> operations, long activityInstanceId, Map<String,Serializable> expressionContexts) throws UpdateException
operations
- A sequence of operations on expressions that update the values variables.activityInstanceId
- The identifier of the activity instance.expressionContexts
- Store all information identifying the container that the data belongs to.InvalidSessionException
- If the session is invalid, e.g. the session has expired.UpdateException
- If an error occurs during the update.void updateDueDateOfTask(long userTaskId, Date dueDate) throws UpdateException
userTaskId
- The identifier of the task to update.dueDate
- The new due date for the task.UpdateException
- If the activity does not exist or the update cannot be fulfilled.InvalidSessionException
- If the session is invalid, e.g. the session has expired.long getOneAssignedUserTaskInstanceOfProcessInstance(long processInstanceId, long userId) throws ProcessInstanceNotFoundException, UserNotFoundException
processInstanceId
- The identifier of the process instance.userId
- The identifier of the user.ProcessInstanceNotFoundException
- If the given process instance does not exist.InvalidSessionException
- If the session is invalid, e.g. the session has expired.UserNotFoundException
- If there is no user with the specified id.RetrieveException
- If an error occurs happen while retrieving the activity instance.long getOneAssignedUserTaskInstanceOfProcessDefinition(long processDefinitionId, long userId) throws ProcessDefinitionNotFoundException, UserNotFoundException
processDefinitionId
- The identifier of the process definition.userId
- The identifier of a user.ProcessDefinitionNotFoundException
- If the given process definition does not exist.UserNotFoundException
- If the given user does not exist.InvalidSessionException
- If the session is invalid, e.g. the session has expired.RetrieveException
- If an error occurs happen while retrieving the activity instance.String getActivityInstanceState(long activityInstanceId) throws ActivityInstanceNotFoundException
activityInstanceId
- The identifier of the activity instance.ActivityInstanceNotFoundException
- If the activity cannot be found.boolean canExecuteTask(long activityInstanceId, long userId) throws ActivityInstanceNotFoundException, UserNotFoundException
activityInstanceId
- The identifier of the activity instance.userId
- The identifier of a user.InvalidSessionException
- If the session is invalid, e.g. the session has expired.ActivityInstanceNotFoundException
- If the activity cannot be found.UserNotFoundException
- If there is no user with the specified userId.RetrieveException
- If an error occurs happen while retrieving the activity instance.void releaseUserTask(long userTaskId) throws ActivityInstanceNotFoundException, UpdateException
userTaskId
- The identifier of the user task.InvalidSessionException
- If the session is invalid, e.g. the session has expired.ActivityInstanceNotFoundException
- If the activity cannot be found.UpdateException
- If a problem occurs while release (un-assigning) the user task.List<ArchivedProcessInstance> getArchivedProcessInstances(long processInstanceId, int startIndex, int maxResults)
processInstanceId
- The identifier of the process instance.startIndex
- The index of the page of results to get.maxResults
- The maximum number of results to get.InvalidSessionException
- If no current valid session is found.RetrieveException
- If the search fails because an archived process instance cannot be read.ArchivedProcessInstance getFinalArchivedProcessInstance(long processInstanceId) throws ArchivedProcessInstanceNotFoundException
processInstanceId
- The identifier of the process instance.ArchivedProcessInstanceNotFoundException
- If no archived process instance can be found with the provided Id.InvalidSessionException
- If no current valid session is found.RetrieveException
- If the search fails because an archived process instance cannot be read.void setActivityStateById(long activityInstanceId, int stateId) throws UpdateException
activityInstanceId
- The identifier of the activity instance.stateId
- The identifier of the required state.InvalidSessionException
- If no current valid session is found.UpdateException
- If an error occurs during the update.void setActivityStateByName(long activityInstanceId, String state) throws UpdateException
activityInstanceId
- The identifier of the activity instance.state
- The name of the required state.InvalidSessionException
- If no current valid session is found.UpdateException
- If an error occurs during the update.void setProcessInstanceState(ProcessInstance processInstance, String state) throws UpdateException
processInstance
- The process instance.state
- The name of the required state.InvalidSessionException
- If the session is invalid, e.g. the session has expired.UpdateException
- If an error occurs during the update.void setTaskPriority(long userTaskInstanceId, TaskPriority priority) throws UpdateException
userTaskInstanceId
- The identifier of user task instance.priority
- The new priority of this task.InvalidSessionException
- If the session is invalid, e.g. the session has expired.UpdateException
- If an error occurs during the update.Map<String,Serializable> executeConnectorOnProcessDefinition(String connectorDefinitionId, String connectorDefinitionVersion, Map<String,Expression> connectorInputParameters, Map<String,Map<String,Serializable>> inputValues, long processDefinitionId) throws ConnectorExecutionException, ConnectorNotFoundException
connectorDefinitionId
- The identifier of connector definition.connectorDefinitionVersion
- The version of the connector definition.connectorInputParameters
- The expressions related to the connector input paramters.inputValues
- The parameters values for expression needed when evaluating the connector.processDefinitionId
- The identifier of the process definition.ConnectorExecutionException
- If an error occurs during connector execution.ConnectorNotFoundException
- If there is no connector definition with the specified identifier or version.InvalidSessionException
- If the session is invalid, e.g. the session has expired.Map<String,Serializable> executeConnectorOnProcessDefinition(String connectorDefinitionId, String connectorDefinitionVersion, Map<String,Expression> connectorInputParameters, Map<String,Map<String,Serializable>> inputValues, List<Operation> operations, Map<String,Serializable> operationInputValues, long processDefinitionId) throws ConnectorExecutionException, ConnectorNotFoundException
connectorDefinitionId
- The identifier of connector definition.connectorDefinitionVersion
- The version of the connector definition.connectorInputParameters
- The expressions related to the connector input parameters.inputValues
- The parameters values for expression needed when evaluating the connector.operations
- The operations used when executing the connector.operationInputValues
- The input values for the operations.processDefinitionId
- The identifier of the process definition.ConnectorExecutionException
- If an error occurs during connector execution.ConnectorNotFoundException
- If there is no connector definition with the specified identifier or version.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchResult<ArchivedHumanTaskInstance> searchArchivedHumanTasks(SearchOptions searchOptions) throws SearchException
searchOptions
- The search conditions and the options for sorting and paging the results.SearchException
- If the search could not be completed correctly.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchResult<HumanTaskInstance> searchAssignedTasksManagedBy(long managerUserId, SearchOptions searchOptions) throws SearchException
managerUserId
- The identifier of the user.searchOptions
- The search conditions and the options for sorting and paging the results.SearchException
- If there is an error in the search conditions.SearchResult<HumanTaskInstance> searchPendingTasksSupervisedBy(long userId, SearchOptions searchOptions) throws SearchException
userId
- The identifier of the user.searchOptions
- The search conditions and the options for sorting and paging the results.SearchException
- If there is an error in the search conditions.SearchResult<HumanTaskInstance> searchPendingTasksForUser(long userId, SearchOptions searchOptions) throws SearchException
userId
- The identifier of the user.searchOptions
- The search conditions and the options for sorting and paging the results.SearchException
- If there is an error in the search conditions.SearchResult<HumanTaskInstance> searchPendingTasksManagedBy(long managerUserId, SearchOptions searchOptions) throws SearchException
managerUserId
- The identifier of the user.searchOptions
- The search conditions and the options for sorting and paging the results.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If there is an error in the search conditions.Map<Long,Long> getNumberOfOverdueOpenTasks(List<Long> userIds)
userIds
- A list of user identifiers.InvalidSessionException
- If the session is invalid, e.g. the session has expired.void cancelProcessInstance(long processInstanceId) throws ProcessInstanceNotFoundException, UpdateException
processInstanceId
- The identifier of the process instance.ProcessInstanceNotFoundException
- If the process instance identifier does not refer to a process instance.UpdateException
- If an exception occurs during the process instance canceling.InvalidSessionException
- If the session is invalid (expired, unknown, ...)void retryTask(long activityInstanceId) throws ActivityInstanceNotFoundException, ActivityExecutionException
activityInstanceId
- The identifier of the activity instance.InvalidSessionException
- If the session is invalid, e.g. the session has expired.ActivityInstanceNotFoundException
- If there is no activity instance with the specified identifier.ActivityExecutionException
- If an error occurs either while resetting the state of while executing the activity instance.void hideTasks(long userId, Long... activityInstanceId) throws UpdateException
userId
- The identifier of the user.activityInstanceId
- The list of identifiers of the tasks to be hidden.InvalidSessionException
- If there is no current valid session.UpdateException
- If a problem occurs when hiding one of the tasks.unhideTasks(long, Long...)
void unhideTasks(long userId, Long... activityInstanceId) throws UpdateException
userId
- The identifier of the user.activityInstanceId
- The list of identifiers of the tasks to be hidden.InvalidSessionException
- If there is no current valid session.UpdateException
- If a problem occurs when un-hiding one of the tasks.hideTasks(long, Long...)
Serializable evaluateExpressionOnProcessDefinition(Expression expression, Map<String,Serializable> context, long processDefinitionId) throws ExpressionEvaluationException
expression
- The expression to evaluate.context
- The context values that are provided for evaluating the expression.processDefinitionId
- The identifier of the process definition in which the expression is evaluated.InvalidSessionException
- If there is no current valid session.ExpressionEvaluationException
- If an error occurs while evaluating the expression.boolean isTaskHidden(long userTaskId, long userId)
userTaskId
- The identifier of the task to check.userId
- The identifier of the user.InvalidSessionException
- If there is no current valid sessionRetrieveException
- If an error occurs while retreiving the task.long countComments(SearchOptions searchOptions) throws SearchException
searchOptions
- The search conditions and the options for sorting and paging the results.SearchException
- If the search could not be completed correctly.long countAttachments(SearchOptions searchOptions) throws SearchException
searchOptions
- The search conditions and the options for sorting and paging the results.SearchException
- If the search could not be completed correctly.void sendSignal(String signalName) throws SendEventException
signalName
- The signal name.InvalidSessionException
- If there is no current valid session.SendEventException
- If an exception occurs while sending signal.void sendMessage(String messageName, Expression targetProcess, Expression targetFlowNode, Map<Expression,Expression> messageContent) throws SendEventException
messageName
- The message name.targetProcess
- An expression representing the target process name.targetFlowNode
- An expression representing the target flow node name.messageContent
- A key->value map containing the message data, with the data name as key.InvalidSessionException
- If there is no current valid session.SendEventException
- If an exception occurs while sending message.void sendMessage(String messageName, Expression targetProcess, Expression targetFlowNode, Map<Expression,Expression> messageContent, Map<Expression,Expression> correlations) throws SendEventException
messageName
- The message name.targetProcess
- An expression representing the target process name.targetFlowNode
- An expression representing the target flow node name.messageContent
- A key->value map containing the message data, with the data name as key.correlations
- The message correlations (five maximum).InvalidSessionException
- If there is no current valid session.SendEventException
- If there are too many correlations (more than 5) or an exception occurs while sending message.ArchivedProcessInstance getArchivedProcessInstance(long archivedProcessInstanceId) throws ArchivedProcessInstanceNotFoundException
ArchivedProcessInstance
specified by its identifier.archivedProcessInstanceId
- The identifier of the ArchivedProcessInstance
to be retrieved.ArchivedProcessInstance
instance.ArchivedProcessInstanceNotFoundException
- If the ArchivedProcessInstance
was not found.InvalidSessionException
- If the session is invalid, e.g. the session has expired.RetrieveException
- If an error occurs while trying to retrieve the ArchivedProcessInstance
.ArchivedFlowNodeInstance getArchivedFlowNodeInstance(long archivedFlowNodeInstanceId) throws ArchivedFlowNodeInstanceNotFoundException
ArchivedFlowNodeInstance
specified by its identifier.archivedFlowNodeInstanceId
- The identifier of the ArchivedFlowNodeInstance
to be retrieved.ArchivedFlowNodeInstance
instance.ArchivedFlowNodeInstanceNotFoundException
- If the ArchivedFlowNodeInstance
was not found.InvalidSessionException
- If the session is invalid, e.g. the session has expired.RetrieveException
- If an error occurs while trying to retrieve the ArchivedFlowNodeInstance
.ArchivedComment getArchivedComment(long archivedCommentId) throws NotFoundException
ArchivedComment
specified by its identifier.archivedCommentId
- The identifier of the ArchivedComment
to be retrieved.ArchivedComment
instance.InvalidSessionException
- If the session is invalid, e.g. the session has expired.RetrieveException
- If an error occurs while trying to retrieve the ArchivedComment
.NotFoundException
- If no ArchivedComment
was found with the specified archivedCommentId.SearchResult<ConnectorInstance> searchConnectorInstances(SearchOptions searchOptions) throws SearchException
searchOptions
- The search conditions and the options for sorting and paging the results.SearchResult
containing the ConnectorInstance
s matching the search options.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If the search could not be completed correctly.SearchResult<ArchivedConnectorInstance> searchArchivedConnectorInstances(SearchOptions searchOptions) throws SearchException
searchOptions
- The search options parametersSearchResult
containing the ArchivedConnectorInstance
s matching the search options.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If the search could not be completed correctly.List<HumanTaskInstance> getHumanTaskInstances(long processInstanceId, String taskName, int startIndex, int maxResults)
processInstanceId
- The identifier of the process instance.taskName
- The name of the required human tasks.startIndex
- The result start index (strating from 0).maxResults
- The maximum number of results to retrieve.InvalidSessionException
- If the session is invalid, e.g. the session has expired.HumanTaskInstance getLastStateHumanTaskInstance(long processInstanceId, String taskName) throws NotFoundException
processInstanceId
- The identifier of the process instance.taskName
- The name of the required human task.NotFoundException
- If no current task with provided name is found.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchResult<ArchivedActivityInstance> searchArchivedActivities(SearchOptions searchOptions) throws SearchException
searchOptions
- The criterion used to search for archived activity instances.SearchResult
containing the search result.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If an exception occurs during the search.SearchResult<ActivityInstance> searchActivities(SearchOptions searchOptions) throws SearchException
searchOptions
- The criterion used to search for activity instances.SearchResult
containing the search result.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If the search could not be completed correctly.SearchResult<FlowNodeInstance> searchFlowNodeInstances(SearchOptions searchOptions) throws SearchException
searchOptions
- The criterion used to search for flow node instances.SearchResult
containing the search resultInvalidSessionException
- If the ession is invalid, e.g session has expired.SearchException
- If an exception occurs during the search.SearchResult<ArchivedFlowNodeInstance> searchArchivedFlowNodeInstances(SearchOptions searchOptions) throws SearchException
searchOptions
- The options used to search for flow node instances.SearchResult
containing the search result.InvalidSessionException
- If the session is invalid, e.g session has expired.SearchException
- If an exception occurs during the search.ArchivedFlowNodeInstance
SearchResult<HumanTaskInstance> searchMyAvailableHumanTasks(long userId, SearchOptions searchOptions) throws SearchException
userId
- The identifier of the user for whom the tasks are available.searchOptions
- The options used to search for tasks.InvalidSessionException
- If the current session is invalid.SearchException
- If an exception occurs during the search.SearchResult<Comment> searchComments(SearchOptions searchOptions) throws SearchException
searchOptions
- The options used to search for comments.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If an exception occurs during the search.@Deprecated Comment addComment(long processInstanceId, String comment)
addProcessComment(long, String)
instead, that can throw CreationException is case of inexistant Process InstanceprocessInstanceId
- The identifier of the process instance.comment
- The content of the comment.InvalidSessionException
- If the session is invalid, e.g. the session has expired.Comment addProcessComment(long processInstanceId, String comment) throws CreationException
processInstanceId
- The identifier of the process instance.comment
- The content of the comment.InvalidSessionException
- If the session is invalid, e.g. the session has expired.CreationException
- If the parameter processInstanceId does not refer to any active process instance (existing and non-archived).@Deprecated List<Comment> getComments(long processInstanceId)
searchComments(SearchOptions)
instead, passing a filter on processInstanceId field.processInstanceId
- The identifier of the process instance.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchResult<Comment> searchCommentsManagedBy(long managerUserId, SearchOptions searchOptions) throws SearchException
managerUserId
- The identifier of the user.searchOptions
- The options used to search for comments.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If the search could not be completed correctly.SearchResult<Comment> searchCommentsInvolvingUser(long userId, SearchOptions searchOptions) throws SearchException
userId
- The identifier of the user.searchOptions
- The options used to search for comments.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If the search could not be completed correctly.List<Long> getChildrenInstanceIdsOfProcessInstance(long processInstanceId, int startIndex, int maxResults, ProcessInstanceCriterion criterion)
processInstanceId
- The identifier of the process definition.startIndex
- The index of the page to be returned (starting at 0).maxResults
- The maximum number of results per page.criterion
- The criterion used to sort the result.InvalidSessionException
- If the session is invalid, e.g. the session has expired.boolean isInvolvedInProcessInstance(long userId, long processInstanceId) throws ProcessInstanceNotFoundException, UserNotFoundException
userId
- The identifier of the user.processInstanceId
- The identifier of the process instance.InvalidSessionException
- If the session is invalid, e.g. the session has expired.ProcessInstanceNotFoundException
- If there is no processInstance with the specified identifier.UserNotFoundException
- If there is no user with the specified identifier.long getProcessInstanceIdFromActivityInstanceId(long activityInstanceId) throws ProcessInstanceNotFoundException
activityInstanceId
- The identifier of the activity instance.InvalidSessionException
- If the session is invalid, e.g. the session has expired.ProcessInstanceNotFoundException
- If there is no process instance with the specified identifier.long getProcessDefinitionIdFromProcessInstanceId(long processInstanceId) throws ProcessDefinitionNotFoundException
processInstanceId
- The identifier of the process instance.InvalidSessionException
- If the session is invalid, e.g. the session has expired.ProcessDefinitionNotFoundException
- If there is no process definition with the specified identifier.long getProcessDefinitionIdFromActivityInstanceId(long activityInstanceId) throws ProcessDefinitionNotFoundException
activityInstanceId
- The identifier of the activity instance.InvalidSessionException
- If the session is invalid, e.g. the session has expired.ProcessDefinitionNotFoundException
- If no ProcessDefinition have an id corresponding to the parameter.SearchResult<ArchivedComment> searchArchivedComments(SearchOptions searchOptions) throws SearchException
searchOptions
- The options used to search for comments.ArchivedComment
items that match the search options.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If the search could not be completed correctly.SearchResult<ArchivedHumanTaskInstance> searchArchivedHumanTasksManagedBy(long managerUserId, SearchOptions searchOptions) throws SearchException
managerUserId
- The identifier of the user manager,searchOptions
- The options used to search for tasks.SearchException
- If the search could not be completed correctly.SearchResult<ProcessInstance> searchOpenProcessInstancesInvolvingUser(long userId, SearchOptions searchOptions) throws SearchException
userId
- The identifier of the user.searchOptions
- The options used to search for process instance.ProcessInstance
s that match the search options.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If the search could not be completed correctly.SearchResult<ProcessInstance> searchOpenProcessInstancesInvolvingUsersManagedBy(long managerUserId, SearchOptions searchOptions) throws SearchException
managerUserId
- The identifier of the user manager.searchOptions
- The search options (pagination, filter, order sort).ProcessInstance
s that match the search options.SearchException
- If the search could not be completed correctly.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchResult<ArchivedProcessInstance> searchArchivedProcessInstances(SearchOptions searchOptions) throws SearchException
searchOptions
- The search options (pagination, filter, order sort).SearchException
- If the search could not be fullfilled correctlyInvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchResult<ArchivedProcessInstance> searchArchivedProcessInstancesInAllStates(SearchOptions searchOptions) throws SearchException
searchOptions
- The search options (pagination, filter, order sort).SearchException
- If the search could not be completed correctly.SearchResult<ArchivedProcessInstance> searchArchivedProcessInstancesSupervisedBy(long userId, SearchOptions searchOptions) throws SearchException
userId
- The identifier of the user.searchOptions
- The search options (pagination, filter, order sort).InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If the search could not be completed correctly.SearchResult<ArchivedProcessInstance> searchArchivedProcessInstancesInvolvingUser(long userId, SearchOptions searchOptions) throws SearchException
userId
- The identifier of the user.searchOptions
- The search options (pagination, filter, order sort).InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If the search could not be completed correctly.SearchResult<HumanTaskInstance> searchHumanTaskInstances(SearchOptions searchOptions) throws SearchException
searchOptions
- The search options (pagination, filter, order sort).InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If the search could not be completed correctly.SearchResult<HumanTaskInstance> searchAssignedTasksSupervisedBy(long supervisorId, SearchOptions searchOptions) throws SearchException
supervisorId
- The identifier of supervising user.searchOptions
- The search options (pagination, filter, order sort).InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If the search could not be completed correctly.SearchResult<ArchivedHumanTaskInstance> searchArchivedHumanTasksSupervisedBy(long supervisorId, SearchOptions searchOptions) throws SearchException
supervisorId
- The identifier of the supervising user.searchOptions
- The search options (pagination, filter, order sort).InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If the search could not be completed correctly.Map<String,Serializable> evaluateExpressionsAtProcessInstanciation(long processInstanceId, Map<Expression,Map<String,Serializable>> expressions) throws ExpressionEvaluationException
processInstanceId
- The identifier of the process instance.expressions
- The map of expressions to evaluate.InvalidSessionException
- Generic exception thrown if API Session is invalid, e.g session has expired.ExpressionEvaluationException
- Occurs when an exception is thrown during expression evaluation.Map<String,Serializable> evaluateExpressionOnCompletedProcessInstance(long processInstanceId, Map<Expression,Map<String,Serializable>> expressions) throws ExpressionEvaluationException
processInstanceId
- The identifier of the process instance.expressions
- The map of expressions to evaluate.InvalidSessionException
- If the API session is invalid, e.g session has expired.ExpressionEvaluationException
- Occurs when an exception is thrown during expression evaluation.Map<String,Serializable> evaluateExpressionsOnProcessInstance(long processInstanceId, Map<Expression,Map<String,Serializable>> expressions) throws ExpressionEvaluationException
processInstanceId
- The identifier of the process instance.expressions
- The map of expressions to evaluate.InvalidSessionException
- If the API session is invalid, e.g session has expired.ExpressionEvaluationException
- Occurs when an exception is thrown during expression evaluation.Map<String,Serializable> evaluateExpressionsOnProcessDefinition(long processDefinitionId, Map<Expression,Map<String,Serializable>> expressions) throws ExpressionEvaluationException
processDefinitionId
- The identifier of the process definition.expressions
- The map of expressions to evaluate.InvalidSessionException
- If the API session is invalid, e.g session has expired.ExpressionEvaluationException
- Occurs when an exception is thrown during expression evaluation.Map<String,Serializable> evaluateExpressionsOnActivityInstance(long activityInstanceId, Map<Expression,Map<String,Serializable>> expressions) throws ExpressionEvaluationException
activityInstanceId
- The identifier of the activity instance.expressions
- The map of expressions to evaluate.InvalidSessionException
- If the API session is invalid, e.g session has expired.ExpressionEvaluationException
- Occurs when an exception is thrown during expression evaluation.Map<String,Serializable> evaluateExpressionsOnCompletedActivityInstance(long activityInstanceId, Map<Expression,Map<String,Serializable>> expressions) throws ExpressionEvaluationException
activityInstanceId
- The identifier of the activity instance.expressions
- The map of expressions to evaluate.InvalidSessionException
- If the API session is invalid, e.g session has expired.ExpressionEvaluationException
- Occurs when an exception is thrown during expression evaluation.List<FailedJob> getFailedJobs(int startIndex, int maxResults)
startIndex
- The result start index (starting from 0).maxResults
- The maximum number of results to retrieve.InvalidSessionException
- If the session is invalid (expired, unknown, ...)void replayFailedJob(long jobDescriptorId) throws ExecutionException
jobDescriptorId
- The identifier of the job descriptor.ExecutionException
- Occurs when an exception is thrown during the job replayInvalidSessionException
- If the session is invalid (expired, unknown, ...)void replayFailedJob(long jobDescriptorId, Map<String,Serializable> parameters) throws ExecutionException
jobDescriptorId
- The identifier of the job descriptor.parameters
- The job parameters.ExecutionException
- Occurs when an exception is thrown during the job replayInvalidSessionException
- If the session is invalid (expired, unknown, ...)ArchivedDataInstance getArchivedProcessDataInstance(String dataName, long processInstanceId) throws ArchivedDataNotFoundException
dataName
- The name of the dataprocessInstanceId
- The identifier of the process instanceInvalidSessionException
- If the session is invalid (expired, unknown, ...)ArchivedDataNotFoundException
- If the specified data cannot be found.ArchivedDataInstance getArchivedActivityDataInstance(String dataName, long activityInstanceId) throws ArchivedDataNotFoundException
dataName
- The name of the dataactivityInstanceId
- The identifier of the activity instanceInvalidSessionException
- If the session is invalid (expired, unknown, ...)ArchivedDataNotFoundException
- If the specified data cannot be foundList<ArchivedDataInstance> getArchivedProcessDataInstances(long processInstanceId, int startIndex, int maxResults)
processInstanceId
- The identifier of the process instancestartIndex
- The start indexmaxResults
- The max number of archived data instancesInvalidSessionException
- If the session is invalid (expired, unknown, ...)RetrieveException
- If an exception occurs while retrieving the archived instances of dataList<ArchivedDataInstance> getArchivedActivityDataInstances(long activityInstanceId, int startIndex, int maxResults)
activityInstanceId
- The identifier of the activity instancestartIndex
- The start indexmaxResults
- The max number of archived data instancesInvalidSessionException
- If the session is invalid (expired, unknown, ...)RetrieveException
- If an exception occurs while retrieving the archived instances of dataList<User> getPossibleUsersOfPendingHumanTask(long humanTaskInstanceId, int startIndex, int maxResults)
humanTaskInstanceId
- The identifier of the human task instancestartIndex
- The start indexmaxResults
- The max number of usersInvalidSessionException
- If the session is invalid (expired, unknown, ...)RetrieveException
- If an exception occurs while retrieving the usersCopyright © 2014 Bonitasoft S.A.. All Rights Reserved.