WorklistManager Interface

com.bea.wli.worklist.api
WorklistManager Interface

public interface WorklistManager

WorklistManager is the main remote EJB interface for Worklist operations. Through the WorklistManager interface, the Worklist task operations can be performed.

Task lifecycle operations:
- create task
- abort, assign, claim, resume, return, start, stop, and suspend task
- update task information, add or remove user-defined properties

Task management operations:
- archive, delete and purge task

Task querying operations:
- get tasks based on user-defined criteria
- get task properties, request and response data

For task querying operations, using the WorklistScrollableResultsManager interface is recommended for increased scalability and performance. This allows a specified range of results to be returned from the query, instead of returning all results satisfying the querying criteria.


All Known Subinterfaces

WorklistScrollableResultManager

Method Summary

public void
abortTask(String taskId)
Abort a task
public void
archiveTasks()
Archive all the tasks in their final state (COMPLETED or ABORTED) if the archiver is on.
public void
assignToUser(String userName, String taskId)
Assign the task to the user and claim it on his behalf.
public String
assignToUserInGroup(String groupName, String taskId)
Assign the task to a user (chosen by the system) in the group and claim the task on his behalf.
public void
assignToUsersAndGroups(String[] userNamesAndOrGroupNames, String taskId)
Assign the tasks to users and/or groups
public void
claimTask(String taskId)
Claim the task.
public void
claimTask(String user, String taskId)
Claim the task on behalf of the user.
public void
completeTask(String taskId)
Complete a STARTED task.
public String
createTask(String name)
Create a task, with all the default values.
public String
createTask(TaskCreation taskCreation)
Create a task.
public String
createTaskXML(TaskCreationXMLDocument doc)
Create task using an xml document
public void
deleteTask(String taskId)
Delete the task.
public void
deleteTasks(TaskSelector selector)
Delete the selected tasks.
public String[]
getContainingGroups(String userOrGroup)
Return all the groups containing this user or group
public int
getSelectedTasksNumber(TaskSelector selector)
Get the number of tasks selected.
public String[]
getTaskIds(TaskSelector selector)
Get task ids of all the selected tasks
public TaskInfo
getTaskInfo(String taskId)
Get the task info object.
public TaskInfo[]
getTaskInfos(TaskSelector selector)
Get a task info array of all the selected tasks
public String[]
getTaskProperties(String[] propertyNames, String taskId)
Get user defined task property values.
public String[]
getTaskPropertiesNames(String taskId)
Return all the user defined task property names.
public String
getTaskProperty(String propertyName, String taskId)
Get a user defined task property value.
public TaskMessage
getTaskRequest(String taskId)
Get the task request.
public XmlObject
getTaskRequestAsXmlObject(String taskId)
Get the task request as XmlObject
public TaskMessage
getTaskResponse(String taskId)
Get the task response.
public XmlObject
getTaskResponseAsXmlObject(String taskId)
Get the task response as XmlObject.
public String[]
getUsersInGroup(String group)
Return all the members of a WLS group
public void
purgeTasks()
Purge all the tasks that have been in their final state for more than the purge delay value.
public String[]
removeTaskProperties(String[] propertyNames, String taskId)
Remove user defined task properties
public void
resumeTask(String taskId)
Return a task to the state it was before suspended.
public void
returnTask(String taskId)
Return a task that is in the state CLAIMED or STARTED to the state ASSIGNED with all the previous assignees.
public void
setTaskCanBeAborted(Boolean value, String taskId)
Specify if an assignee or the claimant can abort the task.
public void
setTaskCanBeReassigned(Boolean value, String taskId)
Specify if a task assignee can reassign the task.
public void
setTaskCanBeReturned(Boolean value, String taskId)
Specify if the claimant can return the task.
public void
setTaskClaimDueBusinessDate(BusinessTime time, String taskId)
Set the task claim due date using a business time.
public void
setTaskClaimDueDate(Date claimDueDate, String taskId)
Set the task claim due date.
public void
setTaskComment(String comment, String taskId)
Set a task comment.
public void
setTaskCompletionDueBusinessDate(BusinessTime time, String taskId)
Set the task completion due date using a business time.
public void
setTaskCompletionDueDate(Date completeDueDate, String taskId)
Set the task completion due date.
public void
setTaskOwner(String owner, String taskId)
Set the task owner.
public void
setTaskPriority(Integer priority, String taskId)
Set a task priority.
public String[]
setTaskProperties(String[] propertyNames, String[] values, String taskId)
Update/Create user defined task properties.
public String
setTaskProperty(String propertyName, String value, String taskId)
Update/Create a user defined task property.
public void
setTaskRequest(TaskMessage request, String taskId)
Set the task request.
public void
setTaskRequestAsXmlObject(XmlObject request, String mimeType, String taskId)
Set the task request as XmlObject.
public void
setTaskResponse(TaskMessage response, String taskId)
Set the task response.
public void
setTaskResponseAsXmlObject(XmlObject response, String mimeType, String taskId)
Set the task response as XmlObject.
public void
startTask(String taskId)
Start working on a task.
public void
stopTask(String taskId)
Returns the task from state STARTED to CLAIMED.
public void
suspendTask(String taskId)
Suspend the task.

Method Detail

abortTask(String) Method

public void abortTask(String taskId)
throws ManagementException, RemoteException
Abort a task

Exceptions

ManagementException
RemoteException

archiveTasks() Method

public void archiveTasks()
throws ManagementException, RemoteException
Archive all the tasks in their final state (COMPLETED or ABORTED) if the archiver is on.

Exceptions

ManagementException
RemoteException

assignToUser(String, String) Method

public void assignToUser(String userName, 
                         String taskId)
throws ManagementException, AssignmentException, RemoteException
Assign the task to the user and claim it on his behalf.

Exceptions

ManagementException
AssignmentException
RemoteException

assignToUserInGroup(String, String) Method

public String assignToUserInGroup(String groupName, 
                                  String taskId)
throws ManagementException, AssignmentException, RemoteException
Assign the task to a user (chosen by the system) in the group and claim the task on his behalf.

Load for all the users in that group is calculated. The load is calculated as the number of claimed tasks by the user. The user with the least load will be selected. If there is a tie the system randomly picks a user among the tied ones.

Returns

the user selected

Exceptions

ManagementException
AssignmentException
RemoteException

assignToUsersAndGroups(String[], String) Method

public void assignToUsersAndGroups(String[] userNamesAndOrGroupNames, 
                                   String taskId)
throws ManagementException, AssignmentException, RemoteException
Assign the tasks to users and/or groups

Exceptions

ManagementException
AssignmentException
RemoteException

claimTask(String) Method

public void claimTask(String taskId)
throws ManagementException, RemoteException
Claim the task.

Parameters

taskId
the taskId

Exceptions

ManagementException
RemoteException

claimTask(String, String) Method

public void claimTask(String user, 
                      String taskId)
throws ManagementException, RemoteException
Claim the task on behalf of the user. The current user needs to be the worklist admin or the task owner.

[@TODO- Make sure worklist admin is universally know, make it clear that the caller needs to be whatever worklist admin means. Also make sure task owner is properly defined. {Still reading the docs to make sure the definitions are well known.} ]

The task will go from the state ASSIGNED to CLAIMED.

Exceptions

ManagementException
RemoteException

completeTask(String) Method

public void completeTask(String taskId)
throws ManagementException, RemoteException
Complete a STARTED task.

Exceptions

ManagementException
RemoteException

createTask(String) Method

public String createTask(String name)
throws ManagementException, RemoteException
Create a task, with all the default values.

Returns

the task id string

Exceptions

ManagementException
If the operation fails.
RemoteException

createTask(TaskCreation) Method

public String createTask(TaskCreation taskCreation)
throws ManagementException, RemoteException, BusinessCalendarException
Create a task.

Parameters

taskCreation
object containing information about the new task.

Returns

the task id string

Exceptions

ManagementException
If the operation fails.
RemoteException
BusinessCalendarException

Related Topics

TaskCreation


createTaskXML(TaskCreationXMLDocument) Method

public String createTaskXML(TaskCreationXMLDocument doc)
throws ManagementException, BusinessCalendarException, RemoteException
Create task using an xml document

Parameters

doc
an XML Bean containing information about the new task.

Returns

the task id string

Exceptions

ManagementException
BusinessCalendarException
RemoteException

deleteTask(String) Method

public void deleteTask(String taskId)
throws ManagementException, RemoteException
Delete the task.

Exceptions

ManagementException
RemoteException

deleteTasks(TaskSelector) Method

public void deleteTasks(TaskSelector selector)
throws ManagementException, RemoteException
Delete the selected tasks.

Parameters

selector
containing selection criteria

Exceptions

ManagementException
RemoteException

getContainingGroups(String) Method

public String[] getContainingGroups(String userOrGroup)
throws ManagementException, RemoteException
Return all the groups containing this user or group

Returns

list of group names containing this user or group

Exceptions

ManagementException
RemoteException

getSelectedTasksNumber(TaskSelector) Method

public int getSelectedTasksNumber(TaskSelector selector)
throws ManagementException, RemoteException
Get the number of tasks selected.

Parameters

selector
containing selection criteria

Returns

the number of tasks selected

Exceptions

ManagementException
RemoteException

Related Topics

TaskSelector


getTaskIds(TaskSelector) Method

public String[] getTaskIds(TaskSelector selector)
throws ManagementException, RemoteException
Get task ids of all the selected tasks

Parameters

selector
containing selection criteria

Returns

array of task ids

Exceptions

ManagementException
RemoteException

getTaskInfo(String) Method

public TaskInfo getTaskInfo(String taskId)
throws ManagementException, RemoteException
Get the task info object.

Returns

TaskInfo object containing basic information about the task

Exceptions

ManagementException
RemoteException

getTaskInfos(TaskSelector) Method

public TaskInfo[] getTaskInfos(TaskSelector selector)
throws ManagementException, RemoteException
Get a task info array of all the selected tasks

Parameters

selector
containing selection criteria

Returns

Array of TaskInfo objects selected by the criteria provided.

Exceptions

ManagementException
RemoteException

Related Topics

TaskSelector


getTaskProperties(String[], String) Method

public String[] getTaskProperties(String[] propertyNames, 
                                String taskId)
throws ManagementException, RemoteException
Get user defined task property values.

Returns

array of property values

Exceptions

ManagementException
RemoteException

getTaskPropertiesNames(String) Method

public String[] getTaskPropertiesNames(String taskId)
throws ManagementException, RemoteException
Return all the user defined task property names.

Returns

string array containing names of all defined properties

Exceptions

ManagementException
RemoteException

getTaskProperty(String, String) Method

public String getTaskProperty(String propertyName, 
                              String taskId)
throws ManagementException, RemoteException
Get a user defined task property value.

A property is made up of a name and a value.

Returns

property value as string

Exceptions

ManagementException
RemoteException

getTaskRequest(String) Method

public TaskMessage getTaskRequest(String taskId)
throws ManagementException, RemoteException
Get the task request.

Returns

the task request as TaskMessage

Exceptions

ManagementException
RemoteException

getTaskRequestAsXmlObject(String) Method

public XmlObject getTaskRequestAsXmlObject(String taskId)
throws ManagementException, RemoteException
Get the task request as XmlObject

Returns

the task request as XmlObject

Exceptions

ManagementException
RemoteException

getTaskResponse(String) Method

public TaskMessage getTaskResponse(String taskId)
throws ManagementException, RemoteException
Get the task response.

Returns

the task response as TaskMessage

Exceptions

ManagementException
RemoteException

getTaskResponseAsXmlObject(String) Method

public XmlObject getTaskResponseAsXmlObject(String taskId)
throws ManagementException, RemoteException
Get the task response as XmlObject.

Returns

the task response as XmlObject

Exceptions

ManagementException
RemoteException

getUsersInGroup(String) Method

public String[] getUsersInGroup(String group)
throws ManagementException, RemoteException
Return all the members of a WLS group

Returns

list of user names in the given group

Exceptions

ManagementException
RemoteException

purgeTasks() Method

public void purgeTasks()
throws ManagementException, RemoteException
Purge all the tasks that have been in their final state for more than the purge delay value. If the archiver is on and the task has not been archived yet, the task cannot be purged.

Exceptions

ManagementException
RemoteException

removeTaskProperties(String[], String) Method

public String[] removeTaskProperties(String[] propertyNames, 
                                   String taskId)
throws ManagementException, RemoteException
Remove user defined task properties

Returns

string array containing existing property values before deletion

Exceptions

ManagementException
RemoteException

resumeTask(String) Method

public void resumeTask(String taskId)
throws ManagementException, RemoteException
Return a task to the state it was before suspended.

Exceptions

ManagementException
RemoteException

returnTask(String) Method

public void returnTask(String taskId)
throws ManagementException, RemoteException
Return a task that is in the state CLAIMED or STARTED to the state ASSIGNED with all the previous assignees.

Exceptions

ManagementException
RemoteException

setTaskCanBeAborted(Boolean, String) Method

public void setTaskCanBeAborted(Boolean value, 
                                String taskId)
throws ManagementException, RemoteException
Specify if an assignee or the claimant can abort the task.

Exceptions

ManagementException
RemoteException

setTaskCanBeReassigned(Boolean, String) Method

public void setTaskCanBeReassigned(Boolean value, 
                                   String taskId)
throws ManagementException, RemoteException
Specify if a task assignee can reassign the task.

Exceptions

ManagementException
RemoteException

setTaskCanBeReturned(Boolean, String) Method

public void setTaskCanBeReturned(Boolean value, 
                                 String taskId)
throws ManagementException, RemoteException
Specify if the claimant can return the task.

Exceptions

ManagementException
RemoteException

setTaskClaimDueBusinessDate(BusinessTime, String) Method

public void setTaskClaimDueBusinessDate(BusinessTime time, 
                                        String taskId)
throws ManagementException, BusinessCalendarException, RemoteException
Set the task claim due date using a business time.

Exceptions

ManagementException
BusinessCalendarException
RemoteException

setTaskClaimDueDate(Date, String) Method

public void setTaskClaimDueDate(Date claimDueDate, 
                                String taskId)
throws ManagementException, RemoteException
Set the task claim due date.

Exceptions

ManagementException
RemoteException

setTaskComment(String, String) Method

public void setTaskComment(String comment, 
                           String taskId)
throws ManagementException, RemoteException
Set a task comment.

Exceptions

ManagementException
RemoteException

setTaskCompletionDueBusinessDate(BusinessTime, String) Method

public void setTaskCompletionDueBusinessDate(BusinessTime time, 
                                             String taskId)
throws ManagementException, BusinessCalendarException, RemoteException
Set the task completion due date using a business time.

Exceptions

ManagementException
BusinessCalendarException
RemoteException

setTaskCompletionDueDate(Date, String) Method

public void setTaskCompletionDueDate(Date completeDueDate, 
                                     String taskId)
throws ManagementException, RemoteException
Set the task completion due date.

Exceptions

ManagementException
RemoteException

setTaskOwner(String, String) Method

public void setTaskOwner(String owner, 
                         String taskId)
throws ManagementException, RemoteException
Set the task owner. The current user must be worklist admin or task owner.

Exceptions

ManagementException
RemoteException

setTaskPriority(Integer, String) Method

public void setTaskPriority(Integer priority, 
                            String taskId)
throws ManagementException, RemoteException
Set a task priority. Priority value has to be a positive integer or 0.

Exceptions

ManagementException
RemoteException

setTaskProperties(String[], String[], String) Method

public String[] setTaskProperties(String[] propertyNames, 
                                String[] values, 
                                String taskId)
throws ManagementException, RemoteException
Update/Create user defined task properties.

Returns

old property values as string array

Exceptions

ManagementException
RemoteException

setTaskProperty(String, String, String) Method

public String setTaskProperty(String propertyName, 
                              String value, 
                              String taskId)
throws ManagementException, RemoteException
Update/Create a user defined task property.

Returns

old property value as string

Exceptions

ManagementException
RemoteException

setTaskRequest(TaskMessage, String) Method

public void setTaskRequest(TaskMessage request, 
                           String taskId)
throws ManagementException, RemoteException
Set the task request.

Exceptions

ManagementException
RemoteException

setTaskRequestAsXmlObject(XmlObject, String, String) Method

public void setTaskRequestAsXmlObject(XmlObject request, 
                                      String mimeType, 
                                      String taskId)
throws ManagementException, RemoteException
Set the task request as XmlObject.

Exceptions

ManagementException
RemoteException

setTaskResponse(TaskMessage, String) Method

public void setTaskResponse(TaskMessage response, 
                            String taskId)
throws ManagementException, RemoteException
Set the task response.

Exceptions

ManagementException
RemoteException

setTaskResponseAsXmlObject(XmlObject, String, String) Method

public void setTaskResponseAsXmlObject(XmlObject response, 
                                       String mimeType, 
                                       String taskId)
throws ManagementException, RemoteException
Set the task response as XmlObject.

Exceptions

ManagementException
RemoteException

startTask(String) Method

public void startTask(String taskId)
throws ManagementException, RemoteException
Start working on a task. The task must be in the state CLAIMED and will go to the state STARTED.

Exceptions

ManagementException
RemoteException

stopTask(String) Method

public void stopTask(String taskId)
throws ManagementException, RemoteException
Returns the task from state STARTED to CLAIMED.

Exceptions

ManagementException
RemoteException

suspendTask(String) Method

public void suspendTask(String taskId)
throws ManagementException, RemoteException
Suspend the task. No operation is allowed on the SUSPENDED task until it is resumed.

Exceptions

ManagementException
RemoteException