Getting Task Status in OIM using tcUserOperationsIntf & tcProvisioningOperationsIntf

Below script can be used to get tasks names with the current status in OIM :

tcUserOperationsIntf¬†userintf = (tcUserOperationsIntf) ioUtilityFactory.getUtility(“Thor.API.Operations.tcUserOperationsIntf”);
tcProvisioningOperationsIntf¬†provintf = (tcProvisioningOperationsIntf)ioUtilityFactory.getUtility(“Thor.API.Operations.tcProvisioningOperationsIntf”);
long userKey=100;
tcResultSet userresultSet = userintf.getObjects(userKey);
for(int i=0;i<userresultSet.getRowCount();i++)
{
userresultSet.goToRow(i);
long processKey = userresultSet.getLongValue(“Process Instance.Key”);
tcResultSet provresultSet = provintf.getProcessDetail(processKey);
for(int j=0; i<provresultSet.getRowCount();j++)
{
provresultSet.goToRow(j);
String taskName = provresultSet.getStringValue(“Process Definition.Tasks.Task Name”);
String taskStatus = provresultSet.getStringValue(“Process Instance.Task Details.Status”);
}
}

Leave a Reply

Your email address will not be published. Required fields are marked *