Thanks for the insights. Here is the code that can retrieve the structure of a part instance:
try {
ObjectIdentifier oid = ObjectIdentifier.newObjectIdentifier("wt.part.WTPart:1988914855");
WTPart part = (WTPart)PersistenceHelper.manager.refresh(oid);
System.out.println("My part: " + part.getName());
WTPartMaster master = part.getMaster();
QueryResult qr = ConfigurationHelper.service.getAllInstances(master);
if (qr != null) {
while (qr.hasMoreElements()) {
WTProductInstance2 instance = (WTProductInstance2) qr.nextElement();
System.out.println("Instance name: " + instance.getNumber());
QueryResult qr2 = ConfigurationHelper.service.getAllMappedInstances(instance);
while (qr2.hasMoreElements()) {
WTProductInstance2 instance2 = (WTProductInstance2) qr2.nextElement();
System.out.println("Instance2 name: " + instance2.getNumber());
}
}
}
} catch (Exception e) {
e.printStackTrace();
}