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 Summary
Fields Modifier and Type Field Description static int
PRIORITY_MAXIMUM
static int
PRIORITY_MINIUM
static int
PRIORITY_NORMAL
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
delegate(String userId)
delegates this task to the given user and sets thedelegationState
toDelegationState.PENDING
.String
getAssignee()
CamundaFormRef
getCamundaFormRef()
Provides the form binding reference to the Camunda Form for the task.String
getCaseDefinitionId()
Reference to the case definition or null if it is not related to a case.String
getCaseExecutionId()
Reference to the path of case execution or null if it is not related to a case instance.String
getCaseInstanceId()
Reference to the case instance or null if it is not related to a case instance.Date
getCreateTime()
The date/time when this task was createdDelegationState
getDelegationState()
The currentDelegationState
for this task.String
getDescription()
Free text description of the task.Date
getDueDate()
Due date of the task.String
getExecutionId()
Reference to the path of execution or null if it is not related to a process instance.Date
getFollowUpDate()
Follow-up date of the task.String
getFormKey()
Provides the form key for the task.String
getId()
DB id of the task.Date
getLastUpdated()
The date/time when this task was last updated.String
getName()
Name or title of the task.String
getOwner()
TheuserId
of the person that is responsible for this task.String
getParentTaskId()
the parent task for which this task is a subtaskint
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] highestString
getProcessDefinitionId()
Reference to the process definition or null if it is not related to a process.String
getProcessInstanceId()
Reference to the process instance or null if it is not related to a process instance.String
getTaskDefinitionKey()
The id of the activity in the process defining this task or null if this is not related to a processString
getTenantId()
Returns the task's tenant id or null in case this task does not belong to a tenant.boolean
isSuspended()
Indicated whether this task is suspended or not.void
setAssignee(String assignee)
void
setCaseInstanceId(String caseInstanceId)
The case instance id for which this task is associated for.void
setDelegationState(DelegationState delegationState)
The currentDelegationState
for this task.void
setDescription(String description)
Change the description of the taskvoid
setDueDate(Date dueDate)
Change due date of the task.void
setFollowUpDate(Date followUpDate)
Change follow-up date of the task.void
setName(String name)
Name or title of the task.void
setOwner(String owner)
TheuserId
of the person that is responsible for this task.void
setParentTaskId(String parentTaskId)
the parent task for which this task is a subtaskvoid
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] highestvoid
setTenantId(String tenantId)
Sets the tenant id for this task.
-
-
-
Field Detail
-
PRIORITY_MINIUM
static final int PRIORITY_MINIUM
- See Also:
- Constant Field Values
-
PRIORITY_NORMAL
static final int PRIORITY_NORMAL
- See Also:
- Constant Field Values
-
PRIORITY_MAXIMUM
static final int PRIORITY_MAXIMUM
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
String getId()
DB id of the task.
-
getName
String getName()
Name or title of the task.
-
setName
void setName(String name)
Name or title of the task.
-
getDescription
String getDescription()
Free text description of the task.
-
setDescription
void setDescription(String description)
Change the description of the task
-
getPriority
int 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
-
setPriority
void 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
-
getOwner
String getOwner()
TheuserId
of the person that is responsible for this task. This is used when a task isdelegated
.
-
setOwner
void setOwner(String owner)
TheuserId
of the person that is responsible for this task. This is used when a task isdelegated
.
-
getAssignee
String getAssignee()
-
setAssignee
void setAssignee(String assignee)
-
getDelegationState
DelegationState getDelegationState()
The currentDelegationState
for this task.
-
setDelegationState
void setDelegationState(DelegationState delegationState)
The currentDelegationState
for this task.
-
getProcessInstanceId
String getProcessInstanceId()
Reference to the process instance or null if it is not related to a process instance.
-
getExecutionId
String getExecutionId()
Reference to the path of execution or null if it is not related to a process instance.
-
getProcessDefinitionId
String getProcessDefinitionId()
Reference to the process definition or null if it is not related to a process.
-
getCaseInstanceId
String getCaseInstanceId()
Reference to the case instance or null if it is not related to a case instance.
-
setCaseInstanceId
void setCaseInstanceId(String caseInstanceId)
The case instance id for which this task is associated for.
-
getCaseExecutionId
String getCaseExecutionId()
Reference to the path of case execution or null if it is not related to a case instance.
-
getCaseDefinitionId
String getCaseDefinitionId()
Reference to the case definition or null if it is not related to a case.
-
getCreateTime
Date getCreateTime()
The date/time when this task was created
-
getLastUpdated
Date getLastUpdated()
The date/time when this task was last updated. All operations that fireTaskListener.EVENTNAME_UPDATE
count as an update to the task. Returns null if the task was never updated before (i.e. it was only created).
-
getTaskDefinitionKey
String getTaskDefinitionKey()
The id of the activity in the process defining this task or null if this is not related to a process
-
getDueDate
Date getDueDate()
Due date of the task.
-
setDueDate
void setDueDate(Date dueDate)
Change due date of the task.
-
getFollowUpDate
Date getFollowUpDate()
Follow-up date of the task.
-
setFollowUpDate
void setFollowUpDate(Date followUpDate)
Change follow-up date of the task.
-
delegate
void delegate(String userId)
delegates this task to the given user and sets thedelegationState
toDelegationState.PENDING
. If no owner is set on the task, the owner is set to the current assignee of the task.
-
setParentTaskId
void setParentTaskId(String parentTaskId)
the parent task for which this task is a subtask
-
getParentTaskId
String getParentTaskId()
the parent task for which this task is a subtask
-
isSuspended
boolean isSuspended()
Indicated whether this task is suspended or not.
-
getFormKey
String 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.
-
getCamundaFormRef
CamundaFormRef 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.
-
getTenantId
String 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
-
setTenantId
void setTenantId(String tenantId)
Sets the tenant id for this task.- Parameters:
tenantId
- the tenant id to set- Since:
- 7.5
-
-