public class PCTaskHelper extends Object
PortalClient
API used to facilitate access to TaskEngine webServices port type. Prior
using these API PortalClient needs to be initialized by calling one of its initialize(...) methodsConstructor and Description |
---|
PCTaskHelper() |
Modifier and Type | Method and Description |
---|---|
static int |
countAllTasksIndexed(String user,
TaskSearchQueryV2 taskSearchQuery,
boolean businessData)
Return the total result count for a task search against all tasks
|
static int |
countUserTasksIndexed(String user,
TaskSearchQueryV2 taskSearchQuery,
boolean businessData)
Return the total result count for a user inbox task search
|
static void |
deleteTask(String user,
String taskID)
Deletes a task
|
static void |
formFlowTaskNotify(String correlationID,
String result,
boolean localOnly)
Notify a task flow that a transition has occured
|
static Task |
getTask(String user,
String taskID,
boolean includeTaskData)
Fetches task by its ID
|
static String |
queueTask(String user,
String taskTypeID,
TaskInfo taskInfo,
Hashtable taskData)
Queues new task to the TaskEngine
|
static Task[] |
searchAllTasks(String user,
TaskSearchQuery taskSearchQuery,
boolean includeTaskData)
Searches all tasks
|
static Task[] |
searchAllTasksIndexed(String user,
TaskSearchQueryV2 taskSearchQuery,
boolean businessData)
Searches all tasks with paging
|
static TaskFields[] |
searchFieldsAllTasks(String user,
TaskSearchQuery taskSearchQuery,
boolean includeTaskData,
String[] fields)
Searches all tasks
|
static TaskFields[] |
searchFieldsUserTasks(String user,
TaskSearchQuery taskSearchQuery,
boolean includeTaskData,
String[] fields)
Searches user inbox tasks
|
static Task[] |
searchUserTasks(String user,
TaskSearchQuery taskSearchQuery,
boolean includeTaskData)
Searches user inbox tasks
|
static Task[] |
searchUserTasksIndexed(String user,
TaskSearchQueryV2 taskSearchQuery,
boolean businessData)
Return a subset of user inbox search results.
|
static void |
updateTask(String user,
String taskID,
TaskInfo taskInfo,
Hashtable taskData)
Updates an existing task
|
public static String queueTask(String user, String taskTypeID, TaskInfo taskInfo, Hashtable taskData) throws Exception
user
- (optional) UserID on behalf of whom new task will be queued. If null, then portal client session context userID will be usedtaskTypeID
- (required) task type ID as defined in the Task ApplicationtaskInfo
- (optional) Additional generic information for the new tasktaskData
- (optional) Additionial business data for the new taskException
public static void updateTask(String user, String taskID, TaskInfo taskInfo, Hashtable taskData) throws Exception
user
- (optional) UserID on behalf of whom task will be updated. If null, then portal client session context userID will be usedtaskID
- (required) TaskID to be updatedtaskInfo
- (optional) Generic task information to be set on the tasktaskData
- (optional) Business data information to be set on the taskException
- if there is an error updating a taskpublic static void deleteTask(String user, String taskID) throws Exception
user
- (optional) UserID on behalf of whom task will be deleted. If null, then portal client session context userID will be usedtaskID
- (required) TaskID to be deletedException
- if there is an error deleting a taskpublic static Task getTask(String user, String taskID, boolean includeTaskData) throws Exception
user
- (optional) UserID on behalf of whom task will be fetched. If null, then portal client session context userID will be usedtaskID
- (required) TaskID to getincludeTaskData
- whether result should include task business dataException
- if there is a problem getting taskpublic static Task[] searchAllTasks(String user, TaskSearchQuery taskSearchQuery, boolean includeTaskData) throws Exception
user
- (optional) UserID on behalf of whom tasks will be searched. If null, then portal client session context userID will be usedtaskSearchQuery
- (optional) task search query. If null all tasks will be returnedincludeTaskData
- whether result should include task business dataException
- if there is a problem searching for taskspublic static Task[] searchUserTasks(String user, TaskSearchQuery taskSearchQuery, boolean includeTaskData) throws Exception
user
- (optional) UserID on behalf of whom tasks will be searched. If null, then portal client session context userID will be usedtaskSearchQuery
- (optional) task search query. If null all tasks will be returnedincludeTaskData
- whether result should include task business dataException
- if there is a problem searching for taskspublic static TaskFields[] searchFieldsAllTasks(String user, TaskSearchQuery taskSearchQuery, boolean includeTaskData, String[] fields) throws Exception
user
- (optional) UserID on behalf of whom tasks will be searched. If null, then portal client session context userID will be usedtaskSearchQuery
- (optional) task search query. If null all tasks will be returnedincludeTaskData
- whether result should include task business dataException
- if there is a problem searching for taskspublic static TaskFields[] searchFieldsUserTasks(String user, TaskSearchQuery taskSearchQuery, boolean includeTaskData, String[] fields) throws Exception
user
- (optional) UserID on behalf of whom tasks will be searched. If null, then portal client session context userID will be usedtaskSearchQuery
- (optional) task search query. If null all tasks will be returnedincludeTaskData
- whether result should include task business dataException
- if there is a problem searching for taskspublic static Task[] searchAllTasksIndexed(String user, TaskSearchQueryV2 taskSearchQuery, boolean businessData) throws Exception
user
- (optional) UserID on behalf of whom tasks will be searched. If null, then portal client session context userID will be usedtaskSearchQuery
- (optional) task search query. If null all tasks will be returnedincludeTaskData
- whether result should include task business dataException
- if there is a problem searching for taskspublic static int countAllTasksIndexed(String user, TaskSearchQueryV2 taskSearchQuery, boolean businessData) throws Exception
user
- (optional) UserID on behalf of whom tasks will be searched. If null, then portal client session context userID will be usedtaskSearchQuery
- (optional) task search query. If null all tasks will be returnedbusinessData
- Specify true if the task search query requires examination of task business dataException
- if there is a problem searching for taskspublic static Task[] searchUserTasksIndexed(String user, TaskSearchQueryV2 taskSearchQuery, boolean businessData) throws Exception
user
- (optional) UserID on behalf of whom tasks will be searched. If null, then portal client session context userID will be usedtaskSearchQuery
- (optional) task search query. If null all tasks will be returnedincludeTaskData
- whether result should include task business dataException
- if there is a problem searching for taskspublic static int countUserTasksIndexed(String user, TaskSearchQueryV2 taskSearchQuery, boolean businessData) throws Exception
user
- (optional) UserID on behalf of whom tasks will be searched. If null, then portal client session context userID will be usedtaskSearchQuery
- (optional) task search query. If null all tasks will be returnedbusinessData
- Specify true if the task search query requires examination of task business dataException
- if there is a problem searching for taskspublic static void formFlowTaskNotify(String correlationID, String result, boolean localOnly) throws Exception
correctionID
- the unique identifier of the form flowresult
- the result string to return to the task flow, usually the URL that the flow should navigate to nextlocalOnly
- only notify the local machine, do not sent notification events to other nodes in the MWS clusterException