public interface CustomTaskDispatcher
CustomTaskDispatcher
package com.dispatchdemo.customdispatchdemo; import java.util.ArrayList; import java.util.Collection; import com.cordys.notification.customdispatch.CustomTaskDispatcher; import com.cordys.notification.customdispatch.TaskInformation; import com.cordys.notification.internal.task.Assignment; import com.cordys.notification.task.AssignmentType; import com.cordys.notification.task.IAssignment; public class MyCustomTaskDispatcher implements CustomTaskDispatcher { public Collection<IAssignment> getAssignments(TaskInformation taskInformation) {
// 1. Write your logic here to decide on the target. // 2. CreateAssignment
object based on the target. Targets could be either a User, Role, Team or a Worklist.IAssignment assignment = new Assignment(id,targetType);
// For Example: If the target is a role or a user, provide the corresponding DN as the parameter. If the target is a Team or a Work list then provide the ID of the team or work list as the parameter. // For instance, if the target is a role called CallCenterExecutive, thenIAssignment assignment = new Assignment(id, AssignmentType.role);
// where id indicates DN of the CallCenterExecutive.ArrayList
assignments = new ArrayList (); assignments.add(assignment); return assignments; } }
Modifier and Type | Method and Description |
---|---|
java.util.Collection<IAssignment> |
getAssignments(TaskInformation taskInformation)
Implement the custom dispatch logic in this method.
|
java.util.Collection<IAssignment> getAssignments(TaskInformation taskInformation)
taskInformation
- An instance of TaskInformation
IAssignment
instances.
The notification would be dispatched to all the assignments in this list.