|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WorklistTaskAdmin
Administrative functions for worklist tasks
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 |
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 |
---|
String constructTask(TaskPlanId taskPlanId, String name, String comment) throws ManagementException, BusinessCalendarException, AssignmentException, RemoteException
ManagementException
BusinessCalendarException
AssignmentException
RemoteException
constructTask(TaskConstruction)
String constructTask(TaskConstructionXMLDocument taskConstruction) throws DataTypeException, ManagementException, BusinessCalendarException, AssignmentException, RemoteException
taskConstruction
-
ManagementException
BusinessCalendarException
AssignmentException
DataTypeException
RemoteException
String constructTask(TaskConstruction taskConstruction) throws ManagementException, BusinessCalendarException, AssignmentException, RemoteException
taskConstruction
-
ManagementException
BusinessCalendarException
AssignmentException
RemoteException
void updateTask(TaskSetPropertiesXMLDocument taskProperties) throws ManagementException, DataTypeException, RemoteException
taskProperties
-
ManagementException
DataTypeException
RemoteException
void setTaskCurrentStep(String taskId, String stepName) throws ManagementException, UnknownObjectException, RemoteException
taskId
- stepName
-
ManagementException
UnknownObjectException
RemoteException
void setTaskPlanForTask(String taskId, TaskPlanId taskPlanId) throws ManagementException, RemoteException
ManagementException
RemoteException
void completeTask(String taskId) throws ManagementException, RemoteException
taskId
-
ManagementException
RemoteException
void abortTask(String taskId) throws ManagementException, RemoteException
taskId
-
ManagementException
RemoteException
void suspendTask(String taskId) throws ManagementException, RemoteException
taskId
-
ManagementException
RemoteException
void resumeTask(String taskId) throws ManagementException, RemoteException
taskId
-
ManagementException
RemoteException
void setErrorOnTask(String taskId, String message) throws ManagementException, RemoteException
taskId
- The id of the task upon which the error will be set.
ManagementException
- If any error occurs setting the error.
RemoteException
void clearErrorOnTask(String taskId) throws ManagementException, RemoteException
taskId
- The task for which the error is being cleared.
ManagementException
- If any error occurs clearing the error.
RemoteException
setErrorOnTask(String taskId, String message)
void reactivateTask(String taskId) throws ManagementException, RemoteException
taskId
- The task which is being reactivated.
ManagementException
- If any error occurs reactivating the task.
RemoteException
void deleteTask(String taskId) throws ManagementException, RemoteException
taskId
-
ManagementException
RemoteException
void deleteTasks(String[] taskId) throws ManagementException, RemoteException
taskId
-
ManagementException
RemoteException
void setTaskPriority(String taskId, int priority) throws ManagementException, RemoteException
priority
- taskId
-
ManagementException
RemoteException
void setTaskCreationDate(String taskId, Date newDate) throws ManagementException, RemoteException
ManagementException
RemoteException
void setTaskCompletionDueDate(String taskId, Date completeDueDate) throws ManagementException, RemoteException
completeDueDate
- taskId
-
ManagementException
RemoteException
void setTaskCurrentStepCompletionDueDate(String taskId, Date completeDueDate) throws ManagementException, RemoteException
completeDueDate
- taskId
-
ManagementException
RemoteException
@Deprecated void setTaskCurrentStepClaimDueDate(String taskId, Date claimDueDate) throws ManagementException, RemoteException
taskId
- claimDueDate
-
ManagementException
RemoteException
void setTaskCompletionDueBusinessDate(String taskId, BusinessTime time) throws ManagementException, BusinessCalendarException, RemoteException
time
- taskId
-
ManagementException
BusinessCalendarException
RemoteException
void setTaskCurrentStepCompletionDueBusinessDate(String taskId, BusinessTime time) throws ManagementException, BusinessCalendarException, RemoteException
time
- taskId
-
ManagementException
BusinessCalendarException
RemoteException
@Deprecated void setTaskCurrentStepClaimDueBusinessDate(String taskId, BusinessTime time) throws ManagementException, BusinessCalendarException, RemoteException
time
- taskId
-
ManagementException
BusinessCalendarException
RemoteException
void setTaskTimeEstimate(String taskId, Interval timeEstimate) throws ManagementException, RemoteException
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.
ManagementException
- If any error occurs setting estimates.
RemoteException
TaskPlanFactory.createInterval(String)
void setTaskCurrentStepTimeEstimate(String taskId, Interval timeEstimate) throws ManagementException, RemoteException
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.
ManagementException
- If any error occurs getting estimates.
RemoteException
TaskPlanFactory.createInterval(String)
void setTaskStepTimeEstimates(String taskId, Map stepTimeEstimates) throws ManagementException, RemoteException
taskId
- The id of the task for which time is being estimated.stepTimeEstimates
- A MapManagementException
- If any error occurs getting estimates.
RemoteException
void setTaskOwner(String taskId, String owner) throws ManagementException, RemoteException
owner
- taskId
-
ManagementException
RemoteException
void assignTaskToUser(String taskId, String userName) throws ManagementException, AssignmentException, RemoteException
userName
- taskId
-
ManagementException
AssignmentException
RemoteException
assignTask(String taskId, AssignmentInstructions)
String assignTaskToUserInGroup(String taskId, String groupName) throws ManagementException, AssignmentException, RemoteException
groupName
- taskId
-
ManagementException
AssignmentException
RemoteException
assignTask(String taskId, AssignmentInstructions)
String assignTask(String taskId, AssignmentInstructions instructions) throws ManagementException, AssignmentException, RemoteException
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.
ManagementException
AssignmentException
RemoteException
AvailabilityInfo[] getUserAvailabilityInfoForPeriod(String userId, Date startTime, Date endTime) throws ManagementException, BusinessCalendarException, RemoteException
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.
ManagementException
- If any error occurs calculating the user's
availability.
BusinessCalendarException
RemoteException
String[] getCandidateUsersForTask(String taskId, String stepName) throws ManagementException, UnknownObjectException, AssignmentException, RemoteException
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.
ManagementException
- If any other error occurs calculating the
candidate list.
RemoteException
- If a communication error occurs.
UnknownObjectException
AssignmentException
String[] getCandidateUsers(TaskContext context, AssigneeDefinition[] assignees) throws ManagementException, AssignmentException, RemoteException
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.
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
getCandidateUsersForTask(String, String)
,
TaskPlanFactory.createAssignee(String, com.bea.wli.worklist.api.taskplan.AssigneeDefinition.Type)
WorklistTaskAdmin.WorkloadData getUserWorkloadData(TaskContext context, WorkloadRequest request) throws ManagementException, RemoteException
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.
ManagementException
RemoteException
WorklistTaskAdmin.CumulativeScore getCumulativeScoreForUser(String userId, TaskPlanId taskPlanId, boolean includeAvailabilityInCalculation, Date startTime, Date endTime) throws ManagementException, RemoteException
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).
ManagementException
- If any error occurs calculating the score.
RemoteException
boolean isTaskInView(String taskId) throws ManagementException, RemoteException
taskId
- The id of the task to check
ManagementException
- If any error occurs retrieving the task or
checking affinity.
RemoteException
- If any communication error occurs.boolean isUserAssignee(String taskId) throws ManagementException, RemoteException
taskId
- The id of the task to check
ManagementException
- If any error occurs retrieving the task or
checking the assignee list.
RemoteException
- If any communication error occurs.TaskListenerRegResp addListener(TaskListenerRegReq req) throws ManagementException, BusinessCalendarException, RemoteException
req
- The Task Listener Registry Request
ManagementException
- If any error occurs calculating the user's
availability.
BusinessCalendarException
RemoteException
TaskListenerRegResp removeListener(TaskListenerRegReq req) throws ManagementException, BusinessCalendarException, RemoteException
req
- The Task Listener Un-Registry Request
ManagementException
- If any error occurs calculating the user's
availability.
BusinessCalendarException
RemoteException
TaskListenerInfo[] getWSListenerByTask(String taskId) throws ManagementException, RemoteException
taskId
-
ManagementException
- If any error occurs calculating the user's
availability.
RemoteException
TaskListenerInfo[] getWSListenerByAction(String action) throws ManagementException, RemoteException
action
-
ManagementException
- If any error occurs calculating the user's
availability.
RemoteException
TaskListenerInfo[] getWSListenerByTaskAndAction(String taskId, String action) throws ManagementException, RemoteException
taskId
- action
-
ManagementException
- If any error occurs calculating the user's
availability.
RemoteException
void setGlobalTaskPlanPolicy(WorklistTaskAdmin.OPERATION operation, String[] roles) throws ManagementException, RemoteException
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.
ManagementException
RemoteException
WorklistAdminMBean.setGlobalTaskPlanPolicy(String, String[])
String[] getGlobalTaskPlanPolicy(WorklistTaskAdmin.OPERATION operation) throws ManagementException, RemoteException
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.
ManagementException
RemoteException
WorklistAdminMBean.getGlobalTaskPlanPolicy(String)
void setTaskPlanPolicy(TaskPlanId taskPlanId, WorklistTaskAdmin.OPERATION operation, String[] roles) throws ManagementException, RemoteException
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.
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.
ManagementException
RemoteException
setGlobalTaskPlanPolicy(OPERATION operation, String[] roles)
String[] getTaskPlanPolicy(TaskPlanId taskPlanId, WorklistTaskAdmin.OPERATION operation) throws ManagementException, RemoteException
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.
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.
ManagementException
RemoteException
getGlobalTaskPlanPolicy(OPERATION operation)
boolean isAccessAllowed(TaskPlanId taskPlanId, WorklistTaskAdmin.OPERATION operation) throws ManagementException, RemoteException
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.
RemoteException
- If any communication error occurs.
ManagementException
boolean isAccessAllowed(String taskId, WorklistTaskAdmin.OPERATION operation, TaskAffinity[] affinityTypes) throws ManagementException, RemoteException
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.
RemoteException
- If any communication error occurs.
ManagementException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |