org.activiti.engine.impl.persistence.entity
类 TaskEntity

java.lang.Object
  继承者 org.activiti.engine.impl.persistence.entity.VariableScopeImpl
      继承者 org.activiti.engine.impl.persistence.entity.TaskEntity
所有已实现的接口:
Serializable, DelegateTask, VariableScope, HasRevision, PersistentObject, Task

public class TaskEntity
extends VariableScopeImpl
implements Task, DelegateTask, Serializable, PersistentObject, HasRevision

作者:
Tom Baeyens, Joram Barrez, Falko Menge, Tijs Rademakers
另请参见:
序列化表格

字段摘要
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  List<VariableInstanceEntity> queryVariables
           
protected  int revision
           
protected  int suspensionState
           
protected  TaskDefinition taskDefinition
           
protected  String taskDefinitionKey
           
protected  List<IdentityLinkEntity> taskIdentityLinkEntities
           
 
从类 org.activiti.engine.impl.persistence.entity.VariableScopeImpl 继承的字段
cachedElContext, id, variableInstances
 
从接口 org.activiti.engine.task.Task 继承的字段
DEFAULT_PRIORITY
 
构造方法摘要
TaskEntity()
           
TaskEntity(String taskId)
           
 
方法摘要
 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()
          Creates a 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.
 void fireEvent(String taskEventName)
           
 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.
 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
 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()
           
 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
 Map<String,VariableInstanceEntity> getVariableInstances()
           
protected  void initializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance)
           
 void insert(ExecutionEntity execution)
           
protected  boolean isActivityIdUsedForDetails()
          Execution variable updates have activity instance ids, but historic task variable updates don't.
 boolean isDeleted()
           
 boolean isSuspended()
          Indicated 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 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)
          Sets the indication of how important/urgent this task is
 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)
           
 String toString()
           
 void update()
           
 
从类 org.activiti.engine.impl.persistence.entity.VariableScopeImpl 继承的方法
collectVariableNames, collectVariables, createVariableInstance, createVariableLocal, createVariableLocal, createVariablesLocal, deleteVariableInstanceForExplicitUserCall, deleteVariablesInstanceForLeavingScope, ensureVariableInstancesInitialized, getCachedElContext, getId, getSourceActivityExecution, getVariable, getVariableLocal, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariable, removeVariableLocal, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setCachedElContext, setId, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariables, setVariablesLocal, updateVariableInstance
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
从接口 org.activiti.engine.task.Task 继承的方法
getId
 
从接口 org.activiti.engine.delegate.DelegateTask 继承的方法
getId
 
从接口 org.activiti.engine.delegate.VariableScope 继承的方法
createVariableLocal, getVariable, getVariableLocal, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setVariable, setVariableLocal, setVariables, setVariablesLocal
 
从接口 org.activiti.engine.impl.db.PersistentObject 继承的方法
getId, setId
 

字段详细信息

DELETE_REASON_COMPLETED

public static final String DELETE_REASON_COMPLETED
另请参见:
常量字段值

DELETE_REASON_DELETED

public static final String DELETE_REASON_DELETED
另请参见:
常量字段值

revision

protected int revision

owner

protected String owner

assignee

protected String assignee

delegationState

protected DelegationState delegationState

parentTaskId

protected String parentTaskId

name

protected String name

description

protected String description

priority

protected int priority

createTime

protected Date createTime

dueDate

protected Date dueDate

suspensionState

protected int suspensionState

isIdentityLinksInitialized

protected boolean isIdentityLinksInitialized

taskIdentityLinkEntities

protected List<IdentityLinkEntity> taskIdentityLinkEntities

executionId

protected String executionId

execution

protected ExecutionEntity execution

processInstanceId

protected String processInstanceId

processInstance

protected ExecutionEntity processInstance

processDefinitionId

protected String processDefinitionId

taskDefinition

protected TaskDefinition taskDefinition

taskDefinitionKey

protected String taskDefinitionKey

isDeleted

protected boolean isDeleted

eventName

protected String eventName

queryVariables

protected List<VariableInstanceEntity> queryVariables
构造方法详细信息

TaskEntity

public TaskEntity()

TaskEntity

public TaskEntity(String taskId)
方法详细信息

createAndInsert

public static TaskEntity createAndInsert(ActivityExecution execution)
creates and initializes a new persistent task.


insert

public void insert(ExecutionEntity execution)

update

public void update()

create

public static TaskEntity create()
Creates a new task. Embedded state and create time will be initialized. But this task still will have to be persisted. See insert(ExecutionEntity).


complete

public void complete()

delegate

public void delegate(String userId)
从接口 Task 复制的描述
delegates this task to the given user and sets the delegationState to DelegationState.PENDING. If no owner is set on the task, the owner is set to the current assignee of the task.

指定者:
接口 Task 中的 delegate

resolve

public void resolve()

getPersistentState

public Object getPersistentState()
从接口 PersistentObject 复制的描述
Returns a representation of the object, as would be stored in the database. Used when deciding if updates have occurred to the object or not since it was last loaded.

指定者:
接口 PersistentObject 中的 getPersistentState

getRevisionNext

public int getRevisionNext()
指定者:
接口 HasRevision 中的 getRevisionNext

getParentVariableScope

protected VariableScopeImpl getParentVariableScope()
指定者:
VariableScopeImpl 中的 getParentVariableScope

initializeVariableInstanceBackPointer

protected void initializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance)
指定者:
VariableScopeImpl 中的 initializeVariableInstanceBackPointer

loadVariableInstances

protected List<VariableInstanceEntity> loadVariableInstances()
指定者:
VariableScopeImpl 中的 loadVariableInstances

getExecution

public ExecutionEntity getExecution()
从接口 DelegateTask 复制的描述
Returns the execution currently at the task.

指定者:
接口 DelegateTask 中的 getExecution

setExecution

public void setExecution(DelegateExecution execution)

addIdentityLink

public IdentityLinkEntity addIdentityLink(String userId,
                                          String groupId,
                                          String type)

deleteIdentityLink

public void deleteIdentityLink(String userId,
                               String groupId,
                               String type)

getCandidates

public Set<IdentityLink> getCandidates()
从接口 DelegateTask 复制的描述
Retrieves the candidate users and groups associated with the task.

指定者:
接口 DelegateTask 中的 getCandidates
返回:
set of IdentityLinks of type IdentityLinkType.CANDIDATE.

addCandidateUser

public void addCandidateUser(String userId)
从接口 DelegateTask 复制的描述
Adds the given user as a candidate user to this task.

指定者:
接口 DelegateTask 中的 addCandidateUser

addCandidateUsers

public void addCandidateUsers(Collection<String> candidateUsers)
从接口 DelegateTask 复制的描述
Adds multiple users as candidate user to this task.

指定者:
接口 DelegateTask 中的 addCandidateUsers

addCandidateGroup

public void addCandidateGroup(String groupId)
从接口 DelegateTask 复制的描述
Adds the given group as candidate group to this task

指定者:
接口 DelegateTask 中的 addCandidateGroup

addCandidateGroups

public void addCandidateGroups(Collection<String> candidateGroups)
从接口 DelegateTask 复制的描述
Adds multiple groups as candidate group to this task.

指定者:
接口 DelegateTask 中的 addCandidateGroups

addGroupIdentityLink

public void addGroupIdentityLink(String groupId,
                                 String identityLinkType)
从接口 DelegateTask 复制的描述
Involves a group with group task. The type of identityLink is defined by the given identityLink.

指定者:
接口 DelegateTask 中的 addGroupIdentityLink
参数:
groupId - id of the group to involve, cannot be null.
identityLinkType - type of identity, cannot be null (@see IdentityLinkType).

addUserIdentityLink

public void addUserIdentityLink(String userId,
                                String identityLinkType)
从接口 DelegateTask 复制的描述
Involves a user with a task. The type of identity link is defined by the given identityLinkType.

指定者:
接口 DelegateTask 中的 addUserIdentityLink
参数:
userId - id of the user involve, cannot be null.
identityLinkType - type of identityLink, cannot be null (@see IdentityLinkType).

deleteCandidateGroup

public void deleteCandidateGroup(String groupId)
从接口 DelegateTask 复制的描述
Convenience shorthand for #deleteGroupIdentityLink(String, String, String); with type IdentityLinkType.CANDIDATE

指定者:
接口 DelegateTask 中的 deleteCandidateGroup
参数:
groupId - id of the group to use as candidate, cannot be null.

deleteCandidateUser

public void deleteCandidateUser(String userId)
从接口 DelegateTask 复制的描述
Convenience shorthand for DelegateTask.deleteUserIdentityLink(String, String); with type IdentityLinkType.CANDIDATE

指定者:
接口 DelegateTask 中的 deleteCandidateUser
参数:
userId - id of the user to use as candidate, cannot be null.

deleteGroupIdentityLink

public void deleteGroupIdentityLink(String groupId,
                                    String identityLinkType)
从接口 DelegateTask 复制的描述
Removes the association between a group and a task for the given identityLinkType.

指定者:
接口 DelegateTask 中的 deleteGroupIdentityLink
参数:
groupId - id of the group to involve, cannot be null.
identityLinkType - type of identity, cannot be null (@see IdentityLinkType).

deleteUserIdentityLink

public void deleteUserIdentityLink(String userId,
                                   String identityLinkType)
从接口 DelegateTask 复制的描述
Removes the association between a user and a task for the given identityLinkType.

指定者:
接口 DelegateTask 中的 deleteUserIdentityLink
参数:
userId - id of the user involve, cannot be null.
identityLinkType - type of identityLink, cannot be null (@see IdentityLinkType).

getIdentityLinks

public List<IdentityLinkEntity> getIdentityLinks()

getActivityInstanceVariables

public Map<String,Object> getActivityInstanceVariables()

setExecutionVariables

public void setExecutionVariables(Map<String,Object> parameters)

toString

public String toString()
覆盖:
Object 中的 toString

setName

public void setName(String taskName)
从接口 Task 复制的描述
Name or title of the task.

指定者:
接口 DelegateTask 中的 setName
指定者:
接口 Task 中的 setName

setNameWithoutCascade

public void setNameWithoutCascade(String taskName)

setDescription

public void setDescription(String description)
从接口 Task 复制的描述
Change the description of the task

指定者:
接口 DelegateTask 中的 setDescription
指定者:
接口 Task 中的 setDescription

setDescriptionWithoutCascade

public void setDescriptionWithoutCascade(String description)

setAssignee

public void setAssignee(String assignee)
从接口 Task 复制的描述
The userId of the person to which this task is delegated.

指定者:
接口 DelegateTask 中的 setAssignee
指定者:
接口 Task 中的 setAssignee

setAssigneeWithoutCascade

public void setAssigneeWithoutCascade(String assignee)

setOwner

public void setOwner(String owner)
从接口 Task 复制的描述
The userId of the person that is responsible for this task.

指定者:
接口 DelegateTask 中的 setOwner
指定者:
接口 Task 中的 setOwner

setOwnerWithoutCascade

public void setOwnerWithoutCascade(String owner)

setDueDate

public void setDueDate(Date dueDate)
从接口 Task 复制的描述
Change due date of the task.

指定者:
接口 DelegateTask 中的 setDueDate
指定者:
接口 Task 中的 setDueDate

setDueDateWithoutCascade

public void setDueDateWithoutCascade(Date dueDate)

setPriority

public void setPriority(int priority)
从接口 Task 复制的描述
Sets the indication of how important/urgent this task is

指定者:
接口 DelegateTask 中的 setPriority
指定者:
接口 Task 中的 setPriority

setPriorityWithoutCascade

public void setPriorityWithoutCascade(int priority)

setParentTaskId

public void setParentTaskId(String parentTaskId)
从接口 Task 复制的描述
the parent task for which this task is a subtask

指定者:
接口 Task 中的 setParentTaskId

setParentTaskIdWithoutCascade

public void setParentTaskIdWithoutCascade(String parentTaskId)

setTaskDefinitionKeyWithoutCascade

public void setTaskDefinitionKeyWithoutCascade(String taskDefinitionKey)

fireEvent

public void fireEvent(String taskEventName)

isActivityIdUsedForDetails

protected boolean isActivityIdUsedForDetails()
从类 VariableScopeImpl 复制的描述
Execution variable updates have activity instance ids, but historic task variable updates don't.

覆盖:
VariableScopeImpl 中的 isActivityIdUsedForDetails

setTaskDefinition

public void setTaskDefinition(TaskDefinition taskDefinition)

getTaskDefinition

public TaskDefinition getTaskDefinition()

getRevision

public int getRevision()
指定者:
接口 HasRevision 中的 getRevision

setRevision

public void setRevision(int revision)
指定者:
接口 HasRevision 中的 setRevision

getName

public String getName()
从接口 Task 复制的描述
Name or title of the task.

指定者:
接口 DelegateTask 中的 getName
指定者:
接口 Task 中的 getName

getDescription

public String getDescription()
从接口 Task 复制的描述
Free text description of the task.

指定者:
接口 DelegateTask 中的 getDescription
指定者:
接口 Task 中的 getDescription

getDueDate

public Date getDueDate()
从接口 Task 复制的描述
Due date of the task.

指定者:
接口 DelegateTask 中的 getDueDate
指定者:
接口 Task 中的 getDueDate

getPriority

public int getPriority()
从接口 Task 复制的描述
Indication of how important/urgent this task is

指定者:
接口 DelegateTask 中的 getPriority
指定者:
接口 Task 中的 getPriority

getCreateTime

public Date getCreateTime()
从接口 Task 复制的描述
The date/time when this task was created

指定者:
接口 DelegateTask 中的 getCreateTime
指定者:
接口 Task 中的 getCreateTime

setCreateTime

public void setCreateTime(Date createTime)

getExecutionId

public String getExecutionId()
从接口 Task 复制的描述
Reference to the path of execution or null if it is not related to a process instance.

指定者:
接口 DelegateTask 中的 getExecutionId
指定者:
接口 Task 中的 getExecutionId

getProcessInstanceId

public String getProcessInstanceId()
从接口 Task 复制的描述
Reference to the process instance or null if it is not related to a process instance.

指定者:
接口 DelegateTask 中的 getProcessInstanceId
指定者:
接口 Task 中的 getProcessInstanceId

getProcessDefinitionId

public String getProcessDefinitionId()
从接口 Task 复制的描述
Reference to the process definition or null if it is not related to a process.

指定者:
接口 DelegateTask 中的 getProcessDefinitionId
指定者:
接口 Task 中的 getProcessDefinitionId

setProcessDefinitionId

public void setProcessDefinitionId(String processDefinitionId)

getAssignee

public String getAssignee()
从接口 Task 复制的描述
The userId of the person to which this task is delegated.

指定者:
接口 DelegateTask 中的 getAssignee
指定者:
接口 Task 中的 getAssignee

getTaskDefinitionKey

public String getTaskDefinitionKey()
从接口 Task 复制的描述
The id of the activity in the process defining this task or null if this is not related to a process

指定者:
接口 DelegateTask 中的 getTaskDefinitionKey
指定者:
接口 Task 中的 getTaskDefinitionKey

setTaskDefinitionKey

public void setTaskDefinitionKey(String taskDefinitionKey)

getEventName

public String getEventName()
从接口 DelegateTask 复制的描述
Returns the event name which triggered the task listener to fire for this task.

指定者:
接口 DelegateTask 中的 getEventName

setEventName

public void setEventName(String eventName)

setExecutionId

public void setExecutionId(String executionId)

getProcessInstance

public ExecutionEntity getProcessInstance()

setProcessInstance

public void setProcessInstance(ExecutionEntity processInstance)

setExecution

public void setExecution(ExecutionEntity execution)

setProcessInstanceId

public void setProcessInstanceId(String processInstanceId)

getOwner

public String getOwner()
从接口 Task 复制的描述
The userId of the person that is responsible for this task.

指定者:
接口 DelegateTask 中的 getOwner
指定者:
接口 Task 中的 getOwner

getDelegationState

public DelegationState getDelegationState()
从接口 Task 复制的描述
The current DelegationState for this task.

指定者:
接口 Task 中的 getDelegationState

setDelegationState

public void setDelegationState(DelegationState delegationState)
从接口 Task 复制的描述
The current DelegationState for this task.

指定者:
接口 Task 中的 setDelegationState

getDelegationStateString

public String getDelegationStateString()

setDelegationStateString

public void setDelegationStateString(String delegationStateString)

isDeleted

public boolean isDeleted()

setDeleted

public void setDeleted(boolean isDeleted)

getParentTaskId

public String getParentTaskId()
从接口 Task 复制的描述
the parent task for which this task is a subtask

指定者:
接口 Task 中的 getParentTaskId

getVariableInstances

public Map<String,VariableInstanceEntity> getVariableInstances()

getSuspensionState

public int getSuspensionState()

setSuspensionState

public void setSuspensionState(int suspensionState)

isSuspended

public boolean isSuspended()
从接口 Task 复制的描述
Indicated whether this task is suspended or not.

指定者:
接口 Task 中的 isSuspended

getTaskLocalVariables

public Map<String,Object> getTaskLocalVariables()
从接口 Task 复制的描述
Returns the local task variables if requested in the task query

指定者:
接口 Task 中的 getTaskLocalVariables

getProcessVariables

public Map<String,Object> getProcessVariables()
从接口 Task 复制的描述
Returns the process variables if requested in the task query

指定者:
接口 Task 中的 getProcessVariables

getQueryVariables

public List<VariableInstanceEntity> getQueryVariables()

setQueryVariables

public void setQueryVariables(List<VariableInstanceEntity> queryVariables)


Copyright © 2013 Alfresco. All rights reserved.