public class TaskEntity extends VariableScopeImpl implements Task, DelegateTask, Serializable, PersistentObject, HasRevision, BulkDeleteable
cachedElContext, id, transientVariabes, usedVariablesCache, variableInstancesDEFAULT_PRIORITY| 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(Map variablesMap,
boolean localScope,
boolean fireEvents) |
static TaskEntity |
create(Date createTime)
Creates a new task.
|
static TaskEntity |
createAndInsert(ActivityExecution execution,
boolean fireEvents)
creates and initializes a new persistent task.
|
protected VariableInstanceEntity |
createVariableInstance(String variableName,
Object value,
ExecutionEntity sourceActivityExecution) |
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
DelegateTask.deleteGroupIdentityLink(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.
|
void |
fireEvent(String taskEventName) |
void |
forceUpdate() |
Map<String,Object> |
getActivityInstanceVariables() |
String |
getAssignee()
The
userId of the person to which this task is delegated. |
Set<IdentityLink> |
getCandidates()
Retrieves the candidate users and groups associated with the task.
|
String |
getCategory()
The category of 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 |
getEventHandlerId()
Returns the event handler identifier which triggered the task listener to fire for this task.
|
String |
getEventName()
Returns the event name which triggered the task listener to fire for this task.
|
ExecutionEntity |
getExecution() |
String |
getExecutionId()
Reference to the path of execution or null if it is not related to a process instance.
|
String |
getFormKey()
The form key for the user task
|
List<IdentityLinkEntity> |
getIdentityLinks() |
String |
getLocalizedDescription() |
String |
getLocalizedName() |
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
|
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.
|
Map<String,Object> |
getProcessVariables()
Returns the process variables if requested in the task query
|
List<VariableInstanceEntity> |
getQueryVariables() |
int |
getRevision() |
int |
getRevisionNext() |
protected VariableInstanceEntity |
getSpecificVariable(String variableName) |
protected List<VariableInstanceEntity> |
getSpecificVariables(Collection<String> variableNames) |
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,Object> |
getTaskLocalVariables()
Returns the local task variables if requested in the task query
|
String |
getTenantId()
The tenant identifier of this task
|
Map<String,VariableInstanceEntity> |
getVariableInstanceEntities() |
protected void |
initializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance) |
void |
insert(ExecutionEntity execution,
boolean fireEvents) |
protected boolean |
isActivityIdUsedForDetails()
Execution variable updates have activity instance ids, but historic task variable updates don't.
|
boolean |
isDeleted() |
boolean |
isSuspended()
Indicates whether this task is suspended or not.
|
protected List<VariableInstanceEntity> |
loadVariableInstances() |
void |
resolve() |
void |
setAssignee(String assignee)
The
userId of the person to which this task is delegated. |
void |
setAssignee(String assignee,
boolean dispatchAssignmentEvent,
boolean dispatchUpdateEvent) |
void |
setAssigneeWithoutCascade(String assignee) |
void |
setCategory(String category)
Change the category of the task.
|
void |
setCategoryWithoutCascade(String category) |
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 |
setDueDate(Date dueDate,
boolean dispatchUpdateEvent) |
void |
setDueDateWithoutCascade(Date dueDate) |
void |
setEventHandlerId(String eventHandlerId) |
void |
setEventName(String eventName) |
void |
setExecution(DelegateExecution execution) |
void |
setExecution(ExecutionEntity execution) |
void |
setExecutionId(String executionId) |
void |
setExecutionVariables(Map<String,Object> parameters) |
void |
setFormKey(String formKey)
Change the form key of the task
|
void |
setFormKeyWithoutCascade(String formKey) |
void |
setInitialAssignee(String assignee) |
void |
setLocalizedDescription(String localizedDescription)
Sets an optional localized description for the task.
|
void |
setLocalizedName(String localizedName)
Sets an optional localized name for the task.
|
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 |
setOwner(String owner,
boolean dispatchUpdateEvent) |
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)
Sets the indication of how important/urgent this task is
|
void |
setPriority(int priority,
boolean dispatchUpdateEvent) |
void |
setPriorityWithoutCascade(int priority) |
void |
setProcessDefinitionId(String processDefinitionId) |
void |
setProcessInstance(ExecutionEntity processInstance) |
void |
setProcessInstanceId(String processInstanceId) |
void |
setQueryVariables(List<VariableInstanceEntity> queryVariables) |
void |
setRevision(int revision) |
void |
setSuspensionState(int suspensionState) |
void |
setTaskDefinition(TaskDefinition taskDefinition) |
void |
setTaskDefinitionKey(String taskDefinitionKey) |
void |
setTaskDefinitionKeyWithoutCascade(String taskDefinitionKey) |
void |
setTenantId(String tenantId)
Change the tenantId of the task
|
String |
toString() |
void |
update() |
protected void |
updateVariableInstance(VariableInstanceEntity variableInstance,
Object value,
ExecutionEntity sourceActivityExecution) |
collectTransientVariables, collectVariableInstances, collectVariableNames, collectVariables, createVariableLocal, createVariableLocal, createVariablesLocal, deleteVariableInstanceForExplicitUserCall, deleteVariablesInstanceForLeavingScope, ensureVariableInstancesInitialized, getCachedElContext, getId, getSourceActivityExecution, getTransientVariable, getTransientVariableLocal, getTransientVariables, getTransientVariablesLocal, getUsedVariablesCache, getVariable, getVariable, getVariable, getVariableInstance, getVariableInstance, getVariableInstanceLocal, getVariableInstanceLocal, getVariableInstances, getVariableInstances, getVariableInstances, getVariableInstancesLocal, getVariableInstancesLocal, getVariableInstancesLocal, getVariableLocal, getVariableLocal, getVariableLocal, getVariableNames, getVariableNamesLocal, getVariables, getVariables, getVariables, getVariablesLocal, getVariablesLocal, getVariablesLocal, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeTransientVariable, removeTransientVariableLocal, removeTransientVariables, removeTransientVariablesLocal, removeVariable, removeVariable, removeVariableLocal, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setCachedElContext, setId, setTransientVariable, setTransientVariableLocal, setTransientVariables, setTransientVariablesLocal, setVariable, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariableLocal, setVariables, setVariablesLocalclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetIdgetTransientVariable, getTransientVariableLocal, getTransientVariables, getTransientVariablesLocal, getVariable, getVariable, getVariable, getVariableInstance, getVariableInstance, getVariableInstanceLocal, getVariableInstanceLocal, getVariableInstances, getVariableInstances, getVariableInstances, getVariableInstancesLocal, getVariableInstancesLocal, getVariableInstancesLocal, getVariableLocal, getVariableLocal, getVariableLocal, getVariableNames, getVariableNamesLocal, getVariables, getVariables, getVariables, getVariablesLocal, getVariablesLocal, getVariablesLocal, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeTransientVariable, removeTransientVariableLocal, removeTransientVariables, removeTransientVariablesLocal, removeVariable, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setTransientVariable, setTransientVariableLocal, setTransientVariables, setTransientVariablesLocal, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariables, setVariablesLocalgetId, setIdpublic static final String DELETE_REASON_COMPLETED
public static final String DELETE_REASON_DELETED
protected int revision
protected String owner
protected String assignee
protected String initialAssignee
protected DelegationState delegationState
protected String parentTaskId
protected String name
protected String localizedName
protected String description
protected String localizedDescription
protected int priority
protected Date createTime
protected Date dueDate
protected int suspensionState
protected String category
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 String formKey
protected boolean isDeleted
protected String eventName
protected String eventHandlerId
protected String tenantId
protected List<VariableInstanceEntity> queryVariables
protected boolean forcedUpdate
public TaskEntity()
public TaskEntity(String taskId)
public static TaskEntity createAndInsert(ActivityExecution execution, boolean fireEvents)
public void insert(ExecutionEntity execution, boolean fireEvents)
public void update()
public static TaskEntity create(Date createTime)
#insert(ExecutionEntity)).public void complete(Map variablesMap, boolean localScope, boolean fireEvents)
public void delegate(String userId)
TaskdelegationState 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()
PersistentObjectgetPersistentState in interface PersistentObjectpublic int getRevisionNext()
getRevisionNext in interface HasRevisionpublic void forceUpdate()
protected VariableScopeImpl getParentVariableScope()
getParentVariableScope in class VariableScopeImplprotected void initializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance)
initializeVariableInstanceBackPointer in class VariableScopeImplprotected List<VariableInstanceEntity> loadVariableInstances()
loadVariableInstances in class VariableScopeImplprotected VariableInstanceEntity createVariableInstance(String variableName, Object value, ExecutionEntity sourceActivityExecution)
createVariableInstance in class VariableScopeImplprotected void updateVariableInstance(VariableInstanceEntity variableInstance, Object value, ExecutionEntity sourceActivityExecution)
updateVariableInstance in class VariableScopeImplpublic ExecutionEntity getExecution()
public void setExecution(DelegateExecution execution)
public IdentityLinkEntity addIdentityLink(String userId, String groupId, String type)
public Set<IdentityLink> getCandidates()
DelegateTaskgetCandidates in interface DelegateTaskIdentityLinks of type IdentityLinkType.CANDIDATE.public void addCandidateUser(String userId)
DelegateTaskaddCandidateUser in interface DelegateTaskpublic void addCandidateUsers(Collection<String> candidateUsers)
DelegateTaskaddCandidateUsers in interface DelegateTaskpublic void addCandidateGroup(String groupId)
DelegateTaskaddCandidateGroup in interface DelegateTaskpublic void addCandidateGroups(Collection<String> candidateGroups)
DelegateTaskaddCandidateGroups in interface DelegateTaskpublic void addGroupIdentityLink(String groupId, String identityLinkType)
DelegateTaskaddGroupIdentityLink in interface DelegateTaskgroupId - 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)
DelegateTaskaddUserIdentityLink in interface DelegateTaskuserId - id of the user involve, cannot be null.identityLinkType - type of identityLink, cannot be null (@see IdentityLinkType).public void deleteCandidateGroup(String groupId)
DelegateTaskDelegateTask.deleteGroupIdentityLink(String, String); with type IdentityLinkType.CANDIDATEdeleteCandidateGroup in interface DelegateTaskgroupId - id of the group to use as candidate, cannot be null.public void deleteCandidateUser(String userId)
DelegateTaskDelegateTask.deleteUserIdentityLink(String, String) ; with type IdentityLinkType.CANDIDATEdeleteCandidateUser in interface DelegateTaskuserId - id of the user to use as candidate, cannot be null.public void deleteGroupIdentityLink(String groupId, String identityLinkType)
DelegateTaskdeleteGroupIdentityLink in interface DelegateTaskgroupId - 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)
DelegateTaskdeleteUserIdentityLink in interface DelegateTaskuserId - 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)
TasksetName in interface TasksetName in interface DelegateTaskpublic void setNameWithoutCascade(String taskName)
public void setDescription(String description)
TasksetDescription in interface TasksetDescription in interface DelegateTaskpublic void setDescriptionWithoutCascade(String description)
public void setAssignee(String assignee)
TaskuserId of the person to which this task is delegated.setAssignee in interface TasksetAssignee in interface DelegateTaskpublic void setAssignee(String assignee, boolean dispatchAssignmentEvent, boolean dispatchUpdateEvent)
public void setAssigneeWithoutCascade(String assignee)
public void setOwner(String owner)
TaskuserId of the person that is responsible for this task.setOwner in interface TasksetOwner in interface DelegateTaskpublic void setOwner(String owner, boolean dispatchUpdateEvent)
public void setOwnerWithoutCascade(String owner)
public void setDueDate(Date dueDate)
TasksetDueDate in interface TasksetDueDate in interface DelegateTaskpublic void setDueDate(Date dueDate, boolean dispatchUpdateEvent)
public void setDueDateWithoutCascade(Date dueDate)
public void setPriority(int priority)
TasksetPriority in interface TasksetPriority in interface DelegateTaskpublic void setPriority(int priority,
boolean dispatchUpdateEvent)
public void setCategoryWithoutCascade(String category)
public void setCategory(String category)
TasksetCategory in interface TasksetCategory in interface DelegateTaskpublic void setPriorityWithoutCascade(int priority)
public void setParentTaskId(String parentTaskId)
TasksetParentTaskId in interface Taskpublic void setParentTaskIdWithoutCascade(String parentTaskId)
public void setTaskDefinitionKeyWithoutCascade(String taskDefinitionKey)
public String getFormKey()
TaskInfogetFormKey in interface TaskInfogetFormKey in interface DelegateTaskpublic void setFormKey(String formKey)
TasksetFormKey in interface TasksetFormKey in interface DelegateTaskpublic void setFormKeyWithoutCascade(String formKey)
public void fireEvent(String taskEventName)
protected boolean isActivityIdUsedForDetails()
VariableScopeImplisActivityIdUsedForDetails in class VariableScopeImplprotected VariableInstanceEntity getSpecificVariable(String variableName)
getSpecificVariable in class VariableScopeImplprotected List<VariableInstanceEntity> getSpecificVariables(Collection<String> variableNames)
getSpecificVariables in class VariableScopeImplpublic void setTaskDefinition(TaskDefinition taskDefinition)
public TaskDefinition getTaskDefinition()
public int getRevision()
getRevision in interface HasRevisionpublic void setRevision(int revision)
setRevision in interface HasRevisionpublic String getName()
TaskInfogetName in interface TaskInfogetName in interface DelegateTaskpublic String getLocalizedName()
public void setLocalizedName(String localizedName)
TasksetLocalizedName in interface Taskpublic String getDescription()
TaskInfogetDescription in interface TaskInfogetDescription in interface DelegateTaskpublic String getLocalizedDescription()
public void setLocalizedDescription(String localizedDescription)
TasksetLocalizedDescription in interface Taskpublic Date getDueDate()
TaskInfogetDueDate in interface TaskInfogetDueDate in interface DelegateTaskpublic int getPriority()
TaskInfogetPriority in interface TaskInfogetPriority in interface DelegateTaskpublic Date getCreateTime()
TaskInfogetCreateTime in interface TaskInfogetCreateTime in interface DelegateTaskpublic void setCreateTime(Date createTime)
public String getExecutionId()
TaskInfogetExecutionId in interface TaskInfogetExecutionId in interface DelegateTaskpublic String getProcessInstanceId()
TaskInfogetProcessInstanceId in interface TaskInfogetProcessInstanceId in interface DelegateTaskpublic String getProcessDefinitionId()
TaskInfogetProcessDefinitionId in interface TaskInfogetProcessDefinitionId in interface DelegateTaskpublic void setProcessDefinitionId(String processDefinitionId)
public String getAssignee()
TaskInfouserId of the person to which this task is delegated.getAssignee in interface TaskInfogetAssignee in interface DelegateTaskpublic void setInitialAssignee(String assignee)
public String getTaskDefinitionKey()
TaskInfogetTaskDefinitionKey in interface TaskInfogetTaskDefinitionKey in interface DelegateTaskpublic void setTaskDefinitionKey(String taskDefinitionKey)
public String getEventName()
DelegateTaskgetEventName in interface DelegateTaskpublic void setEventName(String eventName)
public String getEventHandlerId()
DelegateTaskgetEventHandlerId in interface DelegateTaskpublic void setEventHandlerId(String eventHandlerId)
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()
TaskInfouserId of the person that is responsible for this task.getOwner in interface TaskInfogetOwner in interface DelegateTaskpublic DelegationState getDelegationState()
TaskDelegationState for this task.getDelegationState in interface TaskgetDelegationState in interface DelegateTaskpublic void setDelegationState(DelegationState delegationState)
TaskDelegationState for this task.setDelegationState in interface Taskpublic String getDelegationStateString()
public void setDelegationStateString(String delegationStateString)
public boolean isDeleted()
public void setDeleted(boolean isDeleted)
public String getParentTaskId()
TaskInfogetParentTaskId in interface TaskInfopublic Map<String,VariableInstanceEntity> getVariableInstanceEntities()
getVariableInstanceEntities in class VariableScopeImplpublic int getSuspensionState()
public void setSuspensionState(int suspensionState)
public String getCategory()
TaskInfogetCategory in interface TaskInfogetCategory in interface DelegateTaskpublic boolean isSuspended()
TaskisSuspended in interface TaskisSuspended in interface DelegateTaskpublic Map<String,Object> getTaskLocalVariables()
TaskInfogetTaskLocalVariables in interface TaskInfopublic Map<String,Object> getProcessVariables()
TaskInfogetProcessVariables in interface TaskInfopublic String getTenantId()
TaskInfogetTenantId in interface TaskInfogetTenantId in interface VariableContainergetTenantId in interface DelegateTaskpublic void setTenantId(String tenantId)
TasksetTenantId in interface Taskpublic List<VariableInstanceEntity> getQueryVariables()
public void setQueryVariables(List<VariableInstanceEntity> queryVariables)
Copyright © 2023 Flowable. All rights reserved.