@Implementable
@AccessLevel(value=EXTERNAL)
public interface WorkResolver
WorkResolver
interface contains methods to allocate a task.
An implementation of this class should allocate the task to an agent or agents that can work on it. The methods in this class can be invoked any number of times for the same task (since task reallocation is possible). This being the case, implementations should remove any associations with other entities that were previously created as part of the reallocation.
A default implementation of this interface is provided in the application
and is specified by the value contained in the the application property
curam.custom.workflow.workresolver
. If a different work resolution strategy
is required, the default implementation can be overridden by creating a new
class that implements this interface and updating the property above to
point to that new class.
Modifier and Type | Method and Description |
---|---|
void |
resolveWork(TaskDetails taskDetails,
java.util.Map<java.lang.String,java.lang.String> allocationTargets,
boolean previouslyAllocated)
Assigns the task to an agent or agents that can work on it.
|
void |
resolveWork(TaskDetails taskDetails,
java.lang.Object allocationTargets,
boolean previouslyAllocated)
Assigns the task to an agent or agents that can work on it.
|
void |
resolveWork(TaskDetails taskDetails,
java.lang.String allocationTargetID,
boolean previouslyAllocated)
Assigns the task to an agent or agents that can work on it.
|
void |
undoWorkResolution(long taskID)
Removes any assignments of the task to an agent or agents, this method is
called when a task is closed.
|
void resolveWork(TaskDetails taskDetails, java.lang.Object allocationTargets, boolean previouslyAllocated)
taskDetails
- The task to allocate.allocationTargets
- A list of AllocationTarget
objects.previouslyAllocated
- indicates whether the task is being reallocated.void resolveWork(TaskDetails taskDetails, java.util.Map<java.lang.String,java.lang.String> allocationTargets, boolean previouslyAllocated)
taskDetails
- The task to allocate.allocationTargets
- A Map
of allocation target names to
allocation target types.previouslyAllocated
- indicates whether the task is being reallocated.void resolveWork(TaskDetails taskDetails, java.lang.String allocationTargetID, boolean previouslyAllocated)
taskDetails
- The task to allocate.allocationTargetID
- The ID of an allocation target.previouslyAllocated
- indicates whether the task is being reallocated.void undoWorkResolution(long taskID)
taskID
- The identifier of the task to un-resolve.