APIResponse res = kpiAPIObject.getALLKPIDefinition(); --> function a
Boolean status = res.getNodeValues("shortName").contains(kpiName); --> function b
public void dynamicWait(function a,function b)
{
long t = System.currentTimeMillis();
while (t > System.currentTimeMillis() - 180000 ) {
res = /* execute function a here */
if(/* execute function b here */) {
break;
} else {
Thread.sleep(30000);
continue;
}
}
}
Thanks in advance
if(res.getNodeValues("shortName").contains(kpiName)) {}