Agentflow
V3.1

pe.pase
Class Task

java.lang.Object
  extended by pe.pase.Task
All Implemented Interfaces:
com.flowring.entity.Entity, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
AFTask, ATask, CSTask, IapTask

public class Task
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable, com.flowring.entity.Entity

An representation of Task.

Version:
1.1.5
Author:
yschen@flowring.com
See Also:
DBProcess, Serialized Form

Field Summary
static java.lang.String ADD_DEP_MODE_MANAGER
           
static java.lang.String ADD_DEP_MODE_MEMBERS
           
static java.lang.String ADD_PARALLEL_ANNOUNCE
           
static java.lang.String ADD_SEQUENTIAL_ANNOUNCE
           
static java.lang.String ADD_SEQUENTIAL_SIGN
           
protected  java.util.Vector addASAuditList
           
protected  java.lang.String addASDepMode
           
protected  java.lang.String addASTitle
           
protected  java.lang.String addASType
           
protected  java.util.HashMap addPAWeightList
           
static java.lang.String API
          API: Initialized by createProcess API.
protected  java.lang.String attachedFileList
           
protected  java.lang.String attachedFileListSuspend
           
protected  java.lang.String bindingPolicy
           
 long calendarDeadline
           
protected  java.lang.String callId
           
protected  boolean changeArtState
           
protected  java.lang.String comId
           
static java.lang.String CRON_SERVER
          CronSer: Initialized by cron Server (for system auto-start).
static java.lang.String DELIBLE
          set the root task delible
protected  java.lang.String depId
           
protected  long duration
           
protected  long endTime
           
protected  boolean executeAddAS
           
protected  java.lang.String exeId
           
protected  int exeOrder
           
protected  java.util.Vector extCond
           
protected  java.lang.String frontId
           
protected  java.lang.String frontUser
           
protected  long GMTLimitTime
           
protected  long GMTStartTime
           
protected  java.lang.String keyWord
           
protected  java.lang.String memId
           
static java.lang.String MEMO_BEGIN_STRING
          The title of Memo for distinuishing suggestion of different user in Memo
protected  java.util.Vector monitorRelation
           
static java.lang.String MRINVISIBLE
           
protected  java.lang.String note
           
protected  java.util.Vector oprInstanceList
           
protected  java.lang.String parentId
           
static java.lang.String POPUP
          set the task popup
protected  int priority
           
static int PRIORITY_HIGH
          task priority: high
static int PRIORITY_HIGHEST
          task priority: highest
static int PRIORITY_NORMAL
          task priority: normal
protected  java.lang.String privateMemo
           
protected  java.lang.String prjId
           
protected  java.lang.String prjName
           
protected  java.lang.String processId
           
protected  java.util.Vector refInstanceList
           
protected  java.lang.String roleId
           
static java.lang.String ROOT
          Root: Initialized by user (from Agenda UI).
protected  java.lang.String rootId
           
protected  java.lang.String rootName
           
protected  java.lang.String rootUser
           
protected  long startTime
           
protected  java.lang.String synopsis
           
static int T_STATE_ALL
           
static int T_STATE_CLIENT_WAITING
           
static int T_STATE_COMPLETE
           
static int T_STATE_DEAD
           
static int T_STATE_IGNORE
           
static int T_STATE_LOCK
           
static int T_STATE_QUEUE
           
static int T_STATE_READY
           
static int T_STATE_RUNNING
           
static int T_STATE_SERVER_WAITING
           
static int T_STATE_SUSPENDED
           
static java.lang.String TASK_SORT_DEPID
          task sorting: DepID
static java.lang.String TASK_SORT_ENDTIME
          task sorting: EndTime
static java.lang.String TASK_SORT_EXEID
          task sorting: ExeID
static java.lang.String TASK_SORT_KEYWORD
          task sorting: KeyWord
static java.lang.String TASK_SORT_MEMID
          task sorting: MemID
static java.lang.String TASK_SORT_PRIORITY
          task sorting: Priority
static java.lang.String TASK_SORT_PROID
          task sorting: ProID
static java.lang.String TASK_SORT_ROLID
          task sorting: RolID
static java.lang.String TASK_SORT_STARTTIME
          task sorting: StartTime
static java.lang.String TASK_SORT_STATE
          task sorting: State
static java.lang.String TASK_SORT_TYPE
          task sorting: Type
static java.lang.String TASK_STATE_CLIENT_WAITING
          This is for internal use only, such as scheduled job, flow control, etc.
static java.lang.String TASK_STATE_COMPLETE
          While the task owner 'submits' it, its state will be TASK_STATE_COMPLETE.
static java.lang.String TASK_STATE_DEAD
          By programming, a task's state can be set to be 'dead' meaning that it is not complete normally.
static java.lang.String TASK_STATE_IGNORE
          Ignored countersigned task.
static java.lang.String TASK_STATE_LOCK
          By programming, a task is locked to prevent others from operating it, while the main thread is doing something on it.
static java.lang.String TASK_STATE_PREPARE
          While a task is initializing, its state will be TASK_STATE_PREPARE.
static java.lang.String TASK_STATE_QUEUE
          While a task is initialized and a task owner is bound to and the 'Assign Policy' of 'Role Information' is set to be 'Queue' in 'Process Definition', its state will be TASK_STATE_QUEUE before this task is 'opened' by its owner.
static java.lang.String TASK_STATE_READY
          While a task is initialized and a task owner is bound to and the 'Assign Policy' of 'Role Information' is set to be 'Random' in 'Process Definition', its state will be TASK_STATE_READY before this task is 'opened' by its owner.
static java.lang.String TASK_STATE_RETRIEVED
           
static java.lang.String TASK_STATE_RUNNING
          Task state is in TASK_STATE_RUNNING, after the task is 'opened' by its owner.
static java.lang.String TASK_STATE_SERVER_WAITING
          This is for internal use only, such as scheduled job, flow control, etc.
static java.lang.String TASK_STATE_SIGNING
          Meaning that a task is in 'signing' state.
static java.lang.String TASK_STATE_SUSPENDED
          Task state is in TASK_STATE_SUSPENDED, while its owner 'suspends' it.
protected  java.lang.String taskId
           
protected  java.lang.String taskName
           
protected  java.lang.String taskState
           
protected  java.lang.String taskType
           
 
Constructor Summary
Task()
           
Task(java.lang.String taskId)
          Creates a new Task.
 
Method Summary
 void addAddASAudit(java.lang.String[] memData)
          Add a member into "Add Anounce Sign" list, add one person at a time.
 void addAddASAudit(java.lang.String memID, java.lang.String roleID, java.lang.String depID)
          Add a member into "Add Anounce Sign" list, add one person at a time.
 void addExtCond(ProLinkTerm term)
          Add a exist condition.
 void addMonitorRelation(java.util.List list)
           
 void addMonitorRelation(java.lang.String cpRootTskID, java.lang.String cProID)
           
 void addOprArtifact(PASEartInstance aIns)
          Add a operation artifact
 void addRefArtifact(PASEartInstance aIns)
          Add a reference artifact
 java.lang.Object clone()
          Returns a string representation of the task.
 boolean equals(java.lang.Object obj)
          Whether the task object equals the specified object
 java.util.Vector getAddASAuditList()
           
 java.lang.String getAddASAuditsString()
           
 java.lang.String getAddASDepMode()
           
 java.lang.String getAddASResultString()
           
 java.lang.String getAddASTitle()
           
 java.lang.String getAddASType()
           
 float getAddPAWeight(int level)
           
 java.util.HashMap getAddPAWeightList()
           
 java.lang.String getAddPAWeightListStr()
           
 PASEartInstance getArtInstance()
          Get the operation artifact
 java.util.Vector getArtInstanceState()
          Get the artifact state of operation artifact
 java.lang.String getBindingPolicy()
          Get the binding policy
 long getCalendarDeadline()
           
 java.lang.String getCallID()
          Get the call task id
 java.lang.String getCompanyID()
          Get the company id of the company computed by the Agentflow system
 long getDeadLine()
          Gets the deadline of the task.
 java.lang.String getDepartmentID()
          Get the department id of the department computed by the Agentflow system
 long getDurationInMillis()
          get the limit of duration of the task, i.e., the limit of the task processing time based on the member's calendar (office hours, weekend, holiday ect.)
 long getEndTime()
          Get the time which the task completes
 int getExeOrder()
          Get the invocation order.
 java.util.Vector getExtCondList()
          Get the lists of exist condition.
 java.lang.String getFrontID()
          Get the task id of front task
 java.lang.String getFrontUser()
          Get the member name of front task
 long getGMTLimitTime()
           
 long getGMTStartTime()
           
 java.lang.Object getHashKey()
          Get the hash key of this task, this function is used internally.
 java.lang.String getID()
          Get the task id
 java.lang.String getInstanceID()
          Get first artifact instance id that the task operated
 java.lang.String getKeyWord()
          Get the task keyword
 java.lang.String getMemberID()
          Get the member id of the process instantiates the task
 java.util.Vector getMonitorRelation()
           
 java.lang.String getName()
          Get the task name
 java.util.Vector getOprArtifactList()
          Get the lists of operation artifact
 java.lang.String getParentID()
          Get the task id of parent task
 int getPriority()
          Get the task priority
 java.lang.String getPrivateMemo()
           
 java.lang.String getProcessID()
          Get the process id of the process instantiates the task
 java.lang.String getProcessName()
          Get the process name of the process instantiates the task the same as getName
 long getProcessTime()
          Gets the total processing time of an ended task.
 java.lang.String getProjectID()
          Get the project id of the process instantiates the task
 java.lang.String getProjectName()
          Get the project name
 java.lang.String getRealExecutor()
          Get the member id of real executor
 java.util.Vector getRefArtifactList()
          Get the lists of reference artifact
 java.lang.String getRoleID()
          Get the role id of the role computed by the Agentflow system
 java.lang.String getRootID()
          Get the task id of root task
 java.lang.String getRootName()
          Get the task name of root task
 java.lang.String getRootUser()
          Get the root task user name.
 long getStartTime()
          Get the start time of the task execution
 java.lang.String getStartTimeString()
          Get the start time which the task executes
 java.lang.String getSynopsis()
          Get the task synopsis
 java.lang.String getTaskAttachedFileList()
           
 java.lang.String getTaskAttachedFileListSuspend()
           
 java.lang.String getTaskID()
          Get the task id
 java.lang.String getTaskNote()
          Get the task note
 java.lang.String getTaskState()
          Get the task state
 java.lang.String getTaskType()
          Get the task type
 boolean hasAccessibleTaskAttachedFileForExecutor()
           
 boolean isByPass()
           
 boolean isChangeArtState()
           
 boolean isDeleteable()
          Check the task is deleteable or not.
 boolean isExecuteAddAS()
           
 void removeMonitorRelation(java.lang.String cpRootTskID)
           
 boolean removeOprArtifact(PASEartInstance aIns)
          Remove a operation artifact
 boolean removeRefArtifact(PASEartInstance aIns)
          Remove a reference artifact
 void setAddASAuditList(java.util.Vector list)
           
 void setAddASAuditsString(java.lang.String auditString)
           
 void setAddASDepMode(java.lang.String mode)
           
 void setAddASTitle(java.lang.String title)
           
 void setAddASType(java.lang.String type)
           
 void setAddPAWeight(float weight)
           
 void setAddPAWeight(int level, float weight)
           
 void setAddPAWeightList(java.util.HashMap list)
           
 void setAddPAWeightList(java.lang.String str)
           
 void setArtInstance(PASEartInstance aIns)
          Set the operation artifact
 void setBindingPolicy(java.lang.String policy)
          Set the binding policy
 void setByPass(boolean isByPass)
           
 void setCalendarDeadline(long deadLine)
           
 void setCallID(java.lang.String id)
          Set the call task id
 void setChangeArtState(boolean value)
           
 void setCompanyID(java.lang.String comId)
          Set the company id of the company computed by the Agentflow system
 void setDepartmentID(java.lang.String id)
          Set the department id of the department computed by the Agentflow system
 void setDurationInMillis(long t)
          set the limit of duration of the task, i.e., the limit of the task processing time based on the member's calendar (office hours, weekend, holiday ect.)
 void setEndTime(long t)
          Set the time which the task completes
 void setExecuteAddAS(boolean flag)
           
 void setExeOrder(int order)
          Set the invocation order.
 void setExtCondList(java.util.Vector ext)
          Set the lists of exist condition.
 void setFrontID(java.lang.String id)
          Set the task id of front task
 void setFrontUser(java.lang.String name)
          Set the member id of front task
 void setGMTLimitTime(long GMTLimitTime)
           
 void setGMTStartTime(long GMTStartTime)
           
 void setKeyWord(java.lang.String word)
          Set the task keyword under 250 character
 void setMemberID(java.lang.String id)
          Set the member id of the process instantiates the task
 void setMonitorRelation(java.util.Vector list)
           
 void setName(java.lang.String name)
          Set the task name
 void setOprArtifactList(java.util.Vector list)
          Set the lists of operation artifact
 void setParentID(java.lang.String id)
          Set the task id of parent task
 void setPriority(int priority)
          Set the task priority
 void setPrivateMemo(java.lang.String memo)
           
 void setProcessID(java.lang.String id)
          Set the process id of the process instantiates the task (Call by flow system instantiates.
 void setProcessName(java.lang.String name)
          Set the process name of the process instantiates the task (Call by flow system instantiates.
 void setProjectID(java.lang.String id)
          Set the project id of the process instantiates the task (Call by flow system instantiates.
 void setProjectName(java.lang.String name)
          Set the project name (Call by flow system instantiates.
 void setRealExecutor(java.lang.String id)
          Set the member id of real executor
 void setRefArtifactList(java.util.Vector list)
          Set the lists of reference artifact
 void setRoleID(java.lang.String id)
          Set the role id of the role computed by the Agentflow system
 void setRootID(java.lang.String id)
          Set the task id of root task
 void setRootName(java.lang.String name)
          Set the task name of root task
 void setRootUser(java.lang.String name)
          Set the root task user name.
 void setStartTime(long t)
          Set the start time which the task executes
 void setSynopsis(java.lang.String synopsis)
          Set the task synopsis
 void setTaskAttachedFileList(java.lang.String str)
           
 void setTaskAttachedFileListSuspend(java.lang.String str)
           
 void setTaskID(java.lang.String id)
          Set the task id
 void setTaskNote(java.lang.String note)
          Set the task note
 void setTaskState(java.lang.String state)
          Set the task state
 void setTaskType(java.lang.String type)
          Set the task type
 void update(java.lang.Object obj)
          Update the task.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADD_DEP_MODE_MANAGER

public static final java.lang.String ADD_DEP_MODE_MANAGER
See Also:
Constant Field Values

ADD_DEP_MODE_MEMBERS

public static final java.lang.String ADD_DEP_MODE_MEMBERS
See Also:
Constant Field Values

ADD_PARALLEL_ANNOUNCE

public static final java.lang.String ADD_PARALLEL_ANNOUNCE
See Also:
Constant Field Values

ADD_SEQUENTIAL_ANNOUNCE

public static final java.lang.String ADD_SEQUENTIAL_ANNOUNCE
See Also:
Constant Field Values

ADD_SEQUENTIAL_SIGN

public static final java.lang.String ADD_SEQUENTIAL_SIGN
See Also:
Constant Field Values

addASAuditList

protected java.util.Vector addASAuditList

addASDepMode

protected java.lang.String addASDepMode

addASTitle

protected java.lang.String addASTitle

addASType

protected java.lang.String addASType

addPAWeightList

protected java.util.HashMap addPAWeightList

API

public static final java.lang.String API
API: Initialized by createProcess API.

Since:
version 1.0.3
See Also:
Constant Field Values

attachedFileList

protected java.lang.String attachedFileList

attachedFileListSuspend

protected java.lang.String attachedFileListSuspend

bindingPolicy

protected java.lang.String bindingPolicy

calendarDeadline

public long calendarDeadline

callId

protected java.lang.String callId

changeArtState

protected boolean changeArtState

comId

protected java.lang.String comId

CRON_SERVER

public static final java.lang.String CRON_SERVER
CronSer: Initialized by cron Server (for system auto-start).

Since:
version 1.0.3
See Also:
Constant Field Values

DELIBLE

public static final java.lang.String DELIBLE
set the root task delible

See Also:
Constant Field Values

depId

protected java.lang.String depId

duration

protected long duration

endTime

protected long endTime

executeAddAS

protected boolean executeAddAS

exeId

protected java.lang.String exeId

exeOrder

protected int exeOrder

extCond

protected java.util.Vector extCond

frontId

protected java.lang.String frontId

frontUser

protected java.lang.String frontUser

GMTLimitTime

protected long GMTLimitTime

GMTStartTime

protected long GMTStartTime

keyWord

protected java.lang.String keyWord

memId

protected java.lang.String memId

MEMO_BEGIN_STRING

public static final java.lang.String MEMO_BEGIN_STRING
The title of Memo for distinuishing suggestion of different user in Memo

Since:
version 1.0.0
See Also:
Constant Field Values

monitorRelation

protected java.util.Vector monitorRelation

MRINVISIBLE

public static final java.lang.String MRINVISIBLE
See Also:
Constant Field Values

note

protected java.lang.String note

oprInstanceList

protected java.util.Vector oprInstanceList

parentId

protected java.lang.String parentId

POPUP

public static final java.lang.String POPUP
set the task popup

See Also:
Constant Field Values

priority

protected int priority

PRIORITY_HIGH

public static final int PRIORITY_HIGH
task priority: high

Since:
version 1.0.0
See Also:
Constant Field Values

PRIORITY_HIGHEST

public static final int PRIORITY_HIGHEST
task priority: highest

Since:
version 1.0.0
See Also:
Constant Field Values

PRIORITY_NORMAL

public static final int PRIORITY_NORMAL
task priority: normal

Since:
version 1.0.0
See Also:
Constant Field Values

privateMemo

protected java.lang.String privateMemo

prjId

protected java.lang.String prjId

prjName

protected java.lang.String prjName

processId

protected java.lang.String processId

refInstanceList

protected java.util.Vector refInstanceList

roleId

protected java.lang.String roleId

ROOT

public static final java.lang.String ROOT
Root: Initialized by user (from Agenda UI).

Since:
version 1.0.3
See Also:
Constant Field Values

rootId

protected java.lang.String rootId

rootName

protected java.lang.String rootName

rootUser

protected java.lang.String rootUser

startTime

protected long startTime

synopsis

protected java.lang.String synopsis

T_STATE_ALL

public static final int T_STATE_ALL
See Also:
Constant Field Values

T_STATE_CLIENT_WAITING

public static final int T_STATE_CLIENT_WAITING
See Also:
Constant Field Values

T_STATE_COMPLETE

public static final int T_STATE_COMPLETE
See Also:
Constant Field Values

T_STATE_DEAD

public static final int T_STATE_DEAD
See Also:
Constant Field Values

T_STATE_IGNORE

public static final int T_STATE_IGNORE
See Also:
Constant Field Values

T_STATE_LOCK

public static final int T_STATE_LOCK
See Also:
Constant Field Values

T_STATE_QUEUE

public static final int T_STATE_QUEUE
See Also:
Constant Field Values

T_STATE_READY

public static final int T_STATE_READY
See Also:
Constant Field Values

T_STATE_RUNNING

public static final int T_STATE_RUNNING
See Also:
Constant Field Values

T_STATE_SERVER_WAITING

public static final int T_STATE_SERVER_WAITING
See Also:
Constant Field Values

T_STATE_SUSPENDED

public static final int T_STATE_SUSPENDED
See Also:
Constant Field Values

TASK_SORT_DEPID

public static final java.lang.String TASK_SORT_DEPID
task sorting: DepID

Since:
version 1.1.6
See Also:
Constant Field Values

TASK_SORT_ENDTIME

public static final java.lang.String TASK_SORT_ENDTIME
task sorting: EndTime

Since:
version 1.1.6
See Also:
Constant Field Values

TASK_SORT_EXEID

public static final java.lang.String TASK_SORT_EXEID
task sorting: ExeID

Since:
version 1.1.6
See Also:
Constant Field Values

TASK_SORT_KEYWORD

public static final java.lang.String TASK_SORT_KEYWORD
task sorting: KeyWord

Since:
version 1.1.6
See Also:
Constant Field Values

TASK_SORT_MEMID

public static final java.lang.String TASK_SORT_MEMID
task sorting: MemID

Since:
version 1.1.6
See Also:
Constant Field Values

TASK_SORT_PRIORITY

public static final java.lang.String TASK_SORT_PRIORITY
task sorting: Priority

Since:
version 1.1.6
See Also:
Constant Field Values

TASK_SORT_PROID

public static final java.lang.String TASK_SORT_PROID
task sorting: ProID

Since:
version 1.1.6
See Also:
Constant Field Values

TASK_SORT_ROLID

public static final java.lang.String TASK_SORT_ROLID
task sorting: RolID

Since:
version 1.1.6
See Also:
Constant Field Values

TASK_SORT_STARTTIME

public static final java.lang.String TASK_SORT_STARTTIME
task sorting: StartTime

Since:
version 1.1.6
See Also:
Constant Field Values

TASK_SORT_STATE

public static final java.lang.String TASK_SORT_STATE
task sorting: State

Since:
version 1.1.6
See Also:
Constant Field Values

TASK_SORT_TYPE

public static final java.lang.String TASK_SORT_TYPE
task sorting: Type

Since:
version 1.1.6
See Also:
Constant Field Values

TASK_STATE_CLIENT_WAITING

public static final java.lang.String TASK_STATE_CLIENT_WAITING
This is for internal use only, such as scheduled job, flow control, etc. Being used in Client side. While a task is initialized, its state will be TASK_STATE_READY/TASK_STATE_QUEUE, and it will be dispatched to its owner(being seen in "MyTask".) For example, if we want a task to be dispatched to its owner after a scheduled job is completed, we can setTaskState(Task.TASK_STATE_CLIENT_WAITING) after a task is initialized and setTaskState(Task.TASK_STATE_READY).

Since:
version 1.1.6
See Also:
Constant Field Values

TASK_STATE_COMPLETE

public static final java.lang.String TASK_STATE_COMPLETE
While the task owner 'submits' it, its state will be TASK_STATE_COMPLETE.

Since:
version 1.0.0
See Also:
Constant Field Values

TASK_STATE_DEAD

public static final java.lang.String TASK_STATE_DEAD
By programming, a task's state can be set to be 'dead' meaning that it is not complete normally.

Since:
version 1.0.0
See Also:
Constant Field Values

TASK_STATE_IGNORE

public static final java.lang.String TASK_STATE_IGNORE
Ignored countersigned task. For example, if the "Weight" of finished "Add Parallel Announce" tasks is set to be 2/5, and there are 2 tasks has been completed, then those states of the other 3 tasks will be TASK_STATE_IGNORE.

See Also:
Constant Field Values

TASK_STATE_LOCK

public static final java.lang.String TASK_STATE_LOCK
By programming, a task is locked to prevent others from operating it, while the main thread is doing something on it.

Since:
version 1.1.6
See Also:
Constant Field Values

TASK_STATE_PREPARE

public static final java.lang.String TASK_STATE_PREPARE
While a task is initializing, its state will be TASK_STATE_PREPARE.

Since:
version 1.0.0
See Also:
Constant Field Values

TASK_STATE_QUEUE

public static final java.lang.String TASK_STATE_QUEUE
While a task is initialized and a task owner is bound to and the 'Assign Policy' of 'Role Information' is set to be 'Queue' in 'Process Definition', its state will be TASK_STATE_QUEUE before this task is 'opened' by its owner.

Since:
version 1.0.0
See Also:
Constant Field Values

TASK_STATE_READY

public static final java.lang.String TASK_STATE_READY
While a task is initialized and a task owner is bound to and the 'Assign Policy' of 'Role Information' is set to be 'Random' in 'Process Definition', its state will be TASK_STATE_READY before this task is 'opened' by its owner.

Since:
version 1.0.0
See Also:
Constant Field Values

TASK_STATE_RETRIEVED

public static final java.lang.String TASK_STATE_RETRIEVED
See Also:
Constant Field Values

TASK_STATE_RUNNING

public static final java.lang.String TASK_STATE_RUNNING
Task state is in TASK_STATE_RUNNING, after the task is 'opened' by its owner.

Since:
version 1.0.0
See Also:
Constant Field Values

TASK_STATE_SERVER_WAITING

public static final java.lang.String TASK_STATE_SERVER_WAITING
This is for internal use only, such as scheduled job, flow control, etc. Being used in Server side. While a task is initialized, its state will be TASK_STATE_READY/TASK_STATE_QUEUE, and it will be dispatched to its owner(being seen in "MyTask".) For example, if we want a task to be dispatched to its owner after a scheduled job is completed, we can setTaskState(Task.TASK_STATE_SERVER_WAITING) after a task is initialized and setTaskState(Task.TASK_STATE_READY).

Since:
version 1.1.6
See Also:
Constant Field Values

TASK_STATE_SIGNING

public static final java.lang.String TASK_STATE_SIGNING
Meaning that a task is in 'signing' state.

See Also:
Constant Field Values

TASK_STATE_SUSPENDED

public static final java.lang.String TASK_STATE_SUSPENDED
Task state is in TASK_STATE_SUSPENDED, while its owner 'suspends' it.

Since:
version 1.0.0
See Also:
Constant Field Values

taskId

protected java.lang.String taskId

taskName

protected java.lang.String taskName

taskState

protected java.lang.String taskState

taskType

protected java.lang.String taskType
Constructor Detail

Task

public Task()

Task

public Task(java.lang.String taskId)
Creates a new Task.

Parameters:
taskID - task id.
Since:
version 1.0.0
Method Detail

addAddASAudit

public void addAddASAudit(java.lang.String[] memData)
Add a member into "Add Anounce Sign" list, add one person at a time. Because of type-casting behavior between Agentflow script and java, use addAddASAudit(String, String, String) in Agentflow script instead of this method.

Parameters:
memData - the String Array.({MemID, RolID, DepID})

addAddASAudit

public void addAddASAudit(java.lang.String memID,
                          java.lang.String roleID,
                          java.lang.String depID)
Add a member into "Add Anounce Sign" list, add one person at a time.

Parameters:
memID - the MemberID
roleID - the RoleID
depID - the DepartmentID

addExtCond

public void addExtCond(ProLinkTerm term)
Add a exist condition.

Parameters:
term - the given exist condition.
Since:
version 1.0.0
See Also:
ProLinkTerm

addMonitorRelation

public void addMonitorRelation(java.util.List list)

addMonitorRelation

public void addMonitorRelation(java.lang.String cpRootTskID,
                               java.lang.String cProID)

addOprArtifact

public void addOprArtifact(PASEartInstance aIns)
Add a operation artifact

Parameters:
aIns - the given operation artifact
Since:
version 1.1.5
See Also:
PASEartInstance

addRefArtifact

public void addRefArtifact(PASEartInstance aIns)
Add a reference artifact

Parameters:
aIns - the given reference artifact
Since:
version 1.0.0
See Also:
PASEartInstance

clone

public java.lang.Object clone()
Returns a string representation of the task.

Overrides:
clone in class java.lang.Object
Returns:
[task ID] + task Name
Since:
version 1.0.0

equals

public boolean equals(java.lang.Object obj)
Whether the task object equals the specified object

Overrides:
equals in class java.lang.Object
Parameters:
obj - the given object
Returns:
true the task object equals the specified object; false otherwise.
Since:
version 1.0.3

getAddASAuditList

public java.util.Vector getAddASAuditList()

getAddASAuditsString

public java.lang.String getAddASAuditsString()

getAddASDepMode

public java.lang.String getAddASDepMode()

getAddASResultString

public java.lang.String getAddASResultString()

getAddASTitle

public java.lang.String getAddASTitle()

getAddASType

public java.lang.String getAddASType()

getAddPAWeight

public float getAddPAWeight(int level)

getAddPAWeightList

public java.util.HashMap getAddPAWeightList()

getAddPAWeightListStr

public java.lang.String getAddPAWeightListStr()

getArtInstance

public PASEartInstance getArtInstance()
Get the operation artifact

Returns:
the operation artifact
Since:
version 1.0.0
See Also:
PASEartInstance

getArtInstanceState

public java.util.Vector getArtInstanceState()
Get the artifact state of operation artifact

Returns:
the artifact state of operation artifact(each element in the Vector is instance of PASEartState)
Since:
version 1.0.0
See Also:
PASEartInstance

getBindingPolicy

public java.lang.String getBindingPolicy()
Get the binding policy

Returns:
the binding policy(DBProcess.POLICY_RANDOM, DBProcess.POLICY_QUEUE, ...)
Since:
version 1.0.0

getCalendarDeadline

public long getCalendarDeadline()

getCallID

public java.lang.String getCallID()
Get the call task id

Returns:
the call task id
Since:
version 1.0.0

getCompanyID

public java.lang.String getCompanyID()
Get the company id of the company computed by the Agentflow system

Returns:
the company id
Since:
version 3.1

getDeadLine

public final long getDeadLine()
Gets the deadline of the task. Note: there's a 'deadline' in DBProcess' DB schema, which means 'the limit of task processing time', and can be accessed by g/setDuration().

Returns:
long positive - representing a Date, the deadline of the task; 0 - there's no deadline for this task.

getDepartmentID

public java.lang.String getDepartmentID()
Get the department id of the department computed by the Agentflow system

Returns:
the department id
Since:
version 1.0.0

getDurationInMillis

public long getDurationInMillis()
get the limit of duration of the task, i.e., the limit of the task processing time based on the member's calendar (office hours, weekend, holiday ect.)

Returns:
the duration in millis seconds
Since:
version 1.0.0

getEndTime

public long getEndTime()
Get the time which the task completes

Returns:
the time with Date-Format
Since:
version 1.0.0

getExeOrder

public int getExeOrder()
Get the invocation order. The feild of the root task is 1, of the first instantiating task is 1, and so on.

Returns:
the invocation order
Since:
version 1.0.0

getExtCondList

public java.util.Vector getExtCondList()
Get the lists of exist condition.

Returns:
the lists of exist condition.(instance of ProLinkTerm)
Since:
version 1.0.0
See Also:
ProLinkTerm

getFrontID

public java.lang.String getFrontID()
Get the task id of front task

Returns:
the front task id
Since:
version 1.1.6

getFrontUser

public java.lang.String getFrontUser()
Get the member name of front task

Returns:
the Chinese name of member
Since:
version 1.0.0

getGMTLimitTime

public long getGMTLimitTime()

getGMTStartTime

public long getGMTStartTime()

getHashKey

public java.lang.Object getHashKey()
Get the hash key of this task, this function is used internally.

Specified by:
getHashKey in interface com.flowring.entity.Entity
Returns:
the hash key of this object.

getID

public java.lang.String getID()
Get the task id

Returns:
the task id
Since:
version 1.0.0

getInstanceID

public java.lang.String getInstanceID()
Get first artifact instance id that the task operated

Returns:
the artifact instance id
Since:
version 1.0.0
See Also:
PASEartInstance

getKeyWord

public java.lang.String getKeyWord()
Get the task keyword

Returns:
the task keyword
Since:
version 1.0.0

getMemberID

public java.lang.String getMemberID()
Get the member id of the process instantiates the task

Returns:
the member id
Since:
version 1.0.0

getMonitorRelation

public java.util.Vector getMonitorRelation()

getName

public java.lang.String getName()
Get the task name

Returns:
the task name
Since:
version 1.0.0

getOprArtifactList

public java.util.Vector getOprArtifactList()
Get the lists of operation artifact

Returns:
the lists of operation artifact(each element in the Vector is instance of PASEartInstance)
Since:
version 1.1.5
See Also:
PASEartInstance

getParentID

public java.lang.String getParentID()
Get the task id of parent task

Returns:
the task id
Since:
version 1.0.0

getPriority

public int getPriority()
Get the task priority

Returns:
the task priority(Task.PRIORITY_HIGHEST, Task.PRIORITY_HIGH, ...)
Since:
version 1.0.0

getPrivateMemo

public java.lang.String getPrivateMemo()

getProcessID

public java.lang.String getProcessID()
Get the process id of the process instantiates the task

Returns:
the process id
Since:
version 1.0.0

getProcessName

public java.lang.String getProcessName()
Get the process name of the process instantiates the task the same as getName

Returns:
the process name
Since:
version 1.1.6

getProcessTime

public final long getProcessTime()
Gets the total processing time of an ended task. Holidays or non-office-hours are excluded if the office-hours are set in the 'holiday.info' for the PASE Server. Please use this API instedad of 'task.getEndTime() - task.getStartTime()'.

Returns:
long positive value - the total task processing time for an ended task, in milliseconds; negative value or 0 - the task is not ended.

getProjectID

public java.lang.String getProjectID()
Get the project id of the process instantiates the task

Returns:
the project id
Since:
version 1.0.0

getProjectName

public java.lang.String getProjectName()
Get the project name

Returns:
the project name
Since:
version 1.1.6

getRealExecutor

public java.lang.String getRealExecutor()
Get the member id of real executor

Returns:
the member id
Since:
version 1.0.0

getRefArtifactList

public java.util.Vector getRefArtifactList()
Get the lists of reference artifact

Returns:
the lists of reference artifact(each element in the Vector is instance of PASEartInstance)
Since:
version 1.0.0
See Also:
PASEartInstance

getRoleID

public java.lang.String getRoleID()
Get the role id of the role computed by the Agentflow system

Returns:
the role id
Since:
version 1.0.0

getRootID

public java.lang.String getRootID()
Get the task id of root task

Returns:
the task id
Since:
version 1.0.0

getRootName

public java.lang.String getRootName()
Get the task name of root task

Returns:
the task name
Since:
version 1.0.0

getRootUser

public java.lang.String getRootUser()
Get the root task user name. (Initializer)

Returns:
the root user name
Since:
version 1.6

getStartTime

public long getStartTime()
Get the start time of the task execution

Returns:
the start time with Date-Format
Since:
version 1.0.0

getStartTimeString

public java.lang.String getStartTimeString()
Get the start time which the task executes

Returns:
the start time with Format:[yyyy'Year MM'Month dd'Day HH:mm]
Since:
version 1.0.0

getSynopsis

public java.lang.String getSynopsis()
Get the task synopsis

Returns:
the task synopsis
Since:
version 1.0.0

getTaskAttachedFileList

public java.lang.String getTaskAttachedFileList()

getTaskAttachedFileListSuspend

public java.lang.String getTaskAttachedFileListSuspend()

getTaskID

public java.lang.String getTaskID()
Get the task id

Returns:
the task id
Since:
version 1.0.0

getTaskNote

public java.lang.String getTaskNote()
Get the task note

Returns:
the task note
Since:
version 1.0.0

getTaskState

public java.lang.String getTaskState()
Get the task state

Returns:
the task state(Task.TASK_STATE_PREPARE, Task.TASK_STATE_READY, ...)
Since:
version 1.0.0

getTaskType

public java.lang.String getTaskType()
Get the task type

Returns:
the task type(DBProcess.DBProcess.TYPE_ROOT, DBProcess.TYPE_COMPOUND, ...)
Since:
version 1.0.0

hasAccessibleTaskAttachedFileForExecutor

public boolean hasAccessibleTaskAttachedFileForExecutor()

isByPass

public boolean isByPass()

isChangeArtState

public boolean isChangeArtState()

isDeleteable

public boolean isDeleteable()
Check the task is deleteable or not.

Returns:
true the task is deleteable; false otherwise
Since:
version 1.1.5

isExecuteAddAS

public boolean isExecuteAddAS()

removeMonitorRelation

public void removeMonitorRelation(java.lang.String cpRootTskID)

removeOprArtifact

public boolean removeOprArtifact(PASEartInstance aIns)
Remove a operation artifact

Parameters:
aIns - the given operation artifact
Returns:
true if the removal is successful; falseSince:
version 1.1.5
See Also:
PASEartInstance

removeRefArtifact

public boolean removeRefArtifact(PASEartInstance aIns)
Remove a reference artifact

Parameters:
aIns - the given reference artifact
Returns:
true if the removal is successful; false otherwise.
Since:
version 1.0.0
See Also:
PASEartInstance

setAddASAuditList

public void setAddASAuditList(java.util.Vector list)

setAddASAuditsString

public void setAddASAuditsString(java.lang.String auditString)

setAddASDepMode

public void setAddASDepMode(java.lang.String mode)

setAddASTitle

public void setAddASTitle(java.lang.String title)

setAddASType

public void setAddASType(java.lang.String type)

setAddPAWeight

public void setAddPAWeight(float weight)

setAddPAWeight

public void setAddPAWeight(int level,
                           float weight)

setAddPAWeightList

public void setAddPAWeightList(java.util.HashMap list)

setAddPAWeightList

public void setAddPAWeightList(java.lang.String str)

setArtInstance

public void setArtInstance(PASEartInstance aIns)
Set the operation artifact

Parameters:
aIns - the operation artifact
Since:
version 1.0.0
See Also:
PASEartInstance

setBindingPolicy

public void setBindingPolicy(java.lang.String policy)
Set the binding policy

Parameters:
policy - the given binding policy(DBProcess.POLICY_RANDOM, DBProcess.POLICY_QUEUE, ...)
Since:
version 1.0.0

setByPass

public void setByPass(boolean isByPass)

setCalendarDeadline

public void setCalendarDeadline(long deadLine)

setCallID

public void setCallID(java.lang.String id)
Set the call task id

Parameters:
id - the given call task id
Since:
version 1.0.0

setChangeArtState

public void setChangeArtState(boolean value)

setCompanyID

public void setCompanyID(java.lang.String comId)
Set the company id of the company computed by the Agentflow system

Parameters:
id - the given company id
Since:
version 3.1

setDepartmentID

public void setDepartmentID(java.lang.String id)
Set the department id of the department computed by the Agentflow system

Parameters:
id - the given department id
Since:
version 1.0.0

setDurationInMillis

public void setDurationInMillis(long t)
set the limit of duration of the task, i.e., the limit of the task processing time based on the member's calendar (office hours, weekend, holiday ect.)

Parameters:
t - long the time in millis seconds
Since:
version 1.0.0

setEndTime

public void setEndTime(long t)
Set the time which the task completes

Parameters:
t - the given time with Date-Format
Since:
version 1.0.0

setExecuteAddAS

public void setExecuteAddAS(boolean flag)

setExeOrder

public void setExeOrder(int order)
Set the invocation order.

Parameters:
the - given invocation order
Since:
version 1.0.0
See Also:
Task.getExeOrder()

setExtCondList

public void setExtCondList(java.util.Vector ext)
Set the lists of exist condition.

Parameters:
ext - the lists of exist condition.(instance of ProLinkTerm)
Since:
version 1.0.0
See Also:
ProLinkTerm

setFrontID

public void setFrontID(java.lang.String id)
Set the task id of front task

Parameters:
id - the given front task id
Since:
version 1.1.6

setFrontUser

public void setFrontUser(java.lang.String name)
Set the member id of front task

Parameters:
name - the given member id
Since:
version 1.0.0

setGMTLimitTime

public void setGMTLimitTime(long GMTLimitTime)

setGMTStartTime

public void setGMTStartTime(long GMTStartTime)

setKeyWord

public void setKeyWord(java.lang.String word)
Set the task keyword under 250 character

Parameters:
word - the given task keyword
Since:
version 1.0.0

setMemberID

public void setMemberID(java.lang.String id)
Set the member id of the process instantiates the task

Parameters:
id - the given member id
Since:
version 1.0.0

setMonitorRelation

public void setMonitorRelation(java.util.Vector list)

setName

public void setName(java.lang.String name)
Set the task name

Parameters:
name - the given task name
Since:
version 1.0.0

setOprArtifactList

public void setOprArtifactList(java.util.Vector list)
Set the lists of operation artifact

Parameters:
list - the lists of operation artifact(each element in the Vector is instance of PASEartInstance)
Since:
version 1.1.5
See Also:
PASEartInstance

setParentID

public void setParentID(java.lang.String id)
Set the task id of parent task

Parameters:
parent - the given task id
Since:
version 1.0.0

setPriority

public void setPriority(int priority)
Set the task priority

Parameters:
the - task priority(Task.PRIORITY_HIGHEST, Task.PRIORITY_HIGH, ...)
Since:
version 1.0.0

setPrivateMemo

public void setPrivateMemo(java.lang.String memo)

setProcessID

public void setProcessID(java.lang.String id)
Set the process id of the process instantiates the task (Call by flow system instantiates. Data change is inefficacious )

Parameters:
id - the given process id
Since:
version 1.0.0

setProcessName

public void setProcessName(java.lang.String name)
Set the process name of the process instantiates the task (Call by flow system instantiates. Data change is inefficacious )

Parameters:
id - the given process name
Since:
version 1.1.6

setProjectID

public void setProjectID(java.lang.String id)
Set the project id of the process instantiates the task (Call by flow system instantiates. Data change is inefficacious )

Parameters:
id - the given project id
Since:
version 1.0.0

setProjectName

public void setProjectName(java.lang.String name)
Set the project name (Call by flow system instantiates. Data change is inefficacious )

Parameters:
id - the given project name
Since:
version 1.1.6

setRealExecutor

public void setRealExecutor(java.lang.String id)
Set the member id of real executor

Parameters:
mID - the given member id
Since:
version 1.0.0

setRefArtifactList

public void setRefArtifactList(java.util.Vector list)
Set the lists of reference artifact

Parameters:
list - the lists of reference artifact(each element in the Vector is instance of PASEartInstance)
Since:
version 1.0.0
See Also:
PASEartInstance

setRoleID

public void setRoleID(java.lang.String id)
Set the role id of the role computed by the Agentflow system

Parameters:
id - the given role id
Since:
version 1.0.0

setRootID

public void setRootID(java.lang.String id)
Set the task id of root task

Parameters:
rootID - the given task id
Since:
version 1.0.0

setRootName

public void setRootName(java.lang.String name)
Set the task name of root task

Parameters:
name - the given task name
Since:
version 1.0.0

setRootUser

public void setRootUser(java.lang.String name)
Set the root task user name. (Initializer)

Parameters:
name - the root user name
Since:
version 1.6

setStartTime

public void setStartTime(long t)
Set the start time which the task executes

Parameters:
t - the given start time with Date-Format
Since:
version 1.0.0

setSynopsis

public void setSynopsis(java.lang.String synopsis)
Set the task synopsis

Parameters:
syno - the given task synopsis
Since:
version 1.0.0

setTaskAttachedFileList

public void setTaskAttachedFileList(java.lang.String str)

setTaskAttachedFileListSuspend

public void setTaskAttachedFileListSuspend(java.lang.String str)

setTaskID

public void setTaskID(java.lang.String id)
Set the task id

Parameters:
id - the given task id
Since:
version 1.0.0

setTaskNote

public void setTaskNote(java.lang.String note)
Set the task note

Parameters:
note - the given TaskNote
Since:
version 1.0.0

setTaskState

public void setTaskState(java.lang.String state)
Set the task state

Parameters:
s - the given task state(Task.TASK_STATE_PREPARE, Task.TASK_STATE_READY, ...)
Since:
version 1.0.3

setTaskType

public void setTaskType(java.lang.String type)
Set the task type

Since:
version 1.0.0

update

public void update(java.lang.Object obj)
Update the task.

Specified by:
update in interface com.flowring.entity.Entity
Parameters:
obj - the given new Task object
Since:
version 1.0.0

Agentflow
V3.1

Submit a bug or feature
Copyright 1999-2010 Flowring , Inc. 12F., No.120, Sec2, Gongdao 5th Rd.,
Hsinchu City 300, Taiwan (R.O.C.) All Rights Reserved.