com.bea.wli.worklist.api
Interface WorklistTaskAdmin


public interface WorklistTaskAdmin

Administrative functions for worklist tasks

Since:
9.2

Nested Class Summary
static interface WorklistTaskAdmin.CumulativeScore
          Describes the cumulative score for a user.
static class WorklistTaskAdmin.OPERATION
          Operations for which a task plan policy may be set
static interface WorklistTaskAdmin.WorkloadData
          Describes the number of tasks the indicated user has claimed but not completed, and the workload score calculated for this user.
 
Method Summary
 void abortTask(String taskId)
          Administratively abort a task in any state
 TaskListenerRegResp addListener(TaskListenerRegReq req)
          Add external (web-service) listeners for task events.
 String assignTask(String taskId, AssignmentInstructions instructions)
          Assign the task to the assignees indicated in the provided assignee list and apply the indicated type of candidateListHandling to finish the assignment process (possibly by claiming the task on the behalf of a designated candidate).
 void assignTaskToUser(String taskId, String userName)
          Assign the task to the user and claim it on his behalf.
 String assignTaskToUserInGroup(String taskId, String groupName)
          Assign the task to a selected user in the given group, and claim it on his behalf.
 void clearErrorOnTask(String taskId)
          Clear an error from a task upon which an error was set by a prior call to setErrorOnTask.
 void completeTask(String taskId)
          Administratively complete a task in any state
 String constructTask(TaskConstruction taskConstruction)
          Create a new task based on the information given in the provided TaskConstruction instance.
 String constructTask(TaskConstructionXMLDocument taskConstruction)
          Create a new task based on the information given in the provided TaskCreationXMLDocument instance.
 String constructTask(TaskPlanId taskPlanId, String name, String comment)
          Create a new task based on the task plan with the given ID and using its default constructor.
 void deleteTask(String taskId)
          Force the deletion of a task.
 void deleteTasks(String[] taskId)
          Force the deletion of an array of tasks.
 String[] getCandidateUsers(TaskContext context, AssigneeDefinition[] assignees)
          Get a list of designated candidate users for claiming a new or existing task.
 String[] getCandidateUsersForTask(String taskId, String stepName)
          Get a list of designated candidate users for claiming the task with the given id (when it is at the indicated step).
 WorklistTaskAdmin.CumulativeScore getCumulativeScoreForUser(String userId, TaskPlanId taskPlanId, boolean includeAvailabilityInCalculation, Date startTime, Date endTime)
          Calculate an cumulative load balancing score for the given user for the purposes of assigning a task of the given type.
 String[] getGlobalTaskPlanPolicy(WorklistTaskAdmin.OPERATION operation)
          Get the global policy for *all* task plans that don’t specify their own explicit policy for the given operation type.
 String[] getTaskPlanPolicy(TaskPlanId taskPlanId, WorklistTaskAdmin.OPERATION operation)
          Get the policy that is set for the given task plan and operation type.
 AvailabilityInfo[] getUserAvailabilityInfoForPeriod(String userId, Date startTime, Date endTime)
          Calculate the availability (as blocks of free time) for the given user over the span of time defined by the given startTime and endTime.
 WorklistTaskAdmin.WorkloadData getUserWorkloadData(TaskContext context, WorkloadRequest request)
          Get data on the workload for the given user in support of assigning and claiming the given task.
 TaskListenerInfo[] getWSListenerByAction(String action)
          Get task listener list for the given task and action
 TaskListenerInfo[] getWSListenerByTask(String taskId)
          Get task listener list for the given task
 TaskListenerInfo[] getWSListenerByTaskAndAction(String taskId, String action)
          Get task listener list for the given task and action
 boolean isAccessAllowed(String taskId, WorklistTaskAdmin.OPERATION operation, TaskAffinity[] affinityTypes)
          Determine if the current user is authorized to perform the given operation for the given task given a set of possible types of affinity the current user might have with the task.
 boolean isAccessAllowed(TaskPlanId taskPlanId, WorklistTaskAdmin.OPERATION operation)
          Determine if the current user is authorized to perform the given operation for the given task plan.
 boolean isTaskInView(String taskId)
          Return an indication of whether the current user has some affinity to to the task identified by taskId.
 boolean isUserAssignee(String taskId)
          Return an indication of whether the current user is on the assignee list of the task identified by taskId.
 void reactivateTask(String taskId)
          Bring a task in the COMPLETED or ABORTED admin state back to the ACTIVE admin state.
 TaskListenerRegResp removeListener(TaskListenerRegReq req)
          Remove external (web-service) listeners for task events.
 void resumeTask(String taskId)
          Return a task to the state it was in before it was suspended.
 void setErrorOnTask(String taskId, String message)
          Set an error on the given task.
 void setGlobalTaskPlanPolicy(WorklistTaskAdmin.OPERATION operation, String[] roles)
          Set the global policy for *all* task plans that don’t specify their own explicit policy for the given operation type.
 void setTaskCompletionDueBusinessDate(String taskId, BusinessTime time)
          Set the task completion due date using a business time.
 void setTaskCompletionDueDate(String taskId, Date completeDueDate)
          Set the task completion due date.
 void setTaskCreationDate(String taskId, Date newDate)
          Set the task creation date to a new value.
 void setTaskCurrentStep(String taskId, String stepName)
          Force the task with the given id to reflect the given step as its current step.
 void setTaskCurrentStepClaimDueBusinessDate(String taskId, BusinessTime time)
          Deprecated. Use a 'claim' step in your task plan and set the completion due business date for that step.
 void setTaskCurrentStepClaimDueDate(String taskId, Date claimDueDate)
          Deprecated. Use a 'claim' step in your task plan and set the completion due business date for that step.
 void setTaskCurrentStepCompletionDueBusinessDate(String taskId, BusinessTime time)
          Set the completion due date for the current step on this task using a business time.
 void setTaskCurrentStepCompletionDueDate(String taskId, Date completeDueDate)
          Set the completion due date for the current step of this task.
 void setTaskCurrentStepTimeEstimate(String taskId, Interval timeEstimate)
          Set the time estimate for completion of the current step for the given task.
 void setTaskOwner(String taskId, String owner)
          Set the task owner.
 void setTaskPlanForTask(String taskId, TaskPlanId taskPlanId)
          Set the task plan for the indicated task.
 void setTaskPlanPolicy(TaskPlanId taskPlanId, WorklistTaskAdmin.OPERATION operation, String[] roles)
          Set a simple policy for the given task plan and operation type.
 void setTaskPriority(String taskId, int priority)
          Set a task priority
 void setTaskStepTimeEstimates(String taskId, Map stepTimeEstimates)
          Set a Map representing the time estimates for completion of each step for the given task.
 void setTaskTimeEstimate(String taskId, Interval timeEstimate)
          Set the time estimate for completion of the given task.
 void suspendTask(String taskId)
          Suspend the task.
 void updateTask(TaskSetPropertiesXMLDocument taskProperties)
          Updates the task based on the information given in the provided TaskSetPropertiesXMLDocument instance.Note that the following properties on the TaskSetPropertiesXMLDocument are required.
 

Method Detail

constructTask

String constructTask(TaskPlanId taskPlanId,
                     String name,
                     String comment)
                     throws ManagementException,
                            BusinessCalendarException,
                            AssignmentException,
                            RemoteException
Create a new task based on the task plan with the given ID and using its default constructor. The parameters for this method represent the most commonly specified parameters for task creation. If you require more control over the parameters used for task creation, use the constructTask(TaskConstruction) method instead.

Returns:
The ID of the created task.
Throws:
ManagementException
BusinessCalendarException
AssignmentException
RemoteException
See Also:
constructTask(TaskConstruction)

constructTask

String constructTask(TaskConstructionXMLDocument taskConstruction)
                     throws DataTypeException,
                            ManagementException,
                            BusinessCalendarException,
                            AssignmentException,
                            RemoteException
Create a new task based on the information given in the provided TaskCreationXMLDocument instance. Note that the following properties on TaskCreationXMLDocument are required (and will be set with default values if not supplied).

Parameters:
taskConstruction -
Returns:
The ID of the created task.
Throws:
ManagementException
BusinessCalendarException
AssignmentException
DataTypeException
RemoteException

constructTask

String constructTask(TaskConstruction taskConstruction)
                     throws ManagementException,
                            BusinessCalendarException,
                            AssignmentException,
                            RemoteException
Create a new task based on the information given in the provided TaskConstruction instance. Note that the following properties on TaskConstruction are required (and will be set with default values if not supplied).

Parameters:
taskConstruction -
Returns:
The ID of the created task.
Throws:
ManagementException
BusinessCalendarException
AssignmentException
RemoteException

updateTask

void updateTask(TaskSetPropertiesXMLDocument taskProperties)
                throws ManagementException,
                       DataTypeException,
                       RemoteException
Updates the task based on the information given in the provided TaskSetPropertiesXMLDocument instance.Note that the following properties on the TaskSetPropertiesXMLDocument are required.

Parameters:
taskProperties -
Throws:
ManagementException
DataTypeException
RemoteException

setTaskCurrentStep

void setTaskCurrentStep(String taskId,
                        String stepName)
                        throws ManagementException,
                               UnknownObjectException,
                               RemoteException
Force the task with the given id to reflect the given step as its current step. NOTE: This method should be used with caution as it might leave task properties in a state that differs from the state they would have been in had the task proceeded normally to the indicated step. To mitigate this, the caller could manually set properties as required by the new current step.

Parameters:
taskId -
stepName -
Throws:
ManagementException
UnknownObjectException
RemoteException

setTaskPlanForTask

void setTaskPlanForTask(String taskId,
                        TaskPlanId taskPlanId)
                        throws ManagementException,
                               RemoteException
Set the task plan for the indicated task. This method should be used only in cases where a custom or special task plan has been constructed to ensure this task will proceed correctly. The custom or special task type should be a derivative of the current task plan for this task.

Throws:
ManagementException
RemoteException

completeTask

void completeTask(String taskId)
                  throws ManagementException,
                         RemoteException
Administratively complete a task in any state

Parameters:
taskId -
Throws:
ManagementException
RemoteException

abortTask

void abortTask(String taskId)
               throws ManagementException,
                      RemoteException
Administratively abort a task in any state

Parameters:
taskId -
Throws:
ManagementException
RemoteException

suspendTask

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

Parameters:
taskId -
Throws:
ManagementException
RemoteException

resumeTask

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

Parameters:
taskId -
Throws:
ManagementException
RemoteException

setErrorOnTask

void setErrorOnTask(String taskId,
                    String message)
                    throws ManagementException,
                           RemoteException
Set an error on the given task. This flags the task as having encountered some sort of technical error. Tasks flagged with a error will typically be highlighted in a management console (for example the WLI management console). This method should not be used to indicate business-related errors. The step model in the task should be used to indicate business-related errors by having dedicated steps to represent these errors.

Parameters:
taskId - The id of the task upon which the error will be set.
Throws:
ManagementException - If any error occurs setting the error.
RemoteException

clearErrorOnTask

void clearErrorOnTask(String taskId)
                      throws ManagementException,
                             RemoteException
Clear an error from a task upon which an error was set by a prior call to setErrorOnTask.

Parameters:
taskId - The task for which the error is being cleared.
Throws:
ManagementException - If any error occurs clearing the error.
RemoteException
See Also:
setErrorOnTask(String taskId, String message)

reactivateTask

void reactivateTask(String taskId)
                    throws ManagementException,
                           RemoteException
Bring a task in the COMPLETED or ABORTED admin state back to the ACTIVE admin state. The task is moved back to the current step it had before it was aborted or completed. If the task was aborted or completed via a user taking an action on a step, that step is again made the current step. If the task was administratively completed or aborted, the current step will be the current step the task had when the task was forced to complete or abort.

Parameters:
taskId - The task which is being reactivated.
Throws:
ManagementException - If any error occurs reactivating the task.
RemoteException

deleteTask

void deleteTask(String taskId)
                throws ManagementException,
                       RemoteException
Force the deletion of a task.

Parameters:
taskId -
Throws:
ManagementException
RemoteException

deleteTasks

void deleteTasks(String[] taskId)
                 throws ManagementException,
                        RemoteException
Force the deletion of an array of tasks.

Parameters:
taskId -
Throws:
ManagementException
RemoteException

setTaskPriority

void setTaskPriority(String taskId,
                     int priority)
                     throws ManagementException,
                            RemoteException
Set a task priority

Parameters:
priority -
taskId -
Throws:
ManagementException
RemoteException

setTaskCreationDate

void setTaskCreationDate(String taskId,
                         Date newDate)
                         throws ManagementException,
                                RemoteException
Set the task creation date to a new value. This method should only be used in cases where tasks are being created after the fact.

Throws:
ManagementException
RemoteException

setTaskCompletionDueDate

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

Parameters:
completeDueDate -
taskId -
Throws:
ManagementException
RemoteException

setTaskCurrentStepCompletionDueDate

void setTaskCurrentStepCompletionDueDate(String taskId,
                                         Date completeDueDate)
                                         throws ManagementException,
                                                RemoteException
Set the completion due date for the current step of this task.

Parameters:
completeDueDate -
taskId -
Throws:
ManagementException
RemoteException

setTaskCurrentStepClaimDueDate

@Deprecated
void setTaskCurrentStepClaimDueDate(String taskId,
                                               Date claimDueDate)
                                    throws ManagementException,
                                           RemoteException
Deprecated. Use a 'claim' step in your task plan and set the completion due business date for that step.

Set the claim due date for the current step on this task using an absolute date. This value is persistent, meaning it will apply to this task's current step no matter if the current step changes from the step that was current when this method was first called. To clear this value, call this method with time equal to null.

Parameters:
taskId -
claimDueDate -
Throws:
ManagementException
RemoteException

setTaskCompletionDueBusinessDate

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

Parameters:
time -
taskId -
Throws:
ManagementException
BusinessCalendarException
RemoteException

setTaskCurrentStepCompletionDueBusinessDate

void setTaskCurrentStepCompletionDueBusinessDate(String taskId,
                                                 BusinessTime time)
                                                 throws ManagementException,
                                                        BusinessCalendarException,
                                                        RemoteException
Set the completion due date for the current step on this task using a business time. This value is persistent, meaning it will apply to this task's current step no matter if the current step changes from the step that was current when this method was first called. To clear this value, call this method with time equal to null.

Parameters:
time -
taskId -
Throws:
ManagementException
BusinessCalendarException
RemoteException

setTaskCurrentStepClaimDueBusinessDate

@Deprecated
void setTaskCurrentStepClaimDueBusinessDate(String taskId,
                                                       BusinessTime time)
                                            throws ManagementException,
                                                   BusinessCalendarException,
                                                   RemoteException
Deprecated. Use a 'claim' step in your task plan and set the completion due business date for that step.

Set the claim due date for the current step on this task using a business time. This value is persistent, meaning it will apply to this task's current step no matter if the current step changes from the step that was current when this method was first called. To clear this value, call this method with time equal to null.

Parameters:
time -
taskId -
Throws:
ManagementException
BusinessCalendarException
RemoteException

setTaskTimeEstimate

void setTaskTimeEstimate(String taskId,
                         Interval timeEstimate)
                         throws ManagementException,
                                RemoteException
Set the time estimate for completion of the given task. The time is expressed as an Interval instance. The provided estimate will override the estimate given on the task plan for the task (if any) and any default time estimate imposed by Worklist.

Parameters:
taskId - The id of the task for which time is being estimated.
timeEstimate - The time estimate for the task. This may be null to clear any previous task-specific estimate for this step. In this case, task plan or Worklist imposed defaults will be used after this call returns.
Throws:
ManagementException - If any error occurs setting estimates.
RemoteException
See Also:
TaskPlanFactory.createInterval(String)

setTaskCurrentStepTimeEstimate

void setTaskCurrentStepTimeEstimate(String taskId,
                                    Interval timeEstimate)
                                    throws ManagementException,
                                           RemoteException
Set the time estimate for completion of the current step for the given task. The time is expressed as an Interval instance. The provided estimate will override the estimate given on the step definition for the task (if any) and any default time estimate imposed by Worklist.

Parameters:
taskId - The id of the task for which time is being estimated.
timeEstimate - The time estimate for the step. This may be null to clear any previous task-specific estimate for this step. In this case, task plan or Worklist imposed defaults will be used after this call returns.
Throws:
ManagementException - If any error occurs getting estimates.
RemoteException
See Also:
TaskPlanFactory.createInterval(String)

setTaskStepTimeEstimates

void setTaskStepTimeEstimates(String taskId,
                              Map stepTimeEstimates)
                              throws ManagementException,
                                     RemoteException
Set a Map representing the time estimates for completion of each step for the given task. The map is keyed by the step id, and the values are estimates for the steps expressed as an Interval instance. The estimates will override any estimates on the step definitions in the task plan for the task.

Parameters:
taskId - The id of the task for which time is being estimated.
stepTimeEstimates - A Map representing the time estimates for each step. This may be null to clear all previous estimates for this task instance. In this case, task plan or Worklist imposed defaults will be used after this call returns.
Throws:
ManagementException - If any error occurs getting estimates.
RemoteException

setTaskOwner

void setTaskOwner(String taskId,
                  String owner)
                  throws ManagementException,
                         RemoteException
Set the task owner. Must be worklist admin or task owner to change the owner.

Parameters:
owner -
taskId -
Throws:
ManagementException
RemoteException

assignTaskToUser

void assignTaskToUser(String taskId,
                      String userName)
                      throws ManagementException,
                             AssignmentException,
                             RemoteException
Assign the task to the user and claim it on his behalf. Note, this method is equivalent to calling assignTask() with a single AssigneeDefinition of type User and handling of DEFAULT, and enableLoadBalancingAvailabilityCheck = false and enabledLoadBalancingWorkloadTaskCountOnly = true.

Parameters:
userName -
taskId -
Throws:
ManagementException
AssignmentException
RemoteException
See Also:
assignTask(String taskId, AssignmentInstructions)

assignTaskToUserInGroup

String assignTaskToUserInGroup(String taskId,
                               String groupName)
                               throws ManagementException,
                                      AssignmentException,
                                      RemoteException
Assign the task to a selected user in the given group, and claim it on his behalf. The selection of a user from the group is done by applying a load balancing algorithm to pick the user with the lowest workload. Note, this method is equivalent to calling assignTask() with a single AssigneeDefinition of type Group and handling of LOAD_BALANCING, and enableLoadBalancingAvailabilityCheck = false and enabledLoadBalancingWorkloadTaskCountOnly = true.

Parameters:
groupName -
taskId -
Returns:
The name of the new claimant for the task.
Throws:
ManagementException
AssignmentException
RemoteException
See Also:
assignTask(String taskId, AssignmentInstructions)

assignTask

String assignTask(String taskId,
                  AssignmentInstructions instructions)
                  throws ManagementException,
                         AssignmentException,
                         RemoteException
Assign the task to the assignees indicated in the provided assignee list and apply the indicated type of candidateListHandling to finish the assignment process (possibly by claiming the task on the behalf of a designated candidate). The user who has the less task assigned is selected.

Parameters:
taskId - The task to be assigned.
instructions - A set of instructions for carrying out the assignment of the given task. If null, the instructions on the current step for the task are used. If the assignee list in the given instructions is null, this method uses any stored override assignees (set via a prior call to assignTask()). If this is null or empty, this method uses the assignee list set for the current step of the task plan for this task. If no assignees are set in any of these locations, the task is assigned to the task owner. If candidateListHandling is null, the handling set on the current step for the task is used. If loadBalancingAvailabilityCheckEnabled or loadBalancingWorkloadTaskCountOnlyEnabled is null, the value(s) requested on the current step for the task is/are used.
Returns:
the user selected as claimant, or null if no user was selected.
Throws:
ManagementException
AssignmentException
RemoteException

getUserAvailabilityInfoForPeriod

AvailabilityInfo[] getUserAvailabilityInfoForPeriod(String userId,
                                                    Date startTime,
                                                    Date endTime)
                                                    throws ManagementException,
                                                           BusinessCalendarException,
                                                           RemoteException
Calculate the availability (as blocks of free time) for the given user over the span of time defined by the given startTime and endTime. This calculation is performed using the business calendar associated with the user. If no calendar is associated with the user, this call will check for calendars associated with the groups to which the user belongs. The first group calendar that can be found is used. If no group calendar can be found, the system calendar is used.

Parameters:
userId - The user id of the user for which availability will be calculated.
startTime - The earliest time for which availability should be checked.
endTime - The latest time for which availability should be checked.
Returns:
An array of availability information objects. Users that have no availability will cause an empty (non-null) array to be returned.
Throws:
ManagementException - If any error occurs calculating the user's availability.
BusinessCalendarException
RemoteException

getCandidateUsersForTask

String[] getCandidateUsersForTask(String taskId,
                                  String stepName)
                                  throws ManagementException,
                                         UnknownObjectException,
                                         AssignmentException,
                                         RemoteException
Get a list of designated candidate users for claiming the task with the given id (when it is at the indicated step).

Parameters:
taskId -
stepName - The name of the step to obtain assignment instructions from. May be null, indicating the current assignees for the task should be used, or if none have been specified, the owner of the task is used.
Returns:
An array of user ids representing candidates for claiming the given task.
Throws:
ManagementException - If any other error occurs calculating the candidate list.
RemoteException - If a communication error occurs.
UnknownObjectException
AssignmentException

getCandidateUsers

String[] getCandidateUsers(TaskContext context,
                           AssigneeDefinition[] assignees)
                           throws ManagementException,
                                  AssignmentException,
                                  RemoteException
Get a list of designated candidate users for claiming a new or existing task. The context parameter indicates that a new task will be created if its taskPlan member is non-null. If the taskId member is non-null, the context parameter represents an existing task. For existing tasks, this method calculates candidates for the task with the given id using the given assignee definitions as a starting point. The list of assignee definitions can include assignees of type AssigneeDefinition.Type.Rule. The given task is used to find the task plan within which the rule is bound, and to provide parameter values for evaluating the rule. For new tasks, you may not use rule assignee definition (because there is no task from which to extract values for the rule evaluation).

Parameters:
context - The TaskContext containing the task id or task plan to use as context when evaluating security constraints (and possibly rules if task id is non-null).
assignees - The assignee definitions (User or Group) to evaluate in order to arrive at a full candidate user list. This may be null if task context contains a task id, but must be non-null if it contains a task plan.
Returns:
An array of user ids representing candidates for claiming the given task.
Throws:
InvalidPrincipalException - If any assignee definition references an invalid user or group.
ManagementException - If any other error occurs calculating the candidate list.
RemoteException - If a communication error occurs.
AssignmentException
See Also:
getCandidateUsersForTask(String, String), TaskPlanFactory.createAssignee(String, com.bea.wli.worklist.api.taskplan.AssigneeDefinition.Type)

getUserWorkloadData

WorklistTaskAdmin.WorkloadData getUserWorkloadData(TaskContext context,
                                                   WorkloadRequest request)
                                                   throws ManagementException,
                                                          RemoteException
Get data on the workload for the given user in support of assigning and claiming the given task.

Parameters:
context - The task id or task plan of the task which is being assigned (and is therefore the context of this request to calculate workload). Must not be null.
request - The WorkloadRequest instance that describes how this method should calculate workload.
Returns:
A WorkloadData instance describing the number of tasks the current user has claimed but not completed, and the workload score calculated for this user. Note that a workload score should be treated as the number of minutes of work this user has.
Throws:
ManagementException
RemoteException

getCumulativeScoreForUser

WorklistTaskAdmin.CumulativeScore getCumulativeScoreForUser(String userId,
                                                            TaskPlanId taskPlanId,
                                                            boolean includeAvailabilityInCalculation,
                                                            Date startTime,
                                                            Date endTime)
                                                            throws ManagementException,
                                                                   RemoteException
Calculate an cumulative load balancing score for the given user for the purposes of assigning a task of the given type. Higher scores indicate greater desireability of the user from a load balancing perspective.

Parameters:
userId - The id of the user for which a score will be calculated.
taskPlanId - The id of task plan associated with the task for which load balancing is being performed (passed to WorklistCalculatorFactory to obtain the proper workload and availability calculators).
includeAvailabilityInCalculation - Indicates if the calculator should include the availability of the user in its calculation of the cumulative score. If true, the calculator can choose to determine availability via the appropriate AvailabilityCalculator as returned from WorklistCalculatorRegistry, or provide its own availability calculation.
startTime - The earliest time for which a score will be calculated (passed to availability calculation).
endTime - The latest time for which a score will be calculated (passed to availability calculation).
Returns:
A CumulativeScore instance representing the cumulative score for the user, and the workload and availability scores used to calculate it.
Throws:
ManagementException - If any error occurs calculating the score.
RemoteException

isTaskInView

boolean isTaskInView(String taskId)
                     throws ManagementException,
                            RemoteException
Return an indication of whether the current user has some affinity to to the task identified by taskId. Task affinity can be achieved by being the claimant, owner, or assignee for a task.

Parameters:
taskId - The id of the task to check
Returns:
true if the current user has some affinity to this task.
Throws:
ManagementException - If any error occurs retrieving the task or checking affinity.
RemoteException - If any communication error occurs.

isUserAssignee

boolean isUserAssignee(String taskId)
                       throws ManagementException,
                              RemoteException
Return an indication of whether the current user is on the assignee list of the task identified by taskId.

Parameters:
taskId - The id of the task to check
Returns:
true if the current user is on the assignee list of this task.
Throws:
ManagementException - If any error occurs retrieving the task or checking the assignee list.
RemoteException - If any communication error occurs.

addListener

TaskListenerRegResp addListener(TaskListenerRegReq req)
                                throws ManagementException,
                                       BusinessCalendarException,
                                       RemoteException
Add external (web-service) listeners for task events.

Parameters:
req - The Task Listener Registry Request
Returns:
TaskListenerReqResp Response to the registry request.
Throws:
ManagementException - If any error occurs calculating the user's availability.
BusinessCalendarException
RemoteException

removeListener

TaskListenerRegResp removeListener(TaskListenerRegReq req)
                                   throws ManagementException,
                                          BusinessCalendarException,
                                          RemoteException
Remove external (web-service) listeners for task events.

Parameters:
req - The Task Listener Un-Registry Request
Returns:
TaskListenerReqResp Response to the un-registry request.
Throws:
ManagementException - If any error occurs calculating the user's availability.
BusinessCalendarException
RemoteException

getWSListenerByTask

TaskListenerInfo[] getWSListenerByTask(String taskId)
                                       throws ManagementException,
                                              RemoteException
Get task listener list for the given task

Parameters:
taskId -
Returns:
TaskListenerInfo Array of selected listener infos
Throws:
ManagementException - If any error occurs calculating the user's availability.
RemoteException

getWSListenerByAction

TaskListenerInfo[] getWSListenerByAction(String action)
                                         throws ManagementException,
                                                RemoteException
Get task listener list for the given task and action

Parameters:
action -
Returns:
TaskListenerInfo Array of selected listener infos
Throws:
ManagementException - If any error occurs calculating the user's availability.
RemoteException

getWSListenerByTaskAndAction

TaskListenerInfo[] getWSListenerByTaskAndAction(String taskId,
                                                String action)
                                                throws ManagementException,
                                                       RemoteException
Get task listener list for the given task and action

Parameters:
taskId -
action -
Returns:
TaskListenerInfo Array of selected listener infos
Throws:
ManagementException - If any error occurs calculating the user's availability.
RemoteException

setGlobalTaskPlanPolicy

void setGlobalTaskPlanPolicy(WorklistTaskAdmin.OPERATION operation,
                             String[] roles)
                             throws ManagementException,
                                    RemoteException
Set the global policy for *all* task plans that don’t specify their own explicit policy for the given operation type. Note, this method is provided for convenience only. BEA recommends you use WorklistAdminMBean instead.

Note, this method has the same effect regardless of what WorklistTaskAdmin instance is used, or what Worklist system instance it comes from.

To call this method, you must be granted one of the roles listed for the global TaskPlan Admin policy (by default this is the Admin and IntegrationAdmin roles). If an unauthorized user attempts this call, a SecurityException will be thrown.

NOTE: This method will only work when you are using the WLS default authorization provider. If you are using a third-party provider, you must use that provider's tools for assigning the policy to the task plan.

Throws:
ManagementException
RemoteException
See Also:
WorklistAdminMBean.setGlobalTaskPlanPolicy(String, String[])

getGlobalTaskPlanPolicy

String[] getGlobalTaskPlanPolicy(WorklistTaskAdmin.OPERATION operation)
                                 throws ManagementException,
                                        RemoteException
Get the global policy for *all* task plans that don’t specify their own explicit policy for the given operation type. Note, this method is provided for convenience only. BEA recommends you use WorklistAdminMBean instead.

Note, this method returns the same value regardless of what WorklistTaskAdmin instance is used, or what Worklist system instance it comes from.

To call this method, you must be granted one of the roles listed for the global TaskPlan Admin policy (by default this is the Admin and IntegrationAdmin roles), Query policy (by default this is the Admin, IntegrationAdmin, and IntegrationUser roles), or Update policy (by default this is the Admin and IntegrationAdmin roles). If an unauthorized user attempts this call, a ManagementException will be thrown.

NOTE: This method will only work when you are using the WLS default authorization provider. If you are using a third-party provider, you must use that provider's tools for assigning the policy to the task plan.

Throws:
ManagementException
RemoteException
See Also:
WorklistAdminMBean.getGlobalTaskPlanPolicy(String)

setTaskPlanPolicy

void setTaskPlanPolicy(TaskPlanId taskPlanId,
                       WorklistTaskAdmin.OPERATION operation,
                       String[] roles)
                       throws ManagementException,
                              RemoteException
Set a simple policy for the given task plan and operation type. The policy is described in terms of the roles which are authorized to perform the given operation on tasks of the given task plan.

To call this method, you must be granted one of the roles listed for the Admin policy for this task plan, or be granted one of the roles listed for the global TaskPlan Admin policy if this task plan has no explicit policy set for it. If an unauthorized user attempts this call, a ManagementException will be thrown.

NOTE: This method will only work when you are using the WLS default authorization provider. If you are using a third-party provider, you must use that provider's tools for assigning the policy to the task plan.

Parameters:
taskPlanId - The ID of the TaskPlan for the tasks for which this policy is being set.
operation - The type of operation for which the policy is being set.
roles - The roles which are authorized to perform the given operation on tasks of the given type. If roles is empty or null, the policy will be reset to the default/global policy.
Throws:
ManagementException
RemoteException
See Also:
setGlobalTaskPlanPolicy(OPERATION operation, String[] roles)

getTaskPlanPolicy

String[] getTaskPlanPolicy(TaskPlanId taskPlanId,
                           WorklistTaskAdmin.OPERATION operation)
                           throws ManagementException,
                                  RemoteException
Get the policy that is set for the given task plan and operation type. The policy is described in terms of the roles which are authorized to perform the given operation on tasks of the given task plan.

To call this method, you must be granted one of the roles listed for the Admin, Query, or Update policies for this task plan, or be granted one of the roles listed in the global TaskPlan Admin, Query, or Update policies if this task plan has not had an explicit policy set for it. If an unauthorized user attempts this call, a ManagementException will be thrown.

NOTE: This method will only work when you are using the WLS default authorization provider. If you are using a third-party provider, you must use that provider's tools for assigning the policy to the task plan.

Parameters:
taskPlanId - The ID of the type for the tasks for which this policy is being read.
operation - The type of operation for which the policy is being read.
Returns:
An array of Strings representing the names of the roles which are authorized to perform the given operation on tasks of the given type. If the policy is not set on this resource, null will be returned.
Throws:
ManagementException
RemoteException
See Also:
getGlobalTaskPlanPolicy(OPERATION operation)

isAccessAllowed

boolean isAccessAllowed(TaskPlanId taskPlanId,
                        WorklistTaskAdmin.OPERATION operation)
                        throws ManagementException,
                               RemoteException
Determine if the current user is authorized to perform the given operation for the given task plan. This method might be used by user interface clients to control rendering of forms.

Parameters:
taskPlanId - The ID of the task plan for which access permissions will be checked.
operation - The type of operation for which access permissions will be checked.
Returns:
True if the current user is allowed to perform the given operation on the given task plan, false otherwise.
Throws:
RemoteException - If any communication error occurs.
ManagementException

isAccessAllowed

boolean isAccessAllowed(String taskId,
                        WorklistTaskAdmin.OPERATION operation,
                        TaskAffinity[] affinityTypes)
                        throws ManagementException,
                               RemoteException
Determine if the current user is authorized to perform the given operation for the given task given a set of possible types of affinity the current user might have with the task. This method might be used by user interface clients to control rendering of forms.

Parameters:
taskId - The id of the task for which access permissions will be checked.
operation - The type of operation for which access permissions will be checked.
affinityTypes - An array of affinity types for which access permissions will be checked.
Returns:
True if the current user is allowed to perform the given operation on the given task, false otherwise.
Throws:
RemoteException - If any communication error occurs.
ManagementException