We have planned to design the dashboard using TW search approach instead of retrieveTaskList () API because it is restricted to users of Instance Owners Team only.
Step 1: Use the search, retrieve whole list of tasks based on the Process Name condition as search criteria.Step 2: We will use looping to find the count of unclaimed task for each Team.
Step 3: Once we get the total unclaimed task list for particular team, we will find the task list count of overdue tasks and yet to be due(At Risk/On Track) tasks count based on the Due date that is returned from the TW Search.
Step 4: Now, we will write the logic for the exclusive employee’s task counts, it will be in nested loop. Where first loop will be of the employee list and second loop will be of task list in that we will compare the employee names from the first loop with assigned user name from the second loop, if it matches will keep on adding the counter, same logic(which was used for unclaimed task) will be implemented for recognizing if the task is overdue or not.
Step 5: The above result set will be manipulated for getting the total list count and need to insert to list for populating in the UI.
Step 6: Look for optimizing the for loops and if conditions. And to make more generic in nature so that it can used irrespective of process application.
1) The task list that is returned by the search has no status like At Risk, On Track and Overdue. Need to manipulate based on the Due date that is available from the TW search.