Package org.flowable.engine.impl
Class TaskServiceImpl
java.lang.Object
org.flowable.common.engine.impl.service.CommonServiceImpl<C>
org.flowable.common.engine.impl.service.CommonEngineServiceImpl<ProcessEngineConfigurationImpl>
org.flowable.engine.impl.TaskServiceImpl
- All Implemented Interfaces:
TaskService
public class TaskServiceImpl
extends CommonEngineServiceImpl<ProcessEngineConfigurationImpl>
implements TaskService
- Author:
- Tom Baeyens, Joram Barrez
-
Field Summary
Fields inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
commandExecutorFields inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
configuration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateTask(String taskId, String userId) Activates the task.voidaddCandidateGroup(String taskId, String groupId) Convenience shorthand forTaskService.addGroupIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATEvoidaddCandidateUser(String taskId, String userId) Convenience shorthand forTaskService.addUserIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATEaddComment(String taskId, String processInstance, String message) Add a comment to a task and/or process instance.addComment(String taskId, String processInstance, String type, String message) Add a comment to a task and/or process instance with a custom type.voidaddGroupIdentityLink(String taskId, String groupId, String identityLinkType) Involves a group with a task.voidaddUserIdentityLink(String taskId, String userId, String identityLinkType) Involves a user with a task.voidbulkSaveTasks(Collection<Task> taskList) Saves the given tasks to the persistent data store.voidClaim responsibility for a task: the given user is made assignee for the task.voidCalled when the task is successfully executed.voidCalled when the task is successfully executed.voidCalled when the task is successfully executed, and the required task parameters are given by the end-user.voidCalled when the task is successfully executed, and the required task parameters are given by the end-user.voidcomplete(String taskId, String userId, Map<String, Object> variables, Map<String, Object> transientVariables) Similar toTaskService.complete(String, String, Map), but allows to set transient variables too.voidCalled when the task is successfully executed, and the required task parameters are given by the end-user.voidCalled when the task is successfully executed, and the required task parameters are given by the end-user.voidSimilar toTaskService.complete(String, Map), but allows to set transient variables too.voidcompleteTaskWithForm(String taskId, String formDefinitionId, String outcome, String userId, Map<String, Object> variables) Called when the task is successfully executed, and the task form has been submitted.voidcompleteTaskWithForm(String taskId, String formDefinitionId, String outcome, String userId, Map<String, Object> variables, boolean localScope) Called when the task is successfully executed, and the task form has been submitted.voidcompleteTaskWithForm(String taskId, String formDefinitionId, String outcome, String userId, Map<String, Object> variables, Map<String, Object> transientVariables) Called when the task is successfully executed, and the task form has been submitted.voidcompleteTaskWithForm(String taskId, String formDefinitionId, String outcome, Map<String, Object> variables) Called when the task is successfully executed, and the task form has been submitted.voidcompleteTaskWithForm(String taskId, String formDefinitionId, String outcome, Map<String, Object> variables, boolean localScope) Called when the task is successfully executed, and the task form has been submitted.voidcompleteTaskWithForm(String taskId, String formDefinitionId, String outcome, Map<String, Object> variables, Map<String, Object> transientVariables) Called when the task is successfully executed, and the task form has been submitted.createAttachment(String attachmentType, String taskId, String processInstanceId, String attachmentName, String attachmentDescription, InputStream content) Add a new attachment to a task and/or a process instance and use an input stream to provide the contentcreateAttachment(String attachmentType, String taskId, String processInstanceId, String attachmentName, String attachmentDescription, String url) Add a new attachment to a task and/or a process instance and use an url as the contentReturns a newNativeQueryfor tasks.Create a builder for the taskCreate a completion builder for the taskReturns a newTaskQuerythat can be used to dynamically query tasks.voiddelegateTask(String taskId, String userId) Delegates the task to another user.voiddeleteAttachment(String attachmentId) Delete an attachmentvoiddeleteCandidateGroup(String taskId, String groupId) Convenience shorthand forTaskService.deleteGroupIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATEvoiddeleteCandidateUser(String taskId, String userId) Convenience shorthand forTaskService.deleteUserIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATEvoiddeleteComment(String commentId) Removes an individual comment with the given id.voiddeleteComments(String taskId, String processInstanceId) Removes all comments from the provided task and/or process instancevoiddeleteGroupIdentityLink(String taskId, String groupId, String identityLinkType) Removes the association between a group and a task for the given identityLinkType.voiddeleteTask(String taskId) Deletes the given task, not deleting historic information that is related to this task.voiddeleteTask(String taskId, boolean cascade) Deletes the given task.voiddeleteTask(String taskId, String deleteReason) Deletes the given task, not deleting historic information that is related to this task..voiddeleteTasks(Collection<String> taskIds) Deletes all tasks of the given collection, not deleting historic information that is related to these tasks.voiddeleteTasks(Collection<String> taskIds, boolean cascade) Deletes all tasks of the given collection.voiddeleteTasks(Collection<String> taskIds, String deleteReason) Deletes all tasks of the given collection, not deleting historic information that is related to these tasks.voiddeleteUserIdentityLink(String taskId, String userId, String identityLinkType) Removes the association between a user and a task for the given identityLinkType.getAttachment(String attachmentId) Retrieve a particular attachmentgetAttachmentContent(String attachmentId) Retrieve stream content of a particular attachmentgetComment(String commentId) Returns an individual comment with the given id.getCommentsByType(String type) All comments of a given type.getDataObject(String taskId, String dataObject) The DataObject.getDataObject(String taskId, String dataObjectName, String locale, boolean withLocalizationFallback) The DataObject.getDataObjects(String taskId) All DataObjects visible from the given execution scope (including parent scopes).getDataObjects(String taskId, String locale, boolean withLocalizationFallback) All DataObjects visible from the given task scope (including parent scopes).getDataObjects(String taskId, Collection<String> dataObjectNames) The DataObjects for all given dataObjectNames, takes all dataObjects into account which are visible from the given task scope (including parent scopes).getDataObjects(String taskId, Collection<String> dataObjectNames, String locale, boolean withLocalizationFallback) The DataObjects for all given dataObjectNames, takes all dataObjects into account which are visible from the given task scope (including parent scopes).Returns an individual event with the given id.getIdentityLinksForTask(String taskId) Retrieves theIdentityLinks associated with the given task.protected IdmIdentityServicegetProcessInstanceAttachments(String processInstanceId) The list of attachments associated to a process instancegetProcessInstanceComments(String processInstanceId) The comments related to the given process instance.getProcessInstanceComments(String processInstanceId, String type) The comments related to the given process instance.getSubTasks(String parentTaskId) The list of subtasks for this parent taskgetTaskAttachments(String taskId) The list of attachments associated to a taskgetTaskComments(String taskId) The comments related to the given task.getTaskComments(String taskId, String type) The comments related to the given task of the given type.getTaskEvents(String taskId) The all events related to the given task.getTaskFormModel(String taskId) Gets a Form model instance of the task form of a specific taskgetTaskFormModel(String taskId, boolean ignoreVariables) Gets a Form model instance of the task form of a specific task without any variable handlinggetVariable(String taskId, String variableName) get a variables and search in the task scope and if available also the execution scopes.<T> TgetVariable(String taskId, String variableName, Class<T> variableClass) get a variables and search in the task scope and if available also the execution scopes.getVariableInstance(String taskId, String variableName) The variable.getVariableInstanceLocal(String taskId, String variableName) The variable for a task.getVariableInstances(String taskId) All variables visible from the given task scope (including parent scopes).getVariableInstances(String taskId, Collection<String> variableNames) The variable values for all given variableNames, takes all variables into account which are visible from the given task scope (including parent scopes).getVariableInstancesLocal(String taskId) All variable values that are defined in the task scope, without taking outer scopes into account.getVariableInstancesLocal(String taskId, Collection<String> variableNames) The variable values for all given variableNames that are defined in the given task's scope.getVariableInstancesLocalByTaskIds(Set<String> taskIds) get all variables and search only in the task scope.getVariableLocal(String taskId, String variableName) checks whether or not the task has a variable defined with the given name.<T> TgetVariableLocal(String taskId, String variableName, Class<T> variableClass) checks whether or not the task has a variable defined with the given name.getVariables(String taskId) get all variables and search in the task scope and if available also the execution scopes.getVariables(String taskId, Collection<String> variableNames) get values for all given variableNames and search only in the task scope.getVariablesLocal(String taskId) get all variables and search only in the task scope.getVariablesLocal(String taskId, Collection<String> variableNames) get a variable on a taskbooleanhasVariable(String taskId, String variableName) checks whether or not the task has a variable defined with the given name, in the task scope and if available also the execution scopes.booleanhasVariableLocal(String taskId, String variableName) checks whether or not the task has a variable defined with the given name, local task scope only.newTask()Creates a new task that is not related to any process instance.create a new task with a user defined task idvoidremoveVariable(String taskId, String variableName) Removes the variable from the task.voidremoveVariableLocal(String taskId, String variableName) Removes the variable from the task (not considering parent scopes).voidremoveVariables(String taskId, Collection<String> variableNames) Removes all variables in the given collection from the task.voidremoveVariablesLocal(String taskId, Collection<String> variableNames) Removes all variables in the given collection from the task (not considering parent scopes).voidresolveTask(String taskId) Marks that the assignee is done with this task and that it can be send back to the owner.voidresolveTask(String taskId, Map<String, Object> variables) Marks that the assignee is done with this task providing the required variables and that it can be sent back to the owner.voidSimilar toTaskService.resolveTask(String, Map), but allows to set transient variables too.voidsaveAttachment(Attachment attachment) Update the name and description of an attachmentvoidsaveComment(Comment comment) Update a comment to a task and/or process instance.voidSaves the given task to the persistent data store.voidsetAssignee(String taskId, String userId) Changes the assignee of the given task to the given userId.voidsetDueDate(String taskId, Date dueDate) Changes the due date of the taskvoidTransfers ownership of this task to another user.voidsetPriority(String taskId, int priority) Changes the priority of the task.voidsetVariable(String taskId, String variableName, Object value) set variable on a task.voidsetVariableLocal(String taskId, String variableName, Object value) set variable on a task.voidsetVariables(String taskId, Map<String, ? extends Object> variables) set variables on a task.voidsetVariablesLocal(String taskId, Map<String, ? extends Object> variables) set variables on a task.voidstartProgress(String taskId, String userId) Set the task state to in progress.voidsuspendTask(String taskId, String userId) Suspends the task.voidA shortcut toTaskService.claim(java.lang.String, java.lang.String)with null user in order to unclaim the taskMethods inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
getCommandExecutor, setCommandExecutorMethods inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
getConfiguration
-
Constructor Details
-
TaskServiceImpl
-
-
Method Details
-
newTask
Description copied from interface:TaskServiceCreates a new task that is not related to any process instance. The returned task is transient and must be saved withTaskService.saveTask(Task)'manually'.- Specified by:
newTaskin interfaceTaskService
-
newTask
Description copied from interface:TaskServicecreate a new task with a user defined task id- Specified by:
newTaskin interfaceTaskService
-
saveTask
Description copied from interface:TaskServiceSaves the given task to the persistent data store. If the task is already present in the persistent store, it is updated. After a new task has been saved, the task instance passed into this method is updated with the id of the newly created task.- Specified by:
saveTaskin interfaceTaskService- Parameters:
task- the task, cannot be null.
-
bulkSaveTasks
Description copied from interface:TaskServiceSaves the given tasks to the persistent data store. If the tasks are already present in the persistent store, it is updated. After a new task has been saved, the task instance passed into this method is updated with the id of the newly created task.- Specified by:
bulkSaveTasksin interfaceTaskService- Parameters:
taskList- the list of task instances, cannot be null.
-
deleteTask
Description copied from interface:TaskServiceDeletes the given task, not deleting historic information that is related to this task.- Specified by:
deleteTaskin interfaceTaskService- Parameters:
taskId- The id of the task that will be deleted, cannot be null. If no task exists with the given taskId, the operation is ignored.
-
deleteTasks
Description copied from interface:TaskServiceDeletes all tasks of the given collection, not deleting historic information that is related to these tasks.- Specified by:
deleteTasksin interfaceTaskService- Parameters:
taskIds- The id's of the tasks that will be deleted, cannot be null. All id's in the list that don't have an existing task will be ignored.
-
deleteTask
Description copied from interface:TaskServiceDeletes the given task.- Specified by:
deleteTaskin interfaceTaskService- Parameters:
taskId- The id of the task that will be deleted, cannot be null. If no task exists with the given taskId, the operation is ignored.cascade- If cascade is true, also the historic information related to this task is deleted.
-
deleteTasks
Description copied from interface:TaskServiceDeletes all tasks of the given collection.- Specified by:
deleteTasksin interfaceTaskService- Parameters:
taskIds- The id's of the tasks that will be deleted, cannot be null. All id's in the list that don't have an existing task will be ignored.cascade- If cascade is true, also the historic information related to this task is deleted.
-
deleteTask
Description copied from interface:TaskServiceDeletes the given task, not deleting historic information that is related to this task..- Specified by:
deleteTaskin interfaceTaskService- Parameters:
taskId- The id of the task that will be deleted, cannot be null. If no task exists with the given taskId, the operation is ignored.deleteReason- reason the task is deleted. Is recorded in history, if enabled.
-
deleteTasks
Description copied from interface:TaskServiceDeletes all tasks of the given collection, not deleting historic information that is related to these tasks.- Specified by:
deleteTasksin interfaceTaskService- Parameters:
taskIds- The id's of the tasks that will be deleted, cannot be null. All id's in the list that don't have an existing task will be ignored.deleteReason- reason the task is deleted. Is recorded in history, if enabled.
-
setAssignee
Description copied from interface:TaskServiceChanges the assignee of the given task to the given userId. No check is done whether the user is known by the identity component.- Specified by:
setAssigneein interfaceTaskService- Parameters:
taskId- id of the task, cannot be null.userId- id of the user to use as assignee.
-
setOwner
Description copied from interface:TaskServiceTransfers ownership of this task to another user. No check is done whether the user is known by the identity component.- Specified by:
setOwnerin interfaceTaskService- Parameters:
taskId- id of the task, cannot be null.userId- of the person that is receiving ownership.
-
addCandidateUser
Description copied from interface:TaskServiceConvenience shorthand forTaskService.addUserIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATE- Specified by:
addCandidateUserin interfaceTaskService- Parameters:
taskId- id of the task, cannot be null.userId- id of the user to use as candidate, cannot be null.
-
addCandidateGroup
Description copied from interface:TaskServiceConvenience shorthand forTaskService.addGroupIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATE- Specified by:
addCandidateGroupin interfaceTaskService- Parameters:
taskId- id of the task, cannot be null.groupId- id of the group to use as candidate, cannot be null.
-
addUserIdentityLink
Description copied from interface:TaskServiceInvolves a user with a task. The type of identity link is defined by the given identityLinkType.- Specified by:
addUserIdentityLinkin interfaceTaskService- Parameters:
taskId- id of the task, cannot be null.userId- id of the user involve, cannot be null.identityLinkType- type of identityLink, cannot be null (@seeIdentityLinkType).
-
addGroupIdentityLink
Description copied from interface:TaskServiceInvolves a group with a task. The type of identityLink is defined by the given identityLink.- Specified by:
addGroupIdentityLinkin interfaceTaskService- Parameters:
taskId- id of the task, cannot be null.groupId- id of the group to involve, cannot be null.identityLinkType- type of identity, cannot be null (@seeIdentityLinkType).
-
deleteCandidateGroup
Description copied from interface:TaskServiceConvenience shorthand forTaskService.deleteGroupIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATE- Specified by:
deleteCandidateGroupin interfaceTaskService- Parameters:
taskId- id of the task, cannot be null.groupId- id of the group to use as candidate, cannot be null.
-
deleteCandidateUser
Description copied from interface:TaskServiceConvenience shorthand forTaskService.deleteUserIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATE- Specified by:
deleteCandidateUserin interfaceTaskService- Parameters:
taskId- id of the task, cannot be null.userId- id of the user to use as candidate, cannot be null.
-
deleteGroupIdentityLink
Description copied from interface:TaskServiceRemoves the association between a group and a task for the given identityLinkType.- Specified by:
deleteGroupIdentityLinkin interfaceTaskService- Parameters:
taskId- id of the task, cannot be null.groupId- id of the group to involve, cannot be null.identityLinkType- type of identity, cannot be null (@seeIdentityLinkType).
-
deleteUserIdentityLink
Description copied from interface:TaskServiceRemoves the association between a user and a task for the given identityLinkType.- Specified by:
deleteUserIdentityLinkin interfaceTaskService- Parameters:
taskId- id of the task, cannot be null.userId- id of the user involve, cannot be null.identityLinkType- type of identityLink, cannot be null (@seeIdentityLinkType).
-
getIdentityLinksForTask
Description copied from interface:TaskServiceRetrieves theIdentityLinks associated with the given task. Such anIdentityLinkinforms how a certain identity (eg. group or user) is associated with a certain task (eg. as candidate, assignee, etc.)- Specified by:
getIdentityLinksForTaskin interfaceTaskService
-
claim
Description copied from interface:TaskServiceClaim responsibility for a task: the given user is made assignee for the task. The difference withTaskService.setAssignee(String, String)is that here a check is done if the task already has a user assigned to it. No check is done whether the user is known by the identity component.- Specified by:
claimin interfaceTaskService- Parameters:
taskId- task to claim, cannot be null.userId- user that claims the task. When userId is null the task is unclaimed, assigned to no one.
-
unclaim
Description copied from interface:TaskServiceA shortcut toTaskService.claim(java.lang.String, java.lang.String)with null user in order to unclaim the task- Specified by:
unclaimin interfaceTaskService- Parameters:
taskId- task to unclaim, cannot be null.
-
startProgress
Description copied from interface:TaskServiceSet the task state to in progress. No check is done whether the user is known by the identity component.- Specified by:
startProgressin interfaceTaskService- Parameters:
taskId- task to change the state, cannot be null.userId- user that puts the task in progress.
-
suspendTask
Description copied from interface:TaskServiceSuspends the task. No check is done whether the user is known by the identity component.- Specified by:
suspendTaskin interfaceTaskService- Parameters:
taskId- task to suspend, cannot be null.userId- user that suspends the task.
-
activateTask
Description copied from interface:TaskServiceActivates the task. No check is done whether the user is known by the identity component.- Specified by:
activateTaskin interfaceTaskService- Parameters:
taskId- task to activate, cannot be null.userId- user that activates the task.
-
complete
Description copied from interface:TaskServiceCalled when the task is successfully executed.- Specified by:
completein interfaceTaskService- Parameters:
taskId- the id of the task to complete, cannot be null.
-
complete
Description copied from interface:TaskServiceCalled when the task is successfully executed.- Specified by:
completein interfaceTaskService- Parameters:
taskId- the id of the task to complete, cannot be null.userId- user that completes the task.
-
complete
Description copied from interface:TaskServiceCalled when the task is successfully executed, and the required task parameters are given by the end-user.- Specified by:
completein interfaceTaskService- Parameters:
taskId- the id of the task to complete, cannot be null.variables- task parameters. May be null or empty.
-
complete
Description copied from interface:TaskServiceCalled when the task is successfully executed, and the required task parameters are given by the end-user.- Specified by:
completein interfaceTaskService- Parameters:
taskId- the id of the task to complete, cannot be null.userId- user that completes the task.variables- task parameters. May be null or empty.
-
complete
public void complete(String taskId, Map<String, Object> variables, Map<String, Object> transientVariables) Description copied from interface:TaskServiceSimilar toTaskService.complete(String, Map), but allows to set transient variables too.- Specified by:
completein interfaceTaskService
-
complete
public void complete(String taskId, String userId, Map<String, Object> variables, Map<String, Object> transientVariables) Description copied from interface:TaskServiceSimilar toTaskService.complete(String, String, Map), but allows to set transient variables too.- Specified by:
completein interfaceTaskService
-
complete
Description copied from interface:TaskServiceCalled when the task is successfully executed, and the required task parameters are given by the end-user.- Specified by:
completein interfaceTaskService- Parameters:
taskId- the id of the task to complete, cannot be null.variables- task parameters. May be null or empty.localScope- If true, the provided variables will be stored task-local, instead of process instance wide (which is the default forTaskService.complete(String, Map)).
-
complete
public void complete(String taskId, String userId, Map<String, Object> variables, boolean localScope) Description copied from interface:TaskServiceCalled when the task is successfully executed, and the required task parameters are given by the end-user.- Specified by:
completein interfaceTaskService- Parameters:
taskId- the id of the task to complete, cannot be null.userId- user that completes the task.variables- task parameters. May be null or empty.localScope- If true, the provided variables will be stored task-local, instead of process instance wide (which is the default forTaskService.complete(String, Map)).
-
completeTaskWithForm
public void completeTaskWithForm(String taskId, String formDefinitionId, String outcome, Map<String, Object> variables) Description copied from interface:TaskServiceCalled when the task is successfully executed, and the task form has been submitted.- Specified by:
completeTaskWithFormin interfaceTaskService- Parameters:
taskId- the id of the task to complete, cannot be null.formDefinitionId- the id of the form definition that is filled-in to complete the task, cannot be null.outcome- the outcome of the completed form, can be null.variables- values of the completed form. May be null or empty.
-
completeTaskWithForm
public void completeTaskWithForm(String taskId, String formDefinitionId, String outcome, String userId, Map<String, Object> variables) Description copied from interface:TaskServiceCalled when the task is successfully executed, and the task form has been submitted.- Specified by:
completeTaskWithFormin interfaceTaskService- Parameters:
taskId- the id of the task to complete, cannot be null.formDefinitionId- the id of the form definition that is filled-in to complete the task, cannot be null.outcome- the outcome of the completed form, can be null.userId- user that completes the task.variables- values of the completed form. May be null or empty.
-
completeTaskWithForm
public void completeTaskWithForm(String taskId, String formDefinitionId, String outcome, Map<String, Object> variables, Map<String, Object> transientVariables) Description copied from interface:TaskServiceCalled when the task is successfully executed, and the task form has been submitted.- Specified by:
completeTaskWithFormin interfaceTaskService- Parameters:
taskId- the id of the task to complete, cannot be null.formDefinitionId- the id of the form definition that is filled-in to complete the task, cannot be null.outcome- the outcome of the completed form, can be null.variables- values of the completed form. May be null or empty.transientVariables- additional transient values that need to added to the process instance transient variables. May be null or empty.
-
completeTaskWithForm
public void completeTaskWithForm(String taskId, String formDefinitionId, String outcome, String userId, Map<String, Object> variables, Map<String, Object> transientVariables) Description copied from interface:TaskServiceCalled when the task is successfully executed, and the task form has been submitted.- Specified by:
completeTaskWithFormin interfaceTaskService- Parameters:
taskId- the id of the task to complete, cannot be null.formDefinitionId- the id of the form definition that is filled-in to complete the task, cannot be null.outcome- the outcome of the completed form, can be null.userId- user that completes the task.variables- values of the completed form. May be null or empty.transientVariables- additional transient values that need to added to the process instance transient variables. May be null or empty.
-
completeTaskWithForm
public void completeTaskWithForm(String taskId, String formDefinitionId, String outcome, Map<String, Object> variables, boolean localScope) Description copied from interface:TaskServiceCalled when the task is successfully executed, and the task form has been submitted.- Specified by:
completeTaskWithFormin interfaceTaskService- Parameters:
taskId- the id of the task to complete, cannot be null.formDefinitionId- the id of the form definition that is filled-in to complete the task, cannot be null.outcome- the outcome of the completed form, can be null.variables- values of the completed form. May be null or empty.localScope- If true, the provided variables will be stored task-local, instead of process instance wide (which is the default forTaskService.complete(String, Map)).
-
completeTaskWithForm
public void completeTaskWithForm(String taskId, String formDefinitionId, String outcome, String userId, Map<String, Object> variables, boolean localScope) Description copied from interface:TaskServiceCalled when the task is successfully executed, and the task form has been submitted.- Specified by:
completeTaskWithFormin interfaceTaskService- Parameters:
taskId- the id of the task to complete, cannot be null.formDefinitionId- the id of the form definition that is filled-in to complete the task, cannot be null.outcome- the outcome of the completed form, can be null.userId- user that completes the task.variables- values of the completed form. May be null or empty.localScope- If true, the provided variables will be stored task-local, instead of process instance wide (which is the default forTaskService.complete(String, Map)).
-
getTaskFormModel
Description copied from interface:TaskServiceGets a Form model instance of the task form of a specific task- Specified by:
getTaskFormModelin interfaceTaskService- Parameters:
taskId- id of the task, cannot be null.
-
getTaskFormModel
Description copied from interface:TaskServiceGets a Form model instance of the task form of a specific task without any variable handling- Specified by:
getTaskFormModelin interfaceTaskService- Parameters:
taskId- id of the task, cannot be null.ignoreVariables- should the variables be ignored when fetching the form model?
-
delegateTask
Description copied from interface:TaskServiceDelegates the task to another user. This means that the assignee is set and the delegation state is set toDelegationState.PENDING. If no owner is set on the task, the owner is set to the current assignee of the task.- Specified by:
delegateTaskin interfaceTaskService- Parameters:
taskId- The id of the task that will be delegated.userId- The id of the user that will be set as assignee.
-
resolveTask
Description copied from interface:TaskServiceMarks that the assignee is done with this task and that it can be send back to the owner. Can only be called when this task isDelegationState.PENDINGdelegation. After this method returns, thedelegationStateis set toDelegationState.RESOLVED.- Specified by:
resolveTaskin interfaceTaskService- Parameters:
taskId- the id of the task to resolve, cannot be null.
-
resolveTask
Description copied from interface:TaskServiceMarks that the assignee is done with this task providing the required variables and that it can be sent back to the owner. Can only be called when this task isDelegationState.PENDINGdelegation. After this method returns, thedelegationStateis set toDelegationState.RESOLVED.- Specified by:
resolveTaskin interfaceTaskService
-
resolveTask
public void resolveTask(String taskId, Map<String, Object> variables, Map<String, Object> transientVariables) Description copied from interface:TaskServiceSimilar toTaskService.resolveTask(String, Map), but allows to set transient variables too.- Specified by:
resolveTaskin interfaceTaskService
-
setPriority
Description copied from interface:TaskServiceChanges the priority of the task. Authorization: actual owner / business admin- Specified by:
setPriorityin interfaceTaskService- Parameters:
taskId- id of the task, cannot be null.priority- the new priority for the task.
-
setDueDate
Description copied from interface:TaskServiceChanges the due date of the task- Specified by:
setDueDatein interfaceTaskService- Parameters:
taskId- id of the task, cannot be null.dueDate- the new due date for the task
-
createTaskQuery
Description copied from interface:TaskServiceReturns a newTaskQuerythat can be used to dynamically query tasks.- Specified by:
createTaskQueryin interfaceTaskService
-
createNativeTaskQuery
Description copied from interface:TaskServiceReturns a newNativeQueryfor tasks.- Specified by:
createNativeTaskQueryin interfaceTaskService
-
getVariables
Description copied from interface:TaskServiceget all variables and search in the task scope and if available also the execution scopes. If you have many variables and you only need a few, consider usingTaskService.getVariables(String, Collection)for better performance.- Specified by:
getVariablesin interfaceTaskService
-
getVariablesLocal
Description copied from interface:TaskServiceget all variables and search only in the task scope. If you have many task local variables and you only need a few, consider usingTaskService.getVariablesLocal(String, Collection)for better performance.- Specified by:
getVariablesLocalin interfaceTaskService
-
getVariables
Description copied from interface:TaskServiceget values for all given variableNames and search only in the task scope.- Specified by:
getVariablesin interfaceTaskService
-
getVariablesLocal
Description copied from interface:TaskServiceget a variable on a task- Specified by:
getVariablesLocalin interfaceTaskService
-
getVariable
Description copied from interface:TaskServiceget a variables and search in the task scope and if available also the execution scopes.- Specified by:
getVariablein interfaceTaskService
-
getVariable
Description copied from interface:TaskServiceget a variables and search in the task scope and if available also the execution scopes.- Specified by:
getVariablein interfaceTaskService
-
hasVariable
Description copied from interface:TaskServicechecks whether or not the task has a variable defined with the given name, in the task scope and if available also the execution scopes.- Specified by:
hasVariablein interfaceTaskService
-
getVariableLocal
Description copied from interface:TaskServicechecks whether or not the task has a variable defined with the given name.- Specified by:
getVariableLocalin interfaceTaskService
-
getVariableLocal
Description copied from interface:TaskServicechecks whether or not the task has a variable defined with the given name.- Specified by:
getVariableLocalin interfaceTaskService
-
getVariableInstancesLocalByTaskIds
Description copied from interface:TaskServiceget all variables and search only in the task scope.- Specified by:
getVariableInstancesLocalByTaskIdsin interfaceTaskService
-
hasVariableLocal
Description copied from interface:TaskServicechecks whether or not the task has a variable defined with the given name, local task scope only.- Specified by:
hasVariableLocalin interfaceTaskService
-
setVariable
Description copied from interface:TaskServiceset variable on a task. If the variable is not already existing, it will be created in the most outer scope. This means the process instance in case this task is related to an execution.- Specified by:
setVariablein interfaceTaskService
-
setVariableLocal
Description copied from interface:TaskServiceset variable on a task. If the variable is not already existing, it will be created in the task.- Specified by:
setVariableLocalin interfaceTaskService
-
setVariables
Description copied from interface:TaskServiceset variables on a task. If the variable is not already existing, it will be created in the most outer scope. This means the process instance in case this task is related to an execution.- Specified by:
setVariablesin interfaceTaskService
-
setVariablesLocal
Description copied from interface:TaskServiceset variables on a task. If the variable is not already existing, it will be created in the task.- Specified by:
setVariablesLocalin interfaceTaskService
-
removeVariable
Description copied from interface:TaskServiceRemoves the variable from the task. When the variable does not exist, nothing happens.- Specified by:
removeVariablein interfaceTaskService
-
removeVariableLocal
Description copied from interface:TaskServiceRemoves the variable from the task (not considering parent scopes). When the variable does not exist, nothing happens.- Specified by:
removeVariableLocalin interfaceTaskService
-
removeVariables
Description copied from interface:TaskServiceRemoves all variables in the given collection from the task. Non existing variable names are simply ignored.- Specified by:
removeVariablesin interfaceTaskService
-
removeVariablesLocal
Description copied from interface:TaskServiceRemoves all variables in the given collection from the task (not considering parent scopes). Non existing variable names are simply ignored.- Specified by:
removeVariablesLocalin interfaceTaskService
-
addComment
Description copied from interface:TaskServiceAdd a comment to a task and/or process instance.- Specified by:
addCommentin interfaceTaskService
-
addComment
Description copied from interface:TaskServiceAdd a comment to a task and/or process instance with a custom type.- Specified by:
addCommentin interfaceTaskService
-
saveComment
Description copied from interface:TaskServiceUpdate a comment to a task and/or process instance.- Specified by:
saveCommentin interfaceTaskService
-
getComment
Description copied from interface:TaskServiceReturns an individual comment with the given id. Returns null if no comment exists with the given id.- Specified by:
getCommentin interfaceTaskService
-
getEvent
Description copied from interface:TaskServiceReturns an individual event with the given id. Returns null if no event exists with the given id.- Specified by:
getEventin interfaceTaskService
-
getTaskComments
Description copied from interface:TaskServiceThe comments related to the given task.- Specified by:
getTaskCommentsin interfaceTaskService
-
getTaskComments
Description copied from interface:TaskServiceThe comments related to the given task of the given type.- Specified by:
getTaskCommentsin interfaceTaskService
-
getCommentsByType
Description copied from interface:TaskServiceAll comments of a given type.- Specified by:
getCommentsByTypein interfaceTaskService
-
getTaskEvents
Description copied from interface:TaskServiceThe all events related to the given task.- Specified by:
getTaskEventsin interfaceTaskService
-
getProcessInstanceComments
Description copied from interface:TaskServiceThe comments related to the given process instance.- Specified by:
getProcessInstanceCommentsin interfaceTaskService
-
getProcessInstanceComments
Description copied from interface:TaskServiceThe comments related to the given process instance.- Specified by:
getProcessInstanceCommentsin interfaceTaskService
-
createAttachment
public Attachment createAttachment(String attachmentType, String taskId, String processInstanceId, String attachmentName, String attachmentDescription, InputStream content) Description copied from interface:TaskServiceAdd a new attachment to a task and/or a process instance and use an input stream to provide the content- Specified by:
createAttachmentin interfaceTaskService
-
createAttachment
public Attachment createAttachment(String attachmentType, String taskId, String processInstanceId, String attachmentName, String attachmentDescription, String url) Description copied from interface:TaskServiceAdd a new attachment to a task and/or a process instance and use an url as the content- Specified by:
createAttachmentin interfaceTaskService
-
getAttachmentContent
Description copied from interface:TaskServiceRetrieve stream content of a particular attachment- Specified by:
getAttachmentContentin interfaceTaskService
-
deleteAttachment
Description copied from interface:TaskServiceDelete an attachment- Specified by:
deleteAttachmentin interfaceTaskService
-
deleteComments
Description copied from interface:TaskServiceRemoves all comments from the provided task and/or process instance- Specified by:
deleteCommentsin interfaceTaskService
-
deleteComment
Description copied from interface:TaskServiceRemoves an individual comment with the given id.- Specified by:
deleteCommentin interfaceTaskService
-
getAttachment
Description copied from interface:TaskServiceRetrieve a particular attachment- Specified by:
getAttachmentin interfaceTaskService
-
getTaskAttachments
Description copied from interface:TaskServiceThe list of attachments associated to a task- Specified by:
getTaskAttachmentsin interfaceTaskService
-
getProcessInstanceAttachments
Description copied from interface:TaskServiceThe list of attachments associated to a process instance- Specified by:
getProcessInstanceAttachmentsin interfaceTaskService
-
saveAttachment
Description copied from interface:TaskServiceUpdate the name and description of an attachment- Specified by:
saveAttachmentin interfaceTaskService
-
getSubTasks
Description copied from interface:TaskServiceThe list of subtasks for this parent task- Specified by:
getSubTasksin interfaceTaskService
-
getVariableInstance
Description copied from interface:TaskServiceThe variable. Searching for the variable is done in all scopes that are visible to the given task (including parent scopes). Returns null when no variable value is found with the given name.- Specified by:
getVariableInstancein interfaceTaskService- Parameters:
taskId- id of task, cannot be null.variableName- name of variable, cannot be null.- Returns:
- the variable or null if the variable is undefined.
-
getVariableInstanceLocal
Description copied from interface:TaskServiceThe variable for a task. Returns the variable when it is set for the task (and not searching parent scopes). Returns null when no variable is found with the given name.- Specified by:
getVariableInstanceLocalin interfaceTaskService- Parameters:
taskId- id of task, cannot be null.variableName- name of variable, cannot be null.- Returns:
- the variable or null if the variable is undefined.
-
getVariableInstances
Description copied from interface:TaskServiceAll variables visible from the given task scope (including parent scopes).- Specified by:
getVariableInstancesin interfaceTaskService- Parameters:
taskId- id of task, cannot be null.- Returns:
- the variable instances or an empty map if no such variables are found.
-
getVariableInstances
public Map<String,VariableInstance> getVariableInstances(String taskId, Collection<String> variableNames) Description copied from interface:TaskServiceThe variable values for all given variableNames, takes all variables into account which are visible from the given task scope (including parent scopes).- Specified by:
getVariableInstancesin interfaceTaskService- Parameters:
taskId- id of taskId, cannot be null.variableNames- the collection of variable names that should be retrieved.- Returns:
- the variables or an empty map if no such variables are found.
-
getVariableInstancesLocal
Description copied from interface:TaskServiceAll variable values that are defined in the task scope, without taking outer scopes into account. If you have many task local variables and you only need a few, consider usingTaskService.getVariableInstancesLocal(String, Collection)for better performance.- Specified by:
getVariableInstancesLocalin interfaceTaskService- Parameters:
taskId- id of task, cannot be null.- Returns:
- the variables or an empty map if no such variables are found.
-
getVariableInstancesLocal
public Map<String,VariableInstance> getVariableInstancesLocal(String taskId, Collection<String> variableNames) Description copied from interface:TaskServiceThe variable values for all given variableNames that are defined in the given task's scope. (Does not searching parent scopes).- Specified by:
getVariableInstancesLocalin interfaceTaskService- Parameters:
taskId- id of taskId, cannot be null.variableNames- the collection of variable names that should be retrieved.- Returns:
- the variables or an empty map if no such variables are found.
-
getDataObjects
Description copied from interface:TaskServiceAll DataObjects visible from the given execution scope (including parent scopes).- Specified by:
getDataObjectsin interfaceTaskService- Parameters:
taskId- id of task, cannot be null.- Returns:
- the DataObjects or an empty map if no such variables are found.
-
getDataObjects
public Map<String,DataObject> getDataObjects(String taskId, String locale, boolean withLocalizationFallback) Description copied from interface:TaskServiceAll DataObjects visible from the given task scope (including parent scopes).- Specified by:
getDataObjectsin interfaceTaskService- Parameters:
taskId- id of task, cannot be null.locale- locale the DataObject name and description should be returned in (if available).withLocalizationFallback- When true localization will fallback to more general locales if the specified locale is not found.- Returns:
- the DataObjects or an empty map if no DataObjects are found.
-
getDataObjects
Description copied from interface:TaskServiceThe DataObjects for all given dataObjectNames, takes all dataObjects into account which are visible from the given task scope (including parent scopes).- Specified by:
getDataObjectsin interfaceTaskService- Parameters:
taskId- id of task, cannot be null.dataObjectNames- the collection of DataObject names that should be retrieved.- Returns:
- the DataObject or an empty map if no DataObjects are found.
-
getDataObjects
public Map<String,DataObject> getDataObjects(String taskId, Collection<String> dataObjectNames, String locale, boolean withLocalizationFallback) Description copied from interface:TaskServiceThe DataObjects for all given dataObjectNames, takes all dataObjects into account which are visible from the given task scope (including parent scopes).- Specified by:
getDataObjectsin interfaceTaskService- Parameters:
taskId- id of task, cannot be null.dataObjectNames- the collection of DataObject names that should be retrieved.locale- locale the DataObject name and description should be returned in (if available).withLocalizationFallback- When true localization will fallback to more general locales if the specified locale is not found.- Returns:
- the DataObjects or an empty map if no such dataObjects are found.
-
getDataObject
Description copied from interface:TaskServiceThe DataObject. Searching for the DataObject is done in all scopes that are visible to the given task (including parent scopes). Returns null when no DataObject value is found with the given name.- Specified by:
getDataObjectin interfaceTaskService- Parameters:
taskId- id of task, cannot be null.dataObject- name of DataObject, cannot be null.- Returns:
- the DataObject or null if the variable is undefined.
-
getDataObject
public DataObject getDataObject(String taskId, String dataObjectName, String locale, boolean withLocalizationFallback) Description copied from interface:TaskServiceThe DataObject. Searching for the DataObject is done in all scopes that are visible to the given task (including parent scopes). Returns null when no DataObject value is found with the given name.- Specified by:
getDataObjectin interfaceTaskService- Parameters:
taskId- id of task, cannot be null.dataObjectName- name of DataObject, cannot be null.locale- locale the DataObject name and description should be returned in (if available).withLocalizationFallback- When true localization will fallback to more general locales including the default locale of the JVM if the specified locale is not found.- Returns:
- the DataObject or null if the DataObject is undefined.
-
createTaskBuilder
Description copied from interface:TaskServiceCreate a builder for the task- Specified by:
createTaskBuilderin interfaceTaskService- Returns:
- task builder
-
getIdmIdentityService
-
createTaskCompletionBuilder
Description copied from interface:TaskServiceCreate a completion builder for the task- Specified by:
createTaskCompletionBuilderin interfaceTaskService- Returns:
- task completion builder
-