How to link a task under the tracks of Adoption work-item
String taskId=222
int adoptionId=111
IWorkItem workItem = workItemClient.findWorkItemById(id, IWorkItem.FULL_PROFILE, progressMonitor);
String workItemType = workItem.getWorkItemType();
if (workItemType.equalsIgnoreCase("com.ibm.team.workItemType.adoption")) {
// logic for link theĀ "Task" work-item to "Adoption Item" under the Tracks
}