Agentflow
V3.1

si.wfcidata
Class AFTaskManager

java.lang.Object
  extended by si.wfcidata.AFTaskManager

public class AFTaskManager
extends java.lang.Object

AFTaskManager

Version:
1.1.5,
Author:
Flowring co.

Constructor Summary
AFTaskManager(WFCI wfci)
          Constructor
 
Method Summary
 void bypassAFTask(AFTask task, java.lang.String astID)
          Bypass the AFTask.
 java.util.HashMap completeAFTask(AFTask task)
          Complete the AFTask.
 boolean deleteGlobals(java.lang.String rootTaskID)
          Delete Globals data from database.
 boolean forceReassignAFTask(AFTask task, AFMemberRecord member)
          Force to reassign the AFTask.
 boolean forceReassignAFTask(java.lang.String taskID, java.lang.String memID)
          Force to reassign the AFTask.
 AFArtInstance getAFArtInstance(java.lang.String iID)
          Return an AFartInstance object by ID.
 AFArtInstance getAFArtInstance(java.lang.String iID, java.lang.String tID)
          Return an AFartInstance object by the specific ID and task.
 AFTask getAFTask(java.lang.String tID)
          Return an AFTask object by ID.
 java.util.HashMap getGlobals(java.lang.String rootTaskID)
          Get Globals data from previous setGlobals function.
 AFTaskList getRootTaskOfJoinMember(java.lang.String mID)
          Return root tasks with some specific member is involved in.
 AFTaskList getRootTaskOfJoinMember(java.lang.String mID, int state)
          Return root tasks with the specific member is involved in and the specific state.
 AFTaskList getRootTaskOfJoinMember(java.lang.String mID, java.lang.String proID)
          Return root tasks with the specific member is involved in and the specific state.
 AFTaskList getRootTaskOfMember(java.lang.String mID)
          Return root tasks executed by some specific member.
 AFTaskList getRootTaskOfMember(java.lang.String mID, int state)
          Return root tasks which in some state and executed by some specific member.
 AFTaskList getSubTaskList(java.lang.String parentID)
          Return subtasks of some specific task.
 java.util.Vector getTaskIDListOfMember(java.lang.String mID, int sc, int ec, java.lang.String order)
          Return all task id of some specific member.
 AFTaskList getTaskList(java.lang.String mID)
          Return all tasks of some specific member.
 AFTaskList getTaskOfMember(java.lang.String mID)
          Return tasks executed by some specific member.
 AFTaskList getTaskOfMember(java.lang.String mID, int state)
          Return root tasks which in some state and executed by some specific member.
 AFTaskList getTaskOfRootTask(java.lang.String rootTID)
          Return tasks of some specific root task.
 boolean goBackTo(java.lang.String fromTaskID, java.lang.String toProID, boolean artMode)
          Go back to a former task node in the same process.
 boolean goBackTo(java.lang.String fromTaskID, Task toTask, boolean artMode)
          Go back to a former task node in the same process.
 boolean goBackTo(Task fromTask, java.lang.String toProID, boolean artMode)
          Go back to a former task node in the same process.
 java.util.HashMap goBackToWithDetailRet(Task fromTask, java.lang.String toProID, boolean artMode)
          Go back to a former task node in the same process.
 boolean isLocked(java.lang.String tskID)
          Check if the task is locked.
 void lockAFTask(java.lang.String tskID)
          Lock the root AFTask of the AFTask.
 java.util.HashMap notifyAFTask(java.lang.String tskID)
          Remove be state of waiting of the AFTask.
 boolean pickQueueAFTask(AFTask task)
          Pick the queue of the AFTask.
 boolean removeTaskByAdm(java.lang.String p_RootTaskID)
          Force to remove task.
 boolean removeTaskByUser(java.lang.String p_RootTaskID, java.lang.String p_MemID)
          Force to remove task by the specific member.
 void setGlobals(java.lang.String rootTaskID, java.util.HashMap args)
          Keep data into database and then reuse.
 java.util.HashMap startAFTask(AFTask task)
          Start the AFTask.
 void stopRootTask(java.lang.String rootTaskID)
          Stop the root task.
 java.util.HashMap suspendAFTask(AFTask task)
          Suspend the AFTask.
 void unlockAFTask(java.lang.String tskID)
          UnLock the root AFTask of the AFTask.
 boolean updateAFArtInstance(AFArtInstance instance)
          Update an AFArtInstance instance
 boolean updateAFArtInstance(java.lang.String tID, AFArtInstance instance)
          Update an AFArtInstance instance
 boolean updateAFTask(AFTask t)
          Update the data object of task.
 void waitAFTask(java.lang.String tskID)
          Set the AFTask to be state of waiting
 void waitAFTask(java.lang.String tskID, java.lang.String timeString)
          Set the AFTask to be state of waiting, and the waiting duration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AFTaskManager

public AFTaskManager(WFCI wfci)
Constructor

Parameters:
wfci - WFCI interface
Method Detail

bypassAFTask

public void bypassAFTask(AFTask task,
                         java.lang.String astID)
                  throws WFCIException
Bypass the AFTask.

Parameters:
p_Task - the given AFTask
p_AstID - the given PASEartStateID
Throws:
WFCIException
Since:
version 1.1.5

completeAFTask

public java.util.HashMap completeAFTask(AFTask task)
                                 throws WFCIException
Complete the AFTask.

Parameters:
t - the given AFTask
Returns:
the result ( [Key:Value] = [retValue:Boolean(true)] )
Throws:
WFCIException
Since:
version 1.1.5

deleteGlobals

public boolean deleteGlobals(java.lang.String rootTaskID)
                      throws WFCIException
Delete Globals data from database.

Parameters:
rootTaskID - the givin root TaskID
Returns:
true if it deletes successfully ;false otherwise
Throws:
WFCIException
Since:
version 1.1.5

forceReassignAFTask

public boolean forceReassignAFTask(AFTask task,
                                   AFMemberRecord member)
                            throws WFCIException
Force to reassign the AFTask.

Parameters:
p_Task - the given AFTask
p_MR - the given MemberRecord
Returns:
true if succeeded
Throws:
WFCIException
Since:
version 1.1.5

forceReassignAFTask

public boolean forceReassignAFTask(java.lang.String taskID,
                                   java.lang.String memID)
                            throws WFCIException
Force to reassign the AFTask.

Parameters:
p_TaskID - the given TaskID
p_MemID - the given MemberRecordID
Returns:
true if succeeded
Throws:
WFCIException
Since:
version 1.1.5

getAFArtInstance

public AFArtInstance getAFArtInstance(java.lang.String iID)
                               throws WFCIException
Return an AFartInstance object by ID.

Parameters:
iID - AFArtInstance ID
Returns:
the AFArtInstance
Throws:
WFCIException

getAFArtInstance

public AFArtInstance getAFArtInstance(java.lang.String iID,
                                      java.lang.String tID)
                               throws WFCIException
Return an AFartInstance object by the specific ID and task.

Parameters:
iID - AFArtInstance ID
tID - AFTask ID
Returns:
the AFArtInstance
Throws:
WFCIException

getAFTask

public AFTask getAFTask(java.lang.String tID)
                 throws WFCIException
Return an AFTask object by ID.

Parameters:
tID - AFTask ID
Returns:
the AFTask
Throws:
WFCIException

getGlobals

public java.util.HashMap getGlobals(java.lang.String rootTaskID)
                             throws WFCIException
Get Globals data from previous setGlobals function.

Parameters:
rootTaskID - the givin root TaskID
Returns:
the result ( [Key:Value] = [retValue:Boolean(true/false)])
Throws:
WFCIException
Since:
version 1.1.5

getRootTaskOfJoinMember

public AFTaskList getRootTaskOfJoinMember(java.lang.String mID)
                                   throws WFCIException
Return root tasks with some specific member is involved in. The root tasks' state are not complete or dead.

Parameters:
mID - the given MemberID
Returns:
the correspondence AFTaskList
Throws:
WFCIException
Since:
version 1.1.6
See Also:
AFTaskList

getRootTaskOfJoinMember

public AFTaskList getRootTaskOfJoinMember(java.lang.String mID,
                                          int state)
                                   throws WFCIException
Return root tasks with the specific member is involved in and the specific state.

Parameters:
mID - the given MemberID
state - the given TaskState,see attributes TASK_STATE_XXX in pe.pase.Task
Returns:
the correspondence AFTaskList
Throws:
WFCIException
Since:
version 1.1.6
See Also:
AFTaskList

getRootTaskOfJoinMember

public AFTaskList getRootTaskOfJoinMember(java.lang.String mID,
                                          java.lang.String proID)
                                   throws WFCIException
Return root tasks with the specific member is involved in and the specific state.

Parameters:
mID - the given MemberID
proID - the given ProcessID
Returns:
the correspondence AFTaskList
Throws:
WFCIException
Since:
version 1.1.6
See Also:
AFTaskList

getRootTaskOfMember

public AFTaskList getRootTaskOfMember(java.lang.String mID)
                               throws WFCIException
Return root tasks executed by some specific member.

Parameters:
mID - the given MemberID
Returns:
the correspondence AFTaskList
Throws:
WFCIException
Since:
version 1.1.6
See Also:
AFTaskList

getRootTaskOfMember

public AFTaskList getRootTaskOfMember(java.lang.String mID,
                                      int state)
                               throws WFCIException
Return root tasks which in some state and executed by some specific member.

Parameters:
mID - the given MemberID
state - the given TaskState,see attributes TASK_STATE_XXX in pe.pase.Task
Returns:
the correspondence AFTaskList
Throws:
WFCIException
Since:
version 1.1.6
See Also:
AFTaskList

getSubTaskList

public AFTaskList getSubTaskList(java.lang.String parentID)
                          throws WFCIException
Return subtasks of some specific task.

Parameters:
parentTID - the given TaskID
Returns:
the correspondence AFTaskList
Throws:
WFCIException
Since:
version 1.1.6
See Also:
AFTaskList

getTaskIDListOfMember

public java.util.Vector getTaskIDListOfMember(java.lang.String mID,
                                              int sc,
                                              int ec,
                                              java.lang.String order)
                                       throws WFCIException
Return all task id of some specific member. parameter 'order' should be one of the followring : TASK_SORT_PROID, TASK_SORT_STATE, TASK_SORT_MEMID, TASK_SORT_EXEID, TASK_SORT_DEPID, TASK_SORT_ROLID, TASK_SORT_STARTTIME, TASK_SORT_ENDTIME, TASK_SORT_TYPE, TASK_SORT_KEYWORD, TASK_SORT_PRIORITY

Parameters:
mID - the given MemberID
sc - start index
ec - end index
order - for sorting
Returns:
the task ID list
Throws:
WFCIException
Since:
version 1.1.6
See Also:
Task

getTaskList

public AFTaskList getTaskList(java.lang.String mID)
                       throws WFCIException
Return all tasks of some specific member.

Parameters:
mID - the given MemberID
Returns:
the correspondence AFTaskList
Throws:
WFCIException
Since:
version 1.1.6
See Also:
AFTaskList

getTaskOfMember

public AFTaskList getTaskOfMember(java.lang.String mID)
                           throws WFCIException
Return tasks executed by some specific member.

Parameters:
mID - the given MemberID
Returns:
the correspondence AFTaskList
Throws:
WFCIException
Since:
version 1.1.6
See Also:
AFTaskList

getTaskOfMember

public AFTaskList getTaskOfMember(java.lang.String mID,
                                  int state)
                           throws WFCIException
Return root tasks which in some state and executed by some specific member.

Parameters:
mID - the given MemberID
state - the given TaskState, see attributes TASK_STATE_XXX in pe.pase.Task
Returns:
the correspondence AFTaskList
Throws:
WFCIException
Since:
version 1.1.6
See Also:
AFTaskList

getTaskOfRootTask

public AFTaskList getTaskOfRootTask(java.lang.String rootTID)
                             throws WFCIException
Return tasks of some specific root task.

Parameters:
rootTID - the given TaskID
Returns:
the correspondence AFTaskList
Throws:
WFCIException
Since:
version 1.1.6
See Also:
AFTaskList

goBackTo

public boolean goBackTo(java.lang.String fromTaskID,
                        java.lang.String toProID,
                        boolean artMode)
                 throws WFCIException
Go back to a former task node in the same process.

Parameters:
fromTaskID - a Task ID.
toProID - a ProcessID.
artMode - true if a new artifact is used.
Returns:
true if succeeded; false otherwise.
Throws:
WFCIException
See Also:
WFCI

goBackTo

public boolean goBackTo(java.lang.String fromTaskID,
                        Task toTask,
                        boolean artMode)
                 throws WFCIException
Go back to a former task node in the same process.

Parameters:
fromTaskID - a TaskID.
toTask - a previous Task.
artMode - true if a new artifact is used.
Returns:
true if succeeded; false otherwise.
Throws:
WFCIException
Since:
version 1.1.5
See Also:
WFCI

goBackTo

public boolean goBackTo(Task fromTask,
                        java.lang.String toProID,
                        boolean artMode)
                 throws WFCIException
Go back to a former task node in the same process.

Parameters:
fromTask - a Task.
toProID - a ProcessID.
artMode - true if a new artifact is used.
Returns:
true if succeeded; false otherwise.
Throws:
WFCIException
Since:
version 1.1.5
See Also:
WFCI

goBackToWithDetailRet

public java.util.HashMap goBackToWithDetailRet(Task fromTask,
                                               java.lang.String toProID,
                                               boolean artMode)
                                        throws WFCIException
Go back to a former task node in the same process.

Parameters:
fromTaskID - the given TaskID
toProID - the given ProcessID
artMode - true if a new artifact is used.
Throws:
WFCIException
Since:
version 1.1.5

isLocked

public boolean isLocked(java.lang.String tskID)
                 throws WFCIException
Check if the task is locked.

Parameters:
tskID - the given TaskID
Throws:
WFCIException
Since:
version 1.1.5

lockAFTask

public void lockAFTask(java.lang.String tskID)
                throws WFCIException
Lock the root AFTask of the AFTask.

Parameters:
tskID - the given TaskID
Throws:
WFCIException
Since:
version 1.1.5

notifyAFTask

public java.util.HashMap notifyAFTask(java.lang.String tskID)
                               throws WFCIException
Remove be state of waiting of the AFTask.

Parameters:
tskID - the given TaskID
Returns:
the result ( [Key:Value] = [retValue:Boolean(true)] )
Throws:
WFCIException
Since:
version 1.1.5

pickQueueAFTask

public boolean pickQueueAFTask(AFTask task)
                        throws WFCIException
Pick the queue of the AFTask.

Parameters:
t - the given AFTask
Throws:
WFCIException
Since:
version 1.1.5

removeTaskByAdm

public boolean removeTaskByAdm(java.lang.String p_RootTaskID)
                        throws WFCIException
Force to remove task.

Parameters:
p_RootTaskID - the given RootTaskID
Returns:
true if succeeded
Throws:
WFCIException
Since:
version 1.1.5

removeTaskByUser

public boolean removeTaskByUser(java.lang.String p_RootTaskID,
                                java.lang.String p_MemID)
                         throws WFCIException
Force to remove task by the specific member.

Parameters:
p_RootTaskID - the given RootTaskID
p_MemID - the given MemberRecordID
Returns:
true if succeeded
Throws:
WFCIException
Since:
version 1.1.5

setGlobals

public void setGlobals(java.lang.String rootTaskID,
                       java.util.HashMap args)
                throws WFCIException
Keep data into database and then reuse.

Parameters:
rootTaskID - the givin root TaskID
args - the givin a HashMap data ( [Key:Value] = [retValue:Boolean(true/false)])
Throws:
WFCIException
Since:
version 1.1.5

startAFTask

public java.util.HashMap startAFTask(AFTask task)
                              throws WFCIException
Start the AFTask.

Parameters:
t - the given AFTask
Returns:
the result ( [Key:Value] = [retValue:Boolean(true/false)])
Throws:
WFCIException
Since:
version 1.1.5

stopRootTask

public void stopRootTask(java.lang.String rootTaskID)
                  throws WFCIException
Stop the root task.

Parameters:
rootTaskID - the root task id.
Throws:
WFCIException
Since:
version 1.1.6

suspendAFTask

public java.util.HashMap suspendAFTask(AFTask task)
                                throws WFCIException
Suspend the AFTask.

Parameters:
t - the given AFTask
Returns:
the result ( [Key:Value] = [retValue:Boolean(true)] )
Throws:
WFCIException
Since:
version 1.1.5

unlockAFTask

public void unlockAFTask(java.lang.String tskID)
                  throws WFCIException
UnLock the root AFTask of the AFTask.

Parameters:
tskID - the given TaskID
Throws:
WFCIException
Since:
version 1.1.5

updateAFArtInstance

public boolean updateAFArtInstance(AFArtInstance instance)
                            throws WFCIException
Update an AFArtInstance instance

Parameters:
instance - the givin AFArtInstance
Returns:
true for success, else false
Throws:
WFCIException
Since:
version 1.1.5
See Also:
AFArtInstance

updateAFArtInstance

public boolean updateAFArtInstance(java.lang.String tID,
                                   AFArtInstance instance)
                            throws WFCIException
Update an AFArtInstance instance

Parameters:
tID - the givin AFTaskID
instance - the givin AFArtInstance
Returns:
true for success, else false
Throws:
WFCIException
Since:
version 1.1.5
See Also:
AFArtInstance

updateAFTask

public boolean updateAFTask(AFTask t)
                     throws WFCIException
Update the data object of task. The method will update the task in cache and database.

Parameters:
t - the given AFTask
Throws:
WFCIException
Since:
version 1.1.6

waitAFTask

public void waitAFTask(java.lang.String tskID)
                throws WFCIException
Set the AFTask to be state of waiting

Parameters:
tskID - the given TaskID
Throws:
WFCIException
Since:
version 1.1.5

waitAFTask

public void waitAFTask(java.lang.String tskID,
                       java.lang.String timeString)
                throws WFCIException
Set the AFTask to be state of waiting, and the waiting duration.

Parameters:
tskID - the given TaskID
timeString - the running time with format "yyyy/mm/dd/hh/mm"
Throws:
WFCIException
Since:
version 1.1.5

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.