Package org.camunda.bpm.engine.delegate
Interface DelegateTask
- All Superinterfaces:
- BpmnModelExecutionContext,- ProcessEngineServicesAware,- VariableScope
- All Known Implementing Classes:
- TaskEntity
public interface DelegateTask
extends VariableScope, BpmnModelExecutionContext, ProcessEngineServicesAware
- Author:
- Joram Barrez, Daniel Meyer, Sebastian Menski
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddCandidateGroup(String groupId) Adds the given group as candidate group to this taskvoidaddCandidateGroups(Collection<String> candidateGroups) Adds multiple groups as candidate group to this task.voidaddCandidateUser(String userId) Adds the given user as a candidate user to this task.voidaddCandidateUsers(Collection<String> candidateUsers) Adds multiple users as candidate user to this task.voidaddGroupIdentityLink(String groupId, String identityLinkType) Involves a group with group task.voidaddUserIdentityLink(String userId, String identityLinkType) Involves a user with a task.voidcomplete()set status to complete.voiddeleteCandidateGroup(String groupId) Convenience shorthand for#deleteGroupIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATEvoiddeleteCandidateUser(String userId) Convenience shorthand fordeleteUserIdentityLink(String, String); with typeIdentityLinkType.CANDIDATEvoiddeleteGroupIdentityLink(String groupId, String identityLinkType) Removes the association between a group and a task for the given identityLinkType.voiddeleteUserIdentityLink(String userId, String identityLinkType) Removes the association between a user and a task for the given identityLinkType.The {@link User.getId() userId} of the person to which this task is delegated.Provides access to the currentUserTaskElement from the Bpmn Model.Retrieves the candidate users and groups associated with the task.Reference to the case definition or null if it is not related to a case.Returns the case execution currently at the task.Reference to the case execution or null if it is not related to a case instance.Reference to the case instance or null if it is not related to a case instance.The date/time when this task was createdGet delete reason of the task.Free text description of the task.Due date of the task.Returns the event name which triggered the task listener to fire for this task.Returns the execution currently at the task.Reference to the path of execution or null if it is not related to a process instance.Follow-up date of the task.getId()DB id of the task.The date/time when this task was last updated.getName()Name or title of the task.getOwner()The {@link User.getId() userId} of the person responsible for this task.intindication of how important/urgent this task is with a number between 0 and 100 where higher values mean a higher priority and lower values mean lower priority: [0..19] lowest, [20..39] low, [40..59] normal, [60..79] high [80..100] highestReference to the process definition or null if it is not related to a process.Reference to the process instance or null if it is not related to a process instance.The id of the activity in the process defining this task or null if this is not related to a processReturn the id of the tenant this task belongs to.voidsetAssignee(String assignee) The {@link User.getId() userId} of the person to which this task is delegated.voidsetDescription(String description) Change the description of the taskvoidsetDueDate(Date dueDate) Change due date of the task.voidsetFollowUpDate(Date followUpDate) Change follow-up date of the task.voidChange the name of the task.voidThe {@link User.getId() userId} of the person responsible for this task.voidsetPriority(int priority) indication of how important/urgent this task is with a number between 0 and 100 where higher values mean a higher priority and lower values mean lower priority: [0..19] lowest, [20..39] low, [40..59] normal, [60..79] high [80..100] highestMethods inherited from interface org.camunda.bpm.engine.delegate.BpmnModelExecutionContextgetBpmnModelInstanceMethods inherited from interface org.camunda.bpm.engine.delegate.ProcessEngineServicesAwaregetProcessEngine, getProcessEngineServicesMethods inherited from interface org.camunda.bpm.engine.delegate.VariableScopegetVariable, getVariableLocal, getVariableLocalTyped, getVariableLocalTyped, getVariableNames, getVariableNamesLocal, getVariables, getVariableScopeKey, getVariablesLocal, getVariablesLocalTyped, getVariablesLocalTyped, getVariablesTyped, getVariablesTyped, getVariableTyped, getVariableTyped, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setVariable, setVariableLocal, setVariables, setVariablesLocal
- 
Method Details- 
getIdString getId()DB id of the task.
- 
getNameString getName()Name or title of the task.
- 
setNameChange the name of the task.
- 
getDescriptionString getDescription()Free text description of the task.
- 
setDescriptionChange the description of the task
- 
getPriorityint getPriority()indication of how important/urgent this task is with a number between 0 and 100 where higher values mean a higher priority and lower values mean lower priority: [0..19] lowest, [20..39] low, [40..59] normal, [60..79] high [80..100] highest
- 
setPriorityvoid setPriority(int priority) indication of how important/urgent this task is with a number between 0 and 100 where higher values mean a higher priority and lower values mean lower priority: [0..19] lowest, [20..39] low, [40..59] normal, [60..79] high [80..100] highest
- 
getProcessInstanceIdString getProcessInstanceId()Reference to the process instance or null if it is not related to a process instance.
- 
getExecutionIdString getExecutionId()Reference to the path of execution or null if it is not related to a process instance.
- 
getProcessDefinitionIdString getProcessDefinitionId()Reference to the process definition or null if it is not related to a process.
- 
getCaseInstanceIdString getCaseInstanceId()Reference to the case instance or null if it is not related to a case instance.
- 
getCaseExecutionIdString getCaseExecutionId()Reference to the case execution or null if it is not related to a case instance.
- 
getCaseDefinitionIdString getCaseDefinitionId()Reference to the case definition or null if it is not related to a case.
- 
getCreateTimeDate getCreateTime()The date/time when this task was created
- 
getLastUpdatedDate getLastUpdated()The date/time when this task was last updated. All operations that fireTaskListener.EVENTNAME_UPDATEcount as an update to the task. Returns null if the task was never updated before (i.e. it was only created).
- 
getTaskDefinitionKeyString getTaskDefinitionKey()The id of the activity in the process defining this task or null if this is not related to a process
- 
getExecutionDelegateExecution getExecution()Returns the execution currently at the task.
- 
getCaseExecutionDelegateCaseExecution getCaseExecution()Returns the case execution currently at the task.
- 
getEventNameString getEventName()Returns the event name which triggered the task listener to fire for this task.
- 
addCandidateUserAdds the given user as a candidate user to this task.
- 
addCandidateUsersAdds multiple users as candidate user to this task.
- 
addCandidateGroupAdds the given group as candidate group to this task
- 
addCandidateGroupsAdds multiple groups as candidate group to this task.
- 
getOwnerString getOwner()The {@link User.getId() userId} of the person responsible for this task.
- 
setOwnerThe {@link User.getId() userId} of the person responsible for this task.
- 
getAssigneeString getAssignee()The {@link User.getId() userId} of the person to which this task is delegated.
- 
setAssigneeThe {@link User.getId() userId} of the person to which this task is delegated.
- 
getDueDateDate getDueDate()Due date of the task.
- 
setDueDateChange due date of the task.
- 
getDeleteReasonString getDeleteReason()Get delete reason of the task.
- 
addUserIdentityLinkInvolves a user with a task. The type of identity link is defined by the given identityLinkType.- Parameters:
- userId- id of the user involve, cannot be null.
- identityLinkType- type of identityLink, cannot be null (@see- IdentityLinkType).
- Throws:
- ProcessEngineException- when the task or user doesn't exist.
 
- 
addGroupIdentityLinkInvolves a group with group task. The type of identityLink is defined by the given identityLink.- Parameters:
- groupId- id of the group to involve, cannot be null.
- identityLinkType- type of identity, cannot be null (@see- IdentityLinkType).
- Throws:
- ProcessEngineException- when the task or group doesn't exist.
 
- 
deleteCandidateUserConvenience shorthand fordeleteUserIdentityLink(String, String); with typeIdentityLinkType.CANDIDATE- Parameters:
- userId- id of the user to use as candidate, cannot be null.
- Throws:
- ProcessEngineException- when the task or user doesn't exist.
 
- 
deleteCandidateGroupConvenience shorthand for#deleteGroupIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATE- Parameters:
- groupId- id of the group to use as candidate, cannot be null.
- Throws:
- ProcessEngineException- when the task or group doesn't exist.
 
- 
deleteUserIdentityLinkRemoves the association between a user and a task for the given identityLinkType.- Parameters:
- userId- id of the user involve, cannot be null.
- identityLinkType- type of identityLink, cannot be null (@see- IdentityLinkType).
- Throws:
- ProcessEngineException- when the task or user doesn't exist.
 
- 
deleteGroupIdentityLinkRemoves the association between a group and a task for the given identityLinkType.- Parameters:
- groupId- id of the group to involve, cannot be null.
- identityLinkType- type of identity, cannot be null (@see- IdentityLinkType).
- Throws:
- ProcessEngineException- when the task or group doesn't exist.
 
- 
getCandidatesSet<IdentityLink> getCandidates()Retrieves the candidate users and groups associated with the task.- Returns:
- set of IdentityLinks of typeIdentityLinkType.CANDIDATE.
 
- 
getBpmnModelElementInstanceUserTask getBpmnModelElementInstance()Provides access to the currentUserTaskElement from the Bpmn Model.- Specified by:
- getBpmnModelElementInstancein interface- BpmnModelExecutionContext
- Returns:
- the current UserTaskElement from the Bpmn Model.
 
- 
getTenantIdString getTenantId()Return the id of the tenant this task belongs to. Can benullif the task belongs to no single tenant.
- 
getFollowUpDateDate getFollowUpDate()Follow-up date of the task.
- 
setFollowUpDateChange follow-up date of the task.
- 
completevoid complete()set status to complete.- Throws:
- IllegalStateException- if performed on completion or deletion
 
 
-