public class TaskEntity extends VariableScopeImpl implements Task, DelegateTask, Serializable, PersistentObject, HasRevision, CommandContextCloseListener
Modifier and Type | Field and Description |
---|---|
protected String |
assignee |
protected Date |
createTime |
protected DelegationState |
delegationState |
static String |
DELETE_REASON_COMPLETED |
static String |
DELETE_REASON_DELETED |
protected String |
description |
protected Date |
dueDate |
protected String |
eventName |
protected ExecutionEntity |
execution |
protected String |
executionId |
protected boolean |
isDeleted |
protected boolean |
isIdentityLinksInitialized |
protected String |
name |
protected String |
owner |
protected String |
parentTaskId |
protected int |
priority |
protected String |
processDefinitionId |
protected ExecutionEntity |
processInstance |
protected String |
processInstanceId |
protected int |
revision |
protected int |
suspensionState |
protected TaskDefinition |
taskDefinition |
protected String |
taskDefinitionKey |
protected List<IdentityLinkEntity> |
taskIdentityLinkEntities |
cachedElContext, id, variableInstances
PRIORITY_MAXIMUM, PRIORITY_MINIUM, PRIORITY_NORMAL
Constructor and Description |
---|
TaskEntity() |
TaskEntity(String taskId) |
Modifier and Type | Method and Description |
---|---|
void |
addCandidateGroup(String groupId)
Adds the given group as candidate group to this task
|
void |
addCandidateGroups(Collection<String> candidateGroups)
Adds multiple groups as candidate group to this task.
|
void |
addCandidateUser(String userId)
Adds the given user as a candidate user to this task.
|
void |
addCandidateUsers(Collection<String> candidateUsers)
Adds multiple users as candidate user to this task.
|
void |
addGroupIdentityLink(String groupId,
String identityLinkType)
Involves a group with group task.
|
IdentityLinkEntity |
addIdentityLink(String userId,
String groupId,
String type) |
void |
addUserIdentityLink(String userId,
String identityLinkType)
Involves a user with a task.
|
void |
complete() |
static TaskEntity |
create()
new task.
|
static TaskEntity |
createAndInsert(ActivityExecution execution)
creates and initializes a new persistent task.
|
void |
delegate(String userId)
delegates this task to the given user and sets the
delegationState to DelegationState.PENDING . |
void |
deleteCandidateGroup(String groupId)
Convenience shorthand for
#deleteGroupIdentityLink(String, String, String) ; with type IdentityLinkType.CANDIDATE |
void |
deleteCandidateUser(String userId)
Convenience shorthand for
DelegateTask.deleteUserIdentityLink(String, String) ; with type IdentityLinkType.CANDIDATE |
void |
deleteGroupIdentityLink(String groupId,
String identityLinkType)
Removes the association between a group and a task for the given identityLinkType.
|
void |
deleteIdentityLink(String userId,
String groupId,
String type) |
void |
deleteUserIdentityLink(String userId,
String identityLinkType)
Removes the association between a user and a task for the given identityLinkType.
|
protected void |
ensureParentTaskActive() |
protected void |
ensureTaskActive() |
void |
fireEvent(String taskEventName) |
Map<String,Object> |
getActivityInstanceVariables() |
String |
getAssignee()
|
Set<IdentityLink> |
getCandidates()
Retrieves the candidate users and groups associated with the task.
|
Date |
getCreateTime()
The date/time when this task was created
|
DelegationState |
getDelegationState()
The current
DelegationState for this task. |
String |
getDelegationStateString() |
String |
getDescription()
Free text description of the task.
|
Date |
getDueDate()
Due date of the task.
|
String |
getEventName()
Returns the event name which triggered the task listener to fire for this task.
|
ExecutionEntity |
getExecution()
Returns the execution currently at the task.
|
String |
getExecutionId()
Reference to the path of execution or null if it is not related to a process instance.
|
List<IdentityLinkEntity> |
getIdentityLinks() |
String |
getName()
Name or title of the task.
|
String |
getOwner()
The
userId of the person that is responsible for this task. |
String |
getParentTaskId()
the parent task for which this task is a subtask
|
protected VariableScopeImpl |
getParentVariableScope() |
Object |
getPersistentState()
Returns a representation of the object,
as would be stored in the database.
|
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
|
String |
getProcessDefinitionId()
Reference to the process definition or null if it is not related to a process.
|
ExecutionEntity |
getProcessInstance() |
String |
getProcessInstanceId()
Reference to the process instance or null if it is not related to a process instance.
|
int |
getRevision() |
int |
getRevisionNext() |
int |
getSuspensionState() |
TaskDefinition |
getTaskDefinition() |
String |
getTaskDefinitionKey()
The id of the activity in the process defining this task or null if this is not related to a process
|
Map<String,VariableInstanceEntity> |
getVariableInstances() |
protected void |
initializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance) |
void |
insert(ExecutionEntity execution) |
boolean |
isDeleted() |
boolean |
isSuspended()
Indicated whether this task is suspended or not.
|
protected List<VariableInstanceEntity> |
loadVariableInstances() |
void |
onCommandContextClose(CommandContext commandContext) |
protected void |
registerCommandContextCloseListener() |
void |
resolve() |
void |
setAssignee(String assignee)
|
void |
setAssigneeWithoutCascade(String assignee) |
void |
setCreateTime(Date createTime) |
void |
setDelegationState(DelegationState delegationState)
The current
DelegationState for this task. |
void |
setDelegationStateString(String delegationStateString) |
void |
setDeleted(boolean isDeleted) |
void |
setDescription(String description)
Change the description of the task
|
void |
setDescriptionWithoutCascade(String description) |
void |
setDueDate(Date dueDate)
Change due date of the task.
|
void |
setDueDateWithoutCascade(Date dueDate) |
void |
setEventName(String eventName) |
void |
setExecution(DelegateExecution execution) |
void |
setExecution(ExecutionEntity execution) |
void |
setExecutionId(String executionId) |
void |
setExecutionVariables(Map<String,Object> parameters) |
void |
setName(String taskName)
Name or title of the task.
|
void |
setNameWithoutCascade(String taskName) |
void |
setOwner(String owner)
The
userId of the person that is responsible for this task. |
void |
setOwnerWithoutCascade(String owner) |
void |
setParentTaskId(String parentTaskId)
the parent task for which this task is a subtask
|
void |
setParentTaskIdWithoutCascade(String parentTaskId) |
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
|
void |
setPriorityWithoutCascade(int priority) |
void |
setProcessDefinitionId(String processDefinitionId) |
void |
setProcessInstance(ExecutionEntity processInstance) |
void |
setProcessInstanceId(String processInstanceId) |
void |
setRevision(int revision) |
void |
setSuspensionState(int suspensionState) |
void |
setTaskDefinition(TaskDefinition taskDefinition) |
void |
setTaskDefinitionKey(String taskDefinitionKey) |
void |
setTaskDefinitionKeyWithoutCascade(String taskDefinitionKey) |
String |
toString() |
void |
update() |
collectVariableNames, collectVariables, createVariableInstance, createVariableLocal, createVariableLocal, createVariablesLocal, deleteVariableInstanceForExplicitUserCall, deleteVariablesInstanceForLeavingScope, ensureVariableInstancesInitialized, fireHistoricVariableInstanceCreate, fireHistoricVariableInstanceDelete, fireHistoricVariableInstanceUpdate, getCachedElContext, getId, getSourceActivityExecution, getVariable, getVariableLocal, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, isAutoFireHistoryEvents, removeVariable, removeVariable, removeVariableLocal, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setCachedElContext, setId, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariables, setVariablesLocal, updateVariableInstance
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getId
getVariable, getVariableLocal, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setVariable, setVariableLocal, setVariables, setVariablesLocal
getId, setId
public static final String DELETE_REASON_COMPLETED
public static final String DELETE_REASON_DELETED
protected int revision
protected String owner
protected String assignee
protected DelegationState delegationState
protected String parentTaskId
protected String name
protected String description
protected int priority
protected Date createTime
protected Date dueDate
protected int suspensionState
protected boolean isIdentityLinksInitialized
protected List<IdentityLinkEntity> taskIdentityLinkEntities
protected String executionId
protected ExecutionEntity execution
protected String processInstanceId
protected ExecutionEntity processInstance
protected String processDefinitionId
protected TaskDefinition taskDefinition
protected String taskDefinitionKey
protected boolean isDeleted
protected String eventName
public TaskEntity()
public TaskEntity(String taskId)
public static TaskEntity createAndInsert(ActivityExecution execution)
public void insert(ExecutionEntity execution)
public void update()
public static TaskEntity create()
public void complete()
public void delegate(String userId)
Task
delegationState
to DelegationState.PENDING
.
If no owner is set on the task, the owner is set to the current assignee of the task.public void resolve()
public Object getPersistentState()
PersistentObject
getPersistentState
in interface PersistentObject
public int getRevisionNext()
getRevisionNext
in interface HasRevision
protected void ensureParentTaskActive()
protected void ensureTaskActive()
protected VariableScopeImpl getParentVariableScope()
getParentVariableScope
in class VariableScopeImpl
protected void initializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance)
initializeVariableInstanceBackPointer
in class VariableScopeImpl
protected List<VariableInstanceEntity> loadVariableInstances()
loadVariableInstances
in class VariableScopeImpl
public ExecutionEntity getExecution()
DelegateTask
getExecution
in interface DelegateTask
public void setExecution(DelegateExecution execution)
public IdentityLinkEntity addIdentityLink(String userId, String groupId, String type)
public Set<IdentityLink> getCandidates()
DelegateTask
getCandidates
in interface DelegateTask
IdentityLink
s of type IdentityLinkType.CANDIDATE
.public void addCandidateUser(String userId)
DelegateTask
addCandidateUser
in interface DelegateTask
public void addCandidateUsers(Collection<String> candidateUsers)
DelegateTask
addCandidateUsers
in interface DelegateTask
public void addCandidateGroup(String groupId)
DelegateTask
addCandidateGroup
in interface DelegateTask
public void addCandidateGroups(Collection<String> candidateGroups)
DelegateTask
addCandidateGroups
in interface DelegateTask
public void addGroupIdentityLink(String groupId, String identityLinkType)
DelegateTask
addGroupIdentityLink
in interface DelegateTask
groupId
- id of the group to involve, cannot be null.identityLinkType
- type of identity, cannot be null (@see IdentityLinkType
).public void addUserIdentityLink(String userId, String identityLinkType)
DelegateTask
addUserIdentityLink
in interface DelegateTask
userId
- id of the user involve, cannot be null.identityLinkType
- type of identityLink, cannot be null (@see IdentityLinkType
).public void deleteCandidateGroup(String groupId)
DelegateTask
#deleteGroupIdentityLink(String, String, String)
; with type IdentityLinkType.CANDIDATE
deleteCandidateGroup
in interface DelegateTask
groupId
- id of the group to use as candidate, cannot be null.public void deleteCandidateUser(String userId)
DelegateTask
DelegateTask.deleteUserIdentityLink(String, String)
; with type IdentityLinkType.CANDIDATE
deleteCandidateUser
in interface DelegateTask
userId
- id of the user to use as candidate, cannot be null.public void deleteGroupIdentityLink(String groupId, String identityLinkType)
DelegateTask
deleteGroupIdentityLink
in interface DelegateTask
groupId
- id of the group to involve, cannot be null.identityLinkType
- type of identity, cannot be null (@see IdentityLinkType
).public void deleteUserIdentityLink(String userId, String identityLinkType)
DelegateTask
deleteUserIdentityLink
in interface DelegateTask
userId
- id of the user involve, cannot be null.identityLinkType
- type of identityLink, cannot be null (@see IdentityLinkType
).public List<IdentityLinkEntity> getIdentityLinks()
public void setName(String taskName)
Task
setName
in interface DelegateTask
setName
in interface Task
public void setNameWithoutCascade(String taskName)
public void setDescription(String description)
Task
setDescription
in interface DelegateTask
setDescription
in interface Task
public void setDescriptionWithoutCascade(String description)
public void setAssignee(String assignee)
Task
setAssignee
in interface DelegateTask
setAssignee
in interface Task
public void setAssigneeWithoutCascade(String assignee)
public void setOwner(String owner)
Task
userId
of the person that is responsible for this task.
This is used when a task is delegated
.setOwner
in interface DelegateTask
setOwner
in interface Task
public void setOwnerWithoutCascade(String owner)
public void setDueDate(Date dueDate)
Task
setDueDate
in interface DelegateTask
setDueDate
in interface Task
public void setDueDateWithoutCascade(Date dueDate)
public void setPriority(int priority)
Task
setPriority
in interface DelegateTask
setPriority
in interface Task
public void setPriorityWithoutCascade(int priority)
public void setParentTaskId(String parentTaskId)
Task
setParentTaskId
in interface Task
public void setParentTaskIdWithoutCascade(String parentTaskId)
public void setTaskDefinitionKeyWithoutCascade(String taskDefinitionKey)
public void fireEvent(String taskEventName)
public void setTaskDefinition(TaskDefinition taskDefinition)
public TaskDefinition getTaskDefinition()
public int getRevision()
getRevision
in interface HasRevision
public void setRevision(int revision)
setRevision
in interface HasRevision
public String getName()
Task
getName
in interface DelegateTask
getName
in interface Task
public String getDescription()
Task
getDescription
in interface DelegateTask
getDescription
in interface Task
public Date getDueDate()
Task
getDueDate
in interface DelegateTask
getDueDate
in interface Task
public int getPriority()
Task
getPriority
in interface DelegateTask
getPriority
in interface Task
public Date getCreateTime()
Task
getCreateTime
in interface DelegateTask
getCreateTime
in interface Task
public void setCreateTime(Date createTime)
public String getExecutionId()
Task
getExecutionId
in interface DelegateTask
getExecutionId
in interface Task
public String getProcessInstanceId()
Task
getProcessInstanceId
in interface DelegateTask
getProcessInstanceId
in interface Task
public String getProcessDefinitionId()
Task
getProcessDefinitionId
in interface DelegateTask
getProcessDefinitionId
in interface Task
public void setProcessDefinitionId(String processDefinitionId)
public String getAssignee()
Task
getAssignee
in interface DelegateTask
getAssignee
in interface Task
public String getTaskDefinitionKey()
Task
getTaskDefinitionKey
in interface DelegateTask
getTaskDefinitionKey
in interface Task
public void setTaskDefinitionKey(String taskDefinitionKey)
public String getEventName()
DelegateTask
getEventName
in interface DelegateTask
public void setEventName(String eventName)
public void setExecutionId(String executionId)
public ExecutionEntity getProcessInstance()
public void setProcessInstance(ExecutionEntity processInstance)
public void setExecution(ExecutionEntity execution)
public void setProcessInstanceId(String processInstanceId)
public String getOwner()
Task
userId
of the person that is responsible for this task.
This is used when a task is delegated
.getOwner
in interface DelegateTask
getOwner
in interface Task
public DelegationState getDelegationState()
Task
DelegationState
for this task.getDelegationState
in interface Task
public void setDelegationState(DelegationState delegationState)
Task
DelegationState
for this task.setDelegationState
in interface Task
public String getDelegationStateString()
public void setDelegationStateString(String delegationStateString)
public boolean isDeleted()
public void setDeleted(boolean isDeleted)
public String getParentTaskId()
Task
getParentTaskId
in interface Task
public Map<String,VariableInstanceEntity> getVariableInstances()
public int getSuspensionState()
public void setSuspensionState(int suspensionState)
public boolean isSuspended()
Task
isSuspended
in interface Task
public void onCommandContextClose(CommandContext commandContext)
onCommandContextClose
in interface CommandContextCloseListener
protected void registerCommandContextCloseListener()
Copyright © 2015. All rights reserved.