|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AssignmentHandler
Describes an assignment algorithm that can be used to assign a task of a given type to users as candidates for claiming the task. This algorithm may optionally choose to claim the task in the name of a designated candidate user. Implementations of this interface MUST provide a public default (no arg) constructor. Implementations must make no assumptions about the lifecycle of their instances nor their relationship to other instances. Lifecycle is controlled entirely via the initialize() and destroy() methods.
Nested Class Summary | |
---|---|
static class |
AssignmentHandler.Request
Request object passed to an assignment handler when Worklist is requesting the assignment of a task. |
static interface |
AssignmentHandler.Response
Response object an assignment handler returns describing the assignment decision that has been made for the task. |
Method Summary | |
---|---|
AssignmentHandler.Response |
assignTask(AssignmentHandler.Request request)
Make assignment decisions for the given task. |
AssignmentHandler.Response |
assignTaskToNextUser(String currentClaimant,
String[] candidateUserIds)
This method is called only when the action taken is of type AssignToNextUserAction. |
void |
destroy()
Release any resources obtained in the call to initialize or calls to assignTask(). |
void |
initialize()
Initialize this instance in preparation for calls on assignTask() |
boolean |
isLastCandidateOnList(String currentClaimant,
String[] candidateUserIds)
Indicates if the currentClaimant parameter represents the 'last' candidate on the candidateUserIds list. |
void |
setProperties(Property[] props)
Set any properties that were configured with this assignment handler. |
Method Detail |
---|
void setProperties(Property[] props)
props
- void initialize() throws ManagementException
ManagementException
- if any error occurs that would prevent
this instance from properly handling calls to assignTask()AssignmentHandler.Response assignTask(AssignmentHandler.Request request) throws AssignmentException, ManagementException
request
- A Request instance containing the information needed to
assign a task.
AssignmentException
- if any authorization or logical error happens
during assignment.
ManagementException
- If any other error occurs during assignment.AssignmentHandler.Response assignTaskToNextUser(String currentClaimant, String[] candidateUserIds) throws AssignmentException, ManagementException
currentClaimant
- Current claimant of the task.candidateUserIds
- List of user ids for the users that have been
designated as candidate claimants for the task. This list is
guaranteed to be the same (same users in the same order) from
first call to this method in the iteration of the list to the
last call.
AssignmentException
- if any authorization or logical error happens
during assignment.
ManagementException
- If any other error occurs during assignment.boolean isLastCandidateOnList(String currentClaimant, String[] candidateUserIds) throws AssignmentException, ManagementException
currentClaimant
- Current claimant of the task.candidateUserIds
- List of user ids for the users that have been
designated as candidate claimants for the task. This list is
guaranteed to be the same (same users in the same order) from
first call to this method in the iteration of the list to the
last call.
AssignmentException
- if any authorization or logical error happens
during assignment.
ManagementException
- If any other error occurs during assignment.void destroy() throws ManagementException
ManagementException
- If any error occurs releasing resources.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |