com.webmethods.caf.faces.data.task
Interface ITaskServiceProvider


public interface ITaskServiceProvider

Container provides implementation for this interface to be consumed by TaskContentProvider


Method Summary
 void acceptTask(ITaskInfo taskInfo)
          Accepts the task as current user.
 void addTaskAuditRecord(String taskID, int operation, String sourceID, Map properties)
          Adds a records to task audit log
 boolean canUser(String taskID, String accessRight)
          Checks if user has rights to execute action on the task
 void delegateTask(String taskID, String[] fromUserID, String[] toUserID, boolean overwriteExisting)
          Delegate a task from one set of users to another set.
 void deleteTask(String taskID)
          Stops and deletes task
 ITaskInfo getCurrentTask()
           
 String getCurrentUserID()
           
 String getDelegatedBy(String userID, String taskID)
          Returns ID of the principal who delegated this task to the current user or null if task was not delegated
 String getProcessDeployVersion(String processInstanceID)
          Retrieves deployVersion for process instance ID.
 ITaskAudit[] getTaskAudit(String taskID)
           
 ITaskData getTaskData(String taskID)
          Returns task data by given taskID
 ITaskInfo getTaskInfo(String taskID)
          Returns task info by given taskID.
 String getTaskTypeID(String taskID)
           
 String getTaskTypeName(String taskTypeID)
           
 boolean isProcessArchived(String processID)
          Checks ProcessAudit database for presence of given process instance
 String queueNewTask(String taskTypeID, ITaskInfo taskInfo, ITaskData taskData)
          Queues new task using specified task type ID
 void rollbackTask(String taskID, String auditID)
          Rollsback a task to the specified audit ID
 ITask[] searchAllTasks(TaskSearchQuery taskQuery, boolean includeTaskData)
          Searches all tasks
 List searchAllTasksPaged(TaskSearchQueryV2 taskQuery, boolean businessData)
          Searches all tasks and return the result as pageable list
 int searchAllTasksTotalCount(TaskSearchQueryV2 taskQuery, boolean businessData)
          Searches all tasks and return total count
 ITask[] searchUserTasks(TaskSearchQuery taskQuery, boolean includeTaskData)
          Searches user inbox tasks
 List searchUserTasksPaged(TaskSearchQueryV2 taskQuery, boolean businessData)
          Searches all tasks in user inbox
 int searchUserTasksTotalCount(TaskSearchQueryV2 taskQuery, boolean businessData)
          Searches all tasks in user inbox and return the total count
 void setDefaultMonitorISConfig()
          Sets IS configuration for Monitor to default server.
 void unacceptTask(ITaskInfo taskInfo)
          Unaccepts the task as current user.
 void updateTask(ITaskInfo taskInfo, ITaskData taskData)
          Updates task
 

Method Detail

searchAllTasks

ITask[] searchAllTasks(TaskSearchQuery taskQuery,
                       boolean includeTaskData)
                       throws Exception
Searches all tasks

Parameters:
taskQuery - specifies the search criteria
includeTaskData - indicates whether the search result should return task data or not
Returns:
task list match the search criteria, can be empty if there is no match
Throws:
Exception

searchUserTasks

ITask[] searchUserTasks(TaskSearchQuery taskQuery,
                        boolean includeTaskData)
                        throws Exception
Searches user inbox tasks

Parameters:
taskQuery - specifies the search criteria
includeTaskData - indicates whether the search result should return task data or not
Returns:
task list match the search criteria, can be empty list if there is no match
Throws:
Exception

getTaskInfo

ITaskInfo getTaskInfo(String taskID)
                      throws Exception
Returns task info by given taskID.

Parameters:
taskID -
Returns:
TaskInfo or null if not found
Throws:
Exception

getTaskData

ITaskData getTaskData(String taskID)
                      throws Exception
Returns task data by given taskID

Parameters:
taskID -
Returns:
TaskData or null if not found
Throws:
Exception

queueNewTask

String queueNewTask(String taskTypeID,
                    ITaskInfo taskInfo,
                    ITaskData taskData)
                    throws Exception
Queues new task using specified task type ID

Parameters:
taskTypeID -
taskInfo -
taskData -
Returns:
queued taskID if task has been queued successfully
Throws:
Exception

updateTask

void updateTask(ITaskInfo taskInfo,
                ITaskData taskData)
                throws Exception
Updates task

Parameters:
taskInfo -
taskData -
Throws:
Exception

acceptTask

void acceptTask(ITaskInfo taskInfo)
                throws Exception
Accepts the task as current user.

Parameters:
taskInfo -
Throws:
Exception

unacceptTask

void unacceptTask(ITaskInfo taskInfo)
                  throws Exception
Unaccepts the task as current user.

Parameters:
taskInfo -
Throws:
Exception

deleteTask

void deleteTask(String taskID)
                throws Exception
Stops and deletes task

Parameters:
taskInfo -
Throws:
Exception

getCurrentUserID

String getCurrentUserID()
                        throws Exception
Returns:
user ID of the current user
Throws:
Exception

getTaskTypeID

String getTaskTypeID(String taskID)
                     throws Exception
Returns:
task type ID for the given task
Throws:
Exception

getTaskTypeName

String getTaskTypeName(String taskTypeID)
                       throws Exception
Returns:
display name of the task type
Throws:
Exception

canUser

boolean canUser(String taskID,
                String accessRight)
                throws Exception
Checks if user has rights to execute action on the task

Parameters:
taskID -
accessRight -
Returns:
boolean value indicates whether the user has rights to execute action on the task
Throws:
Exception

getDelegatedBy

String getDelegatedBy(String userID,
                      String taskID)
                      throws Exception
Returns ID of the principal who delegated this task to the current user or null if task was not delegated

Parameters:
userID -
taskID -
Returns:
principal ID
Throws:
Exception

delegateTask

void delegateTask(String taskID,
                  String[] fromUserID,
                  String[] toUserID,
                  boolean overwriteExisting)
                  throws Exception
Delegate a task from one set of users to another set. Note that the fromUserID and toUserID arrays must be of equal size

Parameters:
taskID - - ID of the task to delegate
fromUserID - - Array of principal UIDs as String[] to delegate from
toUserID - - Array of principal UIDs as String[] to delegate to
overwriteExisting - - true to clear the existing delegation list, otherwise append new entries
Throws:
Exception

getTaskAudit

ITaskAudit[] getTaskAudit(String taskID)
                          throws Exception
Parameters:
taskID -
Returns:
task audit information for the task
Throws:
Exception

addTaskAuditRecord

void addTaskAuditRecord(String taskID,
                        int operation,
                        String sourceID,
                        Map properties)
                        throws Exception
Adds a records to task audit log

Parameters:
taskID - taskID to add audit record to
operation - audit record operation
sourceID - source identifier (may be null)
properties - audit properties (may be null)
Throws:
Exception

rollbackTask

void rollbackTask(String taskID,
                  String auditID)
                  throws Exception
Rollsback a task to the specified audit ID

Parameters:
taskID -
auditID -
Throws:
Exception

getCurrentTask

ITaskInfo getCurrentTask()
                         throws Exception
Returns:
current task which rules are current processing
Throws:
Exception

setDefaultMonitorISConfig

void setDefaultMonitorISConfig()
                               throws Exception
Sets IS configuration for Monitor to default server. This is required when opening a process instance page

Throws:
Exception

getProcessDeployVersion

String getProcessDeployVersion(String processInstanceID)
                               throws Exception
Retrieves deployVersion for process instance ID. This is required for URL to the Monitor page

Parameters:
processInstanceID -
Throws:
Exception

isProcessArchived

boolean isProcessArchived(String processID)
                          throws Exception
Checks ProcessAudit database for presence of given process instance

Returns:
true if the given process instance presents in process audit database
Throws:
Exception

searchUserTasksTotalCount

int searchUserTasksTotalCount(TaskSearchQueryV2 taskQuery,
                              boolean businessData)
                              throws Exception
Searches all tasks in user inbox and return the total count

Parameters:
taskQuery - specifies the search criteria
businessData - indicates whether business data is included in the search or not
Returns:
total count of all the tasks in user inbox
Throws:
Exception

searchUserTasksPaged

List searchUserTasksPaged(TaskSearchQueryV2 taskQuery,
                          boolean businessData)
                          throws Exception
Searches all tasks in user inbox

Parameters:
taskQuery - specifies the search criteria
businessData - indicates whether business data is included in the search or not
Returns:
list of all the tasks in user inbox
Throws:
Exception

searchAllTasksTotalCount

int searchAllTasksTotalCount(TaskSearchQueryV2 taskQuery,
                             boolean businessData)
                             throws Exception
Searches all tasks and return total count

Parameters:
taskQuery - specifies the search criteria
businessData - indicates whether business data is included in the search or not
Returns:
total count of all the tasks
Throws:
Exception

searchAllTasksPaged

List searchAllTasksPaged(TaskSearchQueryV2 taskQuery,
                         boolean businessData)
                         throws Exception
Searches all tasks and return the result as pageable list

Parameters:
taskQuery - specifies the search criteria
businessData - indicates whether business data is included in the search or not
Returns:
pageable list of all tasks
Throws:
Exception