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 |
addProcessComment(long processInstanceId,
String comment)
Add a comment on a process instance.
|
Comment |
addProcessCommentOnBehalfOfUser(long processInstanceId,
String comment,
long userId)
Add a comment on a process instance, on behalf of an user.
|
void |
assignUserTask(long userTaskId,
long userId)
Assign a task to a user with given user identifier.
|
void |
assignUserTaskIfNotAssigned(long userTaskId,
long userId)
Assign a task to a user with given user identifier if the task is not currently assigned to another user.
|
void |
cancelProcessInstance(long processInstanceId)
Cancels the process instance and all of its active flow nodes.
|
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.
|
long |
deleteArchivedProcessInstancesInAllStates(List<Long> sourceProcessInstanceIds)
Delete all archived process instance (different states) of the source identifier list.
|
long |
deleteArchivedProcessInstancesInAllStates(long sourceProcessInstanceId)
Delete all archived process instance (different states) corresponding to the source identifier.
|
void |
deleteProcessInstance(long processInstanceId)
Delete the specified process instance.
|
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)
Executes a flow node that is in a stable state.
|
void |
executeFlowNode(long userId,
long flownodeInstanceId)
Executes a flow node that is in a 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.
|
void |
executeMessageCouple(long messageInstanceId,
long waitingMessageEventId)
When a matching BPM event couple messageInstance / waitingMessageEvent fails to execute and no failure handling has been successful, a log message
indicates that this method can be called to try again the execution.
|
void |
executeUserTask(long userId,
long userTaskInstanceId,
Map<String,Serializable> inputs)
Executes a user task that is in a stable state on behalf of a given user
Will make the task 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 task.
|
void |
executeUserTask(long userTaskInstanceId,
Map<String,Serializable> inputs)
Executes a user task that is in a stable state.
|
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.
|
DataInstance |
getActivityTransientDataInstance(String dataName,
long activityInstanceId)
Get a named transient data instance from a specified activity instance.
|
List<DataInstance> |
getActivityTransientDataInstances(long activityInstanceId,
int startIndex,
int maxResults)
Get a list of the transient data instances from a specified activity instance.
|
ArchivedDataInstance |
getArchivedActivityDataInstance(String dataName,
long sourceActivityInstanceId)
Gets the last archived data instance of the named data of the specified activity instance.
|
List<ArchivedDataInstance> |
getArchivedActivityDataInstances(long sourceActivityInstanceId,
int startIndex,
int maxResults)
Lists the last archived instances of data of the specified activity instance.
|
ArchivedActivityInstance |
getArchivedActivityInstance(long sourceActivityInstanceId)
Get an activity instance that is archived.
|
List<ArchivedActivityInstance> |
getArchivedActivityInstances(long sourceProcessInstanceId,
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 sourceProcessInstanceId)
Gets the last archived data instance of the named data of the specified process instance.
|
List<ArchivedDataInstance> |
getArchivedProcessDataInstances(long sourceProcessInstanceId,
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. |
Map<String,Serializable> |
getArchivedProcessInstanceExecutionContext(long archivedProcessInstanceId)
return the context defined in the process definition for this process instance.
|
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.
|
Map<String,Serializable> |
getArchivedUserTaskExecutionContext(long archivedUserTaskInstanceId)
return the context defined in the process definition for this user task 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 sourceProcessInstanceId)
Get the last archived instance of a process instance.
|
FlowNodeInstance |
getFlowNodeInstance(long flowNodeInstanceId)
Get a specified flow node instance.
|
Map<String,Map<String,Long>> |
getFlownodeStateCounters(long processInstanceId)
Retrieve, for a given process instance, the current counters on flownodes.
|
HumanTaskInstance |
getHumanTaskInstance(long activityInstanceId)
Retrieve a human task instance by the corresponding activity instance id.
|
List<HumanTaskInstance> |
getHumanTaskInstances(long rootProcessInstanceId,
String taskName,
int startIndex,
int maxResults)
List the named human tasks belonging to the specified process instance.
|
HumanTaskInstance |
getLastStateHumanTaskInstance(long rootProcessInstanceId,
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.
|
ContractDefinition |
getProcessContract(long processDefinitionId)
Gets the process instantiation contract for a given process definition.
|
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.
|
Serializable |
getProcessInputValueAfterInitialization(long processInstanceId,
String name)
Gets the value of a process instantiation input, after initialization has finished.
|
Serializable |
getProcessInputValueDuringInitialization(long processInstanceId,
String name)
Gets the value of a process instantiation input, during the phase of initializing.
|
ProcessInstance |
getProcessInstance(long processInstanceId)
Get the specified process instance.
|
Map<String,Serializable> |
getProcessInstanceExecutionContext(long processInstanceId)
return the context defined in the process definition for this 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.
|
ContractDefinition |
getUserTaskContract(long userTaskId)
Gets the contract of the user task.
|
Serializable |
getUserTaskContractVariableValue(long userTaskInstanceId,
String name)
Gets the value of the variable of the user task contract.
|
Map<String,Serializable> |
getUserTaskExecutionContext(long userTaskInstanceId)
return the context defined in the process definition for this user task instance.
|
boolean |
isInvolvedInHumanTaskInstance(long userId,
long humanTaskInstanceId)
Check whether a specific user is involved in a given human task instance.
User A is involved with a human task instance if any of the following is true: the human task instance is assigned to user A the human task instance is pending for user A |
boolean |
isInvolvedInProcessInstance(long userId,
long processInstanceId)
Check whether a specific user is involved in a given process instance.
User A is involved with a process instance if any of the following is true: user A has started the process instance a task in the process instance is assigned to user A a task in the process instance is pending for user A a task in the process instance has been performed by user A This method also applies to completed instances of process. |
boolean |
isManagerOfUserInvolvedInProcessInstance(long managerUserId,
long processInstanceId)
Check whether a specific user has at least one subordinate (person he / she is the manager of) involved in a given process instance.
User A is involved with a process instance if any of the following is true: user A has started the process instance a task in the process instance is assigned to user A a task in the process instance is pending for user A a task in the process instance has been performed by user A This method also applies to completed instances of process. |
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
FlowNodeInstance 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 root process instances.
|
SearchResult<ArchivedProcessInstance> |
searchArchivedProcessInstancesInAllStates(SearchOptions searchOptions)
Search for archived process instances (root and intermediate levels) 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> |
searchAssignedAndPendingHumanTasks(long rootProcessDefinitionId,
SearchOptions searchOptions)
Search the assigned and pending human tasks for any user, on the specified root process definition, corresponding to the options.
|
SearchResult<HumanTaskInstance> |
searchAssignedAndPendingHumanTasks(SearchOptions searchOptions)
Search the assigned and pending human tasks for any user corresponding to the options.
|
SearchResult<HumanTaskInstance> |
searchAssignedAndPendingHumanTasksFor(long rootProcessDefinitionId,
long userId,
SearchOptions searchOptions)
Search the assigned and pending human tasks for the specified user, on the specified root process definition, corresponding to the options.
|
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<ProcessInstance> |
searchFailedProcessInstances(SearchOptions searchOptions)
List all process instances with at least one failed task or the
ProcessInstanceState.ERROR state. |
SearchResult<ProcessInstance> |
searchFailedProcessInstancesSupervisedBy(long userId,
SearchOptions searchOptions)
List all process instances with at least one failed task or the
ProcessInstanceState.ERROR state that
are supervised by the given user. |
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> |
searchPendingTasksAssignedToUser(long userId,
SearchOptions searchOptions)
Search the pending human tasks assigned to a 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<ProcessDeploymentInfo> |
searchProcessDeploymentInfosWithAssignedOrPendingHumanTasks(SearchOptions searchOptions)
Search process definitions that have instances with assigned or pending human tasks.
|
SearchResult<ProcessDeploymentInfo> |
searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor(long userId,
SearchOptions searchOptions)
Search process definitions that have instances with assigned or pending human tasks for a specific user.
|
SearchResult<ProcessDeploymentInfo> |
searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy(long supervisorId,
SearchOptions searchOptions)
Search process definitions supervised by a specific user, that have instances with assigned or pending human tasks.
|
SearchResult<ProcessInstance> |
searchProcessInstances(SearchOptions searchOptions)
List all process instances.
|
SearchResult<TimerEventTriggerInstance> |
searchTimerEventTriggerInstances(long processInstanceId,
SearchOptions searchOptions)
Search the
TimerEventTriggerInstance on the specific ProcessInstance . |
SearchResult<User> |
searchUsersWhoCanExecutePendingHumanTask(long humanTaskInstanceId,
SearchOptions searchOptions)
Lists the possible users (candidates) that can execute the specified human task instance.
|
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 userId,
long processDefinitionId,
Map<String,Serializable> initialVariables)
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 initialVariables.
|
ProcessInstance |
startProcess(long processDefinitionId,
Map<String,Serializable> initialVariables)
Instantiates a process.
|
ProcessInstance |
startProcessWithInputs(long userId,
long processDefinitionId,
Map<String,Serializable> instantiationInputs)
Start an instance of the process with the specified process definition id on behalf of a given user, and provides inputs to fulfill Process Contract.
|
ProcessInstance |
startProcessWithInputs(long processDefinitionId,
Map<String,Serializable> instantiationInputs)
Start an instance of the process with the specified process definition id, and provides inputs to fulfill Process Contract.
|
void |
updateActivityDataInstance(String dataName,
long activityInstanceId,
Serializable dataValue)
Update the value of a named data instance in a specified activity instance.
WARNING: this method is not supported for updating a Custom Data Instance variable with a remote Engine API connection, because the custom data type is not present in the remote classloader that deserializes the API call parameters. |
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 |
updateActivityTransientDataInstance(String dataName,
long activityInstanceId,
Serializable dataValue)
Update the value of a named transient data instance in a specified 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.
|
Date |
updateExecutionDateOfTimerEventTriggerInstance(long timerEventTriggerInstanceId,
Date executionDate)
Change the date of the execution of a specific
TimerEventTriggerInstance . |
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<ProcessInstance> searchOpenProcessInstances(SearchOptions searchOptions) throws SearchException
searchOptions
- The search criterion. See ProcessInstanceSearchDescriptor
for valid fields for searching and sorting.ProcessInstance
object.SearchException
- If an exception occurs when getting the list of tasks.SearchResult<ProcessInstance> searchProcessInstances(SearchOptions searchOptions) throws SearchException
searchOptions
- The search criterion. See ProcessInstanceSearchDescriptor
for valid fields for searching and sorting.ProcessInstance
object.SearchException
- If an exception occurs when getting the list of ProcessInstance
.SearchResult<ProcessInstance> searchFailedProcessInstances(SearchOptions searchOptions) throws SearchException
ProcessInstanceState.ERROR
state.searchOptions
- The search criterion. See ProcessInstanceSearchDescriptor
for valid fields for searching and sorting.ProcessInstance
object.SearchException
- If an exception occurs when getting the list of ProcessInstance
.SearchResult<ProcessInstance> searchFailedProcessInstancesSupervisedBy(long userId, SearchOptions searchOptions) throws SearchException
ProcessInstanceState.ERROR
state that
are supervised by the given user.
If the specified userId does not correspond to a user, an empty SearchResult is returned.userId
- The identifier of the user.searchOptions
- The search criterion. See ProcessInstanceSearchDescriptor
for valid fields for searching and sorting.SearchException
- If an exception occurs when getting the list of process instances.SearchResult<ProcessInstance> searchOpenProcessInstancesSupervisedBy(long userId, SearchOptions searchOptions) throws SearchException
userId
- The identifier of the user.searchOptions
- The search criterion. See ProcessInstanceSearchDescriptor
for valid fields for searching and sorting.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 sourceProcessInstanceId, int startIndex, int maxResults, ActivityInstanceCriterion criterion)
sourceProcessInstanceId
- The identifier of the source process instance (used as root container id of the archived activity instances).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 instance 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.long deleteProcessInstances(long processDefinitionId, int startIndex, int maxResults) throws DeletionException
Integer.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
Integer.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 there is some e.g. connection issue to the databaselong deleteArchivedProcessInstancesInAllStates(List<Long> sourceProcessInstanceIds) throws DeletionException
sourceProcessInstanceIds
- Identifiers corresponding to ArchivedElement.getSourceObjectId()
. These ids needs to be ids of root process instancesArchivedProcessInstance
s that have been deleted in any state. For example, process instance can be archived in several
states: Cancelled, Aborted, Completed, FailedDeletionException
- If there is some e.g. connection issue to the databaselong deleteArchivedProcessInstancesInAllStates(long sourceProcessInstanceId) throws DeletionException
sourceProcessInstanceId
- Identifier corresponding to ArchivedElement.getSourceObjectId()
. These id needs to be the id of a root process instancesArchivedProcessInstance
s that have been deleted in any state. For example, process instance can be archived in several
states: Cancelled, Aborted, Completed, FailedDeletionException
- If there is some e.g. connection issue to the databaseProcessInstance startProcess(long processDefinitionId) throws ProcessDefinitionNotFoundException, ProcessActivationException, ProcessExecutionException
startProcessWithInputs(long, Map)
instead.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
initialVariables
parameter. Note: If the process instantiation contract requires
inputs, you must use startProcessWithInputs(long, Map)
instead, transforming initialVariables
parameter as follows: in the process,
define process variables initial values (expressions) with contract inputs.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
startProcessWithInputs(long, Map)
instead. The best practice is to define
contract inputs in the process definition, and use these contract inputs in operations, instead of providing operations at start time.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
startProcessWithInputs(long, long, Map)
instead.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
startProcessWithInputs(long, long, Map)
instead. The best practice is to design contract inputs in the process definition, and use these
contract inputs in operations, instead of providing operations at start time.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.ProcessInstance startProcess(long userId, long processDefinitionId, Map<String,Serializable> initialVariables) throws ProcessDefinitionNotFoundException, ProcessActivationException, ProcessExecutionException
startProcessWithInputs(long, long, Map)
instead, using contract inputs stored in process variables, instead of using directly initialVariables.userId
- The identifier of the user.processDefinitionId
- The identifier of the process definition for which an instance will be started.initialVariables
- The couples of initial variable/valueInvalidSessionException
- 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.ProcessExecutionException
- If a problem occurs when starting the process.ProcessInstance startProcessWithInputs(long processDefinitionId, Map<String,Serializable> instantiationInputs) throws ProcessDefinitionNotFoundException, ProcessActivationException, ProcessExecutionException, ContractViolationException
ContractDefinition
for details on contracts.processDefinitionId
- The identifier of the process definition for which an instance will be started.instantiationInputs
- The couples of input name/value that allows to start a process with an instantiation contract.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.ProcessExecutionException
- If a problem occurs when starting the process.ContractViolationException
- If inputs don't fit with task contractProcessInstance startProcessWithInputs(long userId, long processDefinitionId, Map<String,Serializable> instantiationInputs) throws ProcessDefinitionNotFoundException, ProcessActivationException, ProcessExecutionException, ContractViolationException
ContractDefinition
for details on contracts.userId
- The identifier of the user in the name of whom the process is started.processDefinitionId
- The identifier of the process definition for which an instance will be started.instantiationInputs
- The couples of input name/value that allows to start a process with an instantiation contract.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.ProcessExecutionException
- If a problem occurs when starting the process.ContractViolationException
- If inputs don't fit with process contractvoid executeFlowNode(long flownodeInstanceId) throws FlowNodeExecutionException
Executes a flow node that is in a stable state. Will move the activity to the next stable state and then continue the execution of the process.
Use this method only if you need to manually control the execution of a flownode.
DO NOT USE THIS TO EXECUTE HUMAN TASKS. Use executeUserTask(long, Map)
instead.
flownodeInstanceId
- The identifier of the flow node to execute.FlowNodeExecutionException
- If an execution exception occurs.void executeFlowNode(long userId, long flownodeInstanceId) throws FlowNodeExecutionException
Executes a flow node that is in a 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. The user, who executed the flow node on behalf of a given user, is declared as a executer delegate.
Use this method only if you need to manually control the execution of a flownode.
DO NOT USE THIS TO EXECUTE HUMAN TASKS. Use executeUserTask(long, long, Map)
instead.
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 sourceActivityInstanceId) throws ActivityInstanceNotFoundException
sourceActivityInstanceId
- The identifier of the source 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
.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 assignUserTaskIfNotAssigned(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
updateActivityInstanceVariables(List, long, Map)
insteaddataName
- 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.void updateActivityTransientDataInstance(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.List<DataInstance> getActivityTransientDataInstances(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 getActivityTransientDataInstance(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.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 sourceProcessInstanceId) throws ArchivedProcessInstanceNotFoundException
sourceProcessInstanceId
- The identifier of the source process instance, i.e. not an archived version, the original process instance id.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. See
HumanTaskInstanceSearchDescriptor
for valid
fields
for searching and sorting.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. See
HumanTaskInstanceSearchDescriptor
for valid fields for searching and sorting.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. See
HumanTaskInstanceSearchDescriptor
for valid fields for searching and sorting.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. See
HumanTaskInstanceSearchDescriptor
for valid fields for searching and sorting.SearchException
- If there is an error in the search conditions.SearchResult<HumanTaskInstance> searchPendingTasksAssignedToUser(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. See
HumanTaskInstanceSearchDescriptor
for valid fields for searching and sorting.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. See
HumanTaskInstanceSearchDescriptor
for valid fields for searching and sorting.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If there is an error in the search conditions.SearchResult<HumanTaskInstance> searchAssignedAndPendingHumanTasksFor(long rootProcessDefinitionId, long userId, SearchOptions searchOptions) throws SearchException
rootProcessDefinitionId
- The identifier of the root process definitionuserId
- The identifier of the usersearchOptions
- The search conditions and the options for sorting and paging the results. See
HumanTaskInstanceSearchDescriptor
for valid fields for searching and sorting.SearchException
- If there is an error in the search conditions.SearchResult<HumanTaskInstance> searchAssignedAndPendingHumanTasks(long rootProcessDefinitionId, SearchOptions searchOptions) throws SearchException
rootProcessDefinitionId
- The identifier of the root process definitionsearchOptions
- The search conditions and the options for sorting and paging the results. See
HumanTaskInstanceSearchDescriptor
for valid fields for searching and sorting.SearchException
- If there is an error in the search conditions.SearchResult<HumanTaskInstance> searchAssignedAndPendingHumanTasks(SearchOptions searchOptions) throws SearchException
searchOptions
- The search conditions and the options for sorting and paging the results. See
HumanTaskInstanceSearchDescriptor
for valid fields for searching and sorting.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 root 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
FlowNodeInstance
to its previous state and then execute it. Pre-condition: the
FlowNodeInstance
must be in state FAILED. If this condition is not respected, a ActivityExecutionException is thrown.
If the FlowNodeInstance
contains failed ConnectorInstance
s, they will be re-executed. In the case
where the connector execution fails again, the FlowNodeInstance
will remain in failed state. There is not counter on the number of
re-executions
activityInstanceId
- The identifier of the FlowNodeInstance
to be re-retried.InvalidSessionException
- when session is invalid, e.g. the session has expired.ActivityInstanceNotFoundException
- when no FlowNodeInstance
is found with the specified identifier.ActivityExecutionException
- occurs if the current Flownode is not in FAILED state, or while resetting the state, or while executing the FlowNodeInstance
.FlowNodeInstance
,
ConnectorInstance
void executeMessageCouple(long messageInstanceId, long waitingMessageEventId) throws ExecutionException
messageInstanceId
- the ID of the message instance to try to trigger again.waitingMessageEventId
- the ID of the waiting message event to try to trigger again.ExecutionException
- if the execution failed. A more precise cause is given in the getCause() method.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.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. Optional parameter that can be used to explicitly set the target flow node if the
message is caught by different flow nodes in the same process. If not necessary, pass null value.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. Optional parameter that can be used to explicitly set the target flow node if the
message is caught by different flow nodes in the same process. If not necessary, pass null value.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. See
ConnectorInstancesSearchDescriptor
for valid fields for searching and sorting.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 parameters. See ArchiveConnectorInstancesSearchDescriptor
for valid fields for
searching and sorting.SearchResult
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 rootProcessInstanceId, String taskName, int startIndex, int maxResults)
rootProcessInstanceId
- The identifier of the root 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 rootProcessInstanceId, String taskName) throws NotFoundException
rootProcessInstanceId
- The identifier of the root 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. See
ArchivedActivityInstanceSearchDescriptor
for valid fields for searching and sorting.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. See ActivityInstanceSearchDescriptor
for valid
fields for searching and sorting.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. See FlowNodeInstanceSearchDescriptor
for valid
fields for searching and sorting.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. See ArchivedFlowNodeInstanceSearchDescriptor
for
valid fields for searching and sorting.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. See HumanTaskInstanceSearchDescriptor
for valid fields for
searching and sorting.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. See SearchCommentsDescriptor
for valid fields for searching
and sorting.InvalidSessionException
- If the session is invalid, e.g. the session has expired.SearchException
- If an exception occurs during the search.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).Comment addProcessCommentOnBehalfOfUser(long processInstanceId, String comment, long userId) throws CreationException
processInstanceId
- The identifier of the process instance.comment
- The content of the comment.userId
- The user that will be said to have made the commentInvalidSessionException
- 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. See SearchCommentsDescriptor
for valid fields for searching and
sorting.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. See SearchCommentsDescriptor
for valid fields for searching and
sorting.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 instance.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.isManagerOfUserInvolvedInProcessInstance(long, long)
boolean isInvolvedInHumanTaskInstance(long userId, long humanTaskInstanceId) throws ActivityInstanceNotFoundException, UserNotFoundException
userId
- The identifier of the user.humanTaskInstanceId
- The identifier of the human task instance.InvalidSessionException
- If the session is invalid, e.g. the session has expired.ActivityInstanceNotFoundException
- If there is no the human task instance with the specified identifier.UserNotFoundException
isManagerOfUserInvolvedInProcessInstance(long, long)
boolean isManagerOfUserInvolvedInProcessInstance(long managerUserId, long processInstanceId) throws BonitaException
managerUserId
- the ID of the manager of the user involved.processInstanceId
- the ID of the process instance we are interested in.ProcessInstanceNotFoundException
- if the process instance does not exist.BonitaException
- if an error occurred while searching for users involved.isInvolvedInProcessInstance(long, long)
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. See ArchivedCommentsSearchDescriptor
for valid fields for
searching and sorting.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. See ArchivedHumanTaskInstanceSearchDescriptor
for valid fields
for searching and sorting.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. See ProcessInstanceSearchDescriptor
for valid fields
for searching and sorting.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). See ProcessInstanceSearchDescriptor
for valid
fields for searching and sorting.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).ArchivedProcessInstancesSearchDescriptor
for valid fields for searching and sorting.SearchException
- If the search could not be full filled 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). See ArchivedProcessInstancesSearchDescriptor
for
valid fields for searching and sorting.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). See ArchivedProcessInstancesSearchDescriptor
for
valid fields for searching and sorting.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). See ArchivedProcessInstancesSearchDescriptor
for
valid fields for searching and sorting.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). See HumanTaskInstanceSearchDescriptor
for valid
fields for searching and sorting.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). See HumanTaskInstanceSearchDescriptor
for valid
fields for searching and sorting.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). See ArchivedHumanTaskInstanceSearchDescriptor
for
valid fields for searching and sorting.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 sourceProcessInstanceId) throws ArchivedDataNotFoundException
dataName
- The name of the datasourceProcessInstanceId
- The identifier of the source process instance (used as root container id of the archived activity instances).InvalidSessionException
- If the session is invalid (expired, unknown, ...)ArchivedDataNotFoundException
- If the specified data cannot be found.ArchivedDataInstance getArchivedActivityDataInstance(String dataName, long sourceActivityInstanceId) throws ArchivedDataNotFoundException
dataName
- The name of the datasourceActivityInstanceId
- The identifier of the source activity instanceInvalidSessionException
- If the session is invalid (expired, unknown, ...)ArchivedDataNotFoundException
- If the specified data cannot be foundList<ArchivedDataInstance> getArchivedProcessDataInstances(long sourceProcessInstanceId, int startIndex, int maxResults)
sourceProcessInstanceId
- The identifier of the source process instance (used as root container id of the archived activity instances).startIndex
- 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 sourceActivityInstanceId, int startIndex, int maxResults)
sourceActivityInstanceId
- The identifier of the source 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 usersSearchResult<User> searchUsersWhoCanExecutePendingHumanTask(long humanTaskInstanceId, SearchOptions searchOptions)
humanTaskInstanceId
- The identifier of the human task instancesearchOptions
- the search options. See UserSearchDescriptor
for valid fields for searching and sorting.InvalidSessionException
- If the session is invalid (expired, unknown, ...)RetrieveException
- If an exception occurs while retrieving the usersSearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor(long userId, SearchOptions searchOptions) throws SearchException
userId
- The identifier of the user.searchOptions
- The search criterion. See ProcessDeploymentInfoSearchDescriptor
for valid fields for searching and
sorting.SearchException
- if an exception occurs when getting the process deployment information.SearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy(long supervisorId, SearchOptions searchOptions) throws SearchException
supervisorId
- The identifier of the user.searchOptions
- The search criterion. See ProcessDeploymentInfoSearchDescriptor
for valid fields for searching and
sorting.SearchException
- if an exception occurs when getting the process deployment information.SearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfosWithAssignedOrPendingHumanTasks(SearchOptions searchOptions) throws SearchException
searchOptions
- The search criterion. See ProcessDeploymentInfoSearchDescriptor
for valid fields for searching and
sorting.SearchException
- If an exception occurs when getting the process deployment information.Map<String,Map<String,Long>> getFlownodeStateCounters(long processInstanceId)
processInstanceId
- ID of the process instance of which to retrieve the current indicators.SearchResult<TimerEventTriggerInstance> searchTimerEventTriggerInstances(long processInstanceId, SearchOptions searchOptions) throws SearchException
TimerEventTriggerInstance
on the specific ProcessInstance
.searchOptions
- The search criterion.SearchException
- If an exception occurs when getting the timer event triggers.Date updateExecutionDateOfTimerEventTriggerInstance(long timerEventTriggerInstanceId, Date executionDate) throws TimerEventTriggerInstanceNotFoundException, UpdateException
TimerEventTriggerInstance
.timerEventTriggerInstanceId
- The identifier of the TimerEventTriggerInstance
to updateexecutionDate
- The new date of the execution of the TimerEventTriggerInstance
TimerEventTriggerInstanceNotFoundException
- If the TimerEventTriggerInstance
doesn't existUpdateException
- If an exception occurs when updating the TimerEventTriggerInstance
ContractDefinition getUserTaskContract(long userTaskId) throws UserTaskNotFoundException
userTaskId
- the identifier of the user task.UserTaskNotFoundException
- if identifier does not refer to a real user task.ContractDefinition getProcessContract(long processDefinitionId) throws ProcessDefinitionNotFoundException
processDefinitionId
- the identifier of the process definition.ProcessDefinitionNotFoundException
- if identifier does not refer to an existing process definition.void executeUserTask(long userTaskInstanceId, Map<String,Serializable> inputs) throws UserTaskNotFoundException, ContractViolationException, FlowNodeExecutionException
userTaskInstanceId
- The identifier of the user task to execute.inputs
- the inputs used for user task executionUserTaskNotFoundException
- If user task to execute is not foundContractViolationException
- If inputs don't fit with task contractFlowNodeExecutionException
- If an execution exception occursvoid executeUserTask(long userId, long userTaskInstanceId, Map<String,Serializable> inputs) throws UserTaskNotFoundException, ContractViolationException, FlowNodeExecutionException
userId
- The identifier of the user for which you want to execute the flow nodeuserTaskInstanceId
- The identifier of the user task to executeinputs
- the input used for user task executionUserTaskNotFoundException
- If user task to execute is not foundContractViolationException
- If inputs don't fit with task contractFlowNodeExecutionException
- If an execution exception occursSerializable getUserTaskContractVariableValue(long userTaskInstanceId, String name) throws ContractDataNotFoundException
userTaskInstanceId
- The identifier of the user taskname
- The name of the variableContractDataNotFoundException
- if no data found for the given user task instance and name.Serializable getProcessInputValueDuringInitialization(long processInstanceId, String name) throws ContractDataNotFoundException
processInstanceId
- The identifier of the process instancename
- The name of the process input to retrieveContractDataNotFoundException
- if no data found for the given process instance and name.Serializable getProcessInputValueAfterInitialization(long processInstanceId, String name) throws ContractDataNotFoundException
processInstanceId
- The identifier of the process instancename
- The name of the process input to retrieveContractDataNotFoundException
- if identifier does not refer to an existing process instance.Map<String,Serializable> getUserTaskExecutionContext(long userTaskInstanceId) throws UserTaskNotFoundException, ExpressionEvaluationException
BusinessDataReference
,
SimpleBusinessDataReference
and MultipleBusinessDataReference
).
Key of
data reference is the name of the business data as declared in process definition followed by "_ref".
Document
). Naming convention is the same as for business data ("_ref" suffix).
BusinessDataReference
). By default: multiInstanceIterator_ref. Only exist if iterator value is set using
a business variable.
userTaskInstanceId
- the id of the user task instanceUserTaskNotFoundException
- if userTaskInstanceId
does not reference any existing task.ExpressionEvaluationException
Map<String,Serializable> getArchivedUserTaskExecutionContext(long archivedUserTaskInstanceId) throws UserTaskNotFoundException, ExpressionEvaluationException
BusinessDataReference
,
SimpleBusinessDataReference
and MultipleBusinessDataReference
).
Key of
data reference is the name of the business data as declared in process definition followed by "_ref".
Document
). Naming convention is the same as for business data ("_ref" suffix).
BusinessDataReference
). By default: multiInstanceIterator_ref. Only exist if iterator value is set using
a business variable.
archivedUserTaskInstanceId
- the id of the archived version of the user task instanceUserTaskNotFoundException
- if archivedUserTaskInstanceId
does not reference any existing archived task.ExpressionEvaluationException
Map<String,Serializable> getProcessInstanceExecutionContext(long processInstanceId) throws ProcessInstanceNotFoundException, ExpressionEvaluationException
BusinessDataReference
,
SimpleBusinessDataReference
and MultipleBusinessDataReference
).
Key of
data reference is the name of the business data as declared in process definition followed by "_ref".
Document
). Naming convention is the same as for business data ("_ref" suffix).
processInstanceId
- the id of the process instanceProcessInstanceNotFoundException
- if processInstanceId
does not reference any existing process.ExpressionEvaluationException
Map<String,Serializable> getArchivedProcessInstanceExecutionContext(long archivedProcessInstanceId) throws ProcessInstanceNotFoundException, ExpressionEvaluationException
BusinessDataReference
,
SimpleBusinessDataReference
and MultipleBusinessDataReference
).
Key of
data reference is the name of the business data as declared in process definition followed by "_ref".
Document
). Naming convention is the same as for business data ("_ref" suffix).
archivedProcessInstanceId
- the id of the archived version of a process instance. You can use getFinalArchivedProcessInstance(long)
to get
the id of an archived instance based on the id of the same instance while it was running.ProcessInstanceNotFoundException
- if archivedProcessInstanceId
does not reference any existing process.ExpressionEvaluationException
Copyright © 2019 Bonitasoft S.A.. All rights reserved.