Package org.camunda.bpm.engine.task
Interface Task
- All Known Implementing Classes:
- TaskEntity
public interface Task
Represents one task for a human user.
- Author:
- Joram Barrez
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int
- 
Method SummaryModifier and TypeMethodDescriptionvoiddelegates this task to the given user and sets thedelegationStatetoDelegationState.PENDING.Provides the form binding reference to the Camunda Form for the task.Reference to the case definition or null if it is not related to a case.Reference to the path of 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 createdThe currentDelegationStatefor this task.Free text description of the task.Due date of 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.Provides the form key for 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()TheuserIdof the person that is responsible for this task.the parent task for which this task is a subtaskintindication 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 processReturns the task's state.Returns the task's tenant id or null in case this task does not belong to a tenant.booleanReturns if an attachment exists for the taskbooleanSignifies if a comment exists for the taskbooleanIndicated whether this task is suspended or not.voidsetAssignee(String assignee) voidsetCaseInstanceId(String caseInstanceId) The case instance id for which this task is associated for.voidsetDelegationState(DelegationState delegationState) The currentDelegationStatefor this task.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.voidName or title of the task.voidTheuserIdof the person that is responsible for this task.voidsetParentTaskId(String parentTaskId) the parent task for which this task is a subtaskvoidsetPriority(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] highestvoidsetTaskState(String taskState) Sets the task state for this task.voidsetTenantId(String tenantId) Sets the tenant id for this task.
- 
Field Details- 
PRIORITY_MINIUMstatic final int PRIORITY_MINIUM- See Also:
 
- 
PRIORITY_NORMALstatic final int PRIORITY_NORMAL- See Also:
 
- 
PRIORITY_MAXIMUMstatic final int PRIORITY_MAXIMUM- See Also:
 
 
- 
- 
Method Details- 
getIdString getId()DB id of the task.
- 
getNameString getName()Name or title of the task.
- 
setNameName or title 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
- 
getOwnerString getOwner()TheuserIdof the person that is responsible for this task. This is used when a task isdelegated.
- 
setOwnerTheuserIdof the person that is responsible for this task. This is used when a task isdelegated.
- 
getAssigneeString getAssignee()
- 
setAssignee
- 
getDelegationStateDelegationState getDelegationState()The currentDelegationStatefor this task.
- 
setDelegationStateThe currentDelegationStatefor this task.
- 
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.
- 
setCaseInstanceIdThe case instance id for which this task is associated for.
- 
getCaseExecutionIdString getCaseExecutionId()Reference to the path of 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
- 
getDueDateDate getDueDate()Due date of the task.
- 
setDueDateChange due date of the task.
- 
getFollowUpDateDate getFollowUpDate()Follow-up date of the task.
- 
setFollowUpDateChange follow-up date of the task.
- 
delegatedelegates this task to the given user and sets thedelegationStatetoDelegationState.PENDING. If no owner is set on the task, the owner is set to the current assignee of the task.
- 
setParentTaskIdthe parent task for which this task is a subtask
- 
getParentTaskIdString getParentTaskId()the parent task for which this task is a subtask
- 
isSuspendedboolean isSuspended()Indicated whether this task is suspended or not.
- 
getFormKeyString getFormKey()Provides the form key for the task.NOTE: If the task instance is obtained through a query, this property is only populated in case the TaskQuery.initializeFormKeys()method is called. If this method is called without a prior call toTaskQuery.initializeFormKeys(), it will throw aBadUserRequestException.- Returns:
- the form key for this task
- Throws:
- BadUserRequestException- in case the form key is not initialized.
 
- 
getCamundaFormRefCamundaFormRef getCamundaFormRef()Provides the form binding reference to the Camunda Form for the task.NOTE: If the task instance is obtained through a query, this property is only populated in case the TaskQuery.initializeFormKeys()method is called. If this method is called without a prior call toTaskQuery.initializeFormKeys(), it will throw aBadUserRequestException.- Returns:
- the reference key, binding type and version (if type is version)
- Throws:
- BadUserRequestException- in case the form key is not initialized.
 
- 
getTenantIdString getTenantId()Returns the task's tenant id or null in case this task does not belong to a tenant.- Returns:
- the task's tenant id or null
- Since:
- 7.5
 
- 
setTenantIdSets the tenant id for this task.- Parameters:
- tenantId- the tenant id to set
- Since:
- 7.5
 
- 
getTaskStateString getTaskState()Returns the task's state.- Returns:
- the task's state
 
- 
setTaskStateSets the task state for this task.- Parameters:
- taskState- the taskState to set
 
- 
hasAttachmentboolean hasAttachment()Returns if an attachment exists for the task
- 
hasCommentboolean hasComment()Signifies if a comment exists for the task
 
-