Defining a worklist

A worklist allows an administrator or a user application to dynamically change work assignments without contacting a user. The DKWorkListICM class represents a filtered view (based on criteria such as worknode and priority) for a collection of workpackages that route documents to which users have access.

A worklist consists of one or more work nodes from which a user obtains a list of work packages or the "next" work package. A work node can be in more than one worklist.

Worklists are defined by the system administration client or the APIs. When using both the system administration client and the APIs, a worklist must include one or more work nodes. When defining a worklist by using the APIs, if there are zero work nodes included in the worklist, a DK_ICM_MSG_EMPTY_WORK_LIST exception is thrown. When defining a worklist by using the system administration client, the user cannot save the worklist dialog unless there are one or more work nodes included in the worklist.

However, the library server supports a worklist with zero work nodes. This can occur when a work node is deleted. When a work node is deleted, the library server removes the work node from any worklist that it is defined in. If a worklist has zero work nodes, the library server returns all of the workpackages in the system when the worklist is retrieved.

Example: Java™

// Create a new worklist.
 DKWorkListICM workList = new DKWorkListICM();  
// Choose a name of 15 characters or less.
workList.setName("S_fillClaimWL");
workList.setDescription("worklist Covering Fill/Submit
 Claim Work Node."); 
//Specify that work packages returned by the work
// list will be sorted by time
workList.setSelectionOrder
(DKConstantICM.DK_ICM_DR_SELECTION_ORDER_TIME); 
//Specify that the work packages returned 
//will be the one that are not in the suspend state
workList.setSelectionFilterOnSuspend
    (DKConstantICM.DK_ICM_DR_SELECTION_FILTER_NO);

//Specify that work packages returned are 
//not the ones in the notify state
workList.setSelectionFilterOnNotify
     (DKConstantICM.DK_ICM_DR_SELECTION_FILTER_NO);
//Specify that at most 100 work packages should be listed in
// this worklist
workList.setMaxResult(100);
String[] wnNames = {"S_fillClaim"};  
workList.setWorkNodeNames(wnNames);

//Add the new worklist definition to the document  
//routing management object
routingMgmt.add(workList);

For more information about defining worklists, refer to the SDocRoutingDefinitionCreationICM sample.