cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

BoardNumber can't be updated with other attributes together

WhiteChen
8-Gravel

BoardNumber can't be updated with other attributes together

I use below code to modify WTDocument attirbute by batch, a wired problem, I have many customized attributes like: "BoardNumber,SchematicNumber,DrawingNumber,FilmRev,description,CreatedDate,ECONumber,LeadStatus,CADTool,CADToolVersion,LastUser"

I can update "BoardNumber" independently, but I can't update it with other attributes together, get the error

"

ERROR : wt.pom.connection Administrator - POMHandler.freeConnection: connection active.
 java.lang.Throwable
     at wt.pom.POMHandler.freeConnection(POMHandler.java:287)
     at wt.method.MethodContext.freeConnection(MethodContext.java:1974)
     at wt.method.MethodContext.unregister(MethodContext.java:889)
...

",

other attributes any be updated together. In "Type and Attribute Management", "BoardNumber" is required , but  like "LeadStatus" is also required, who could help me?  Thanks in advance.


for(String key:map.keySet()){
System.out.println(key+" : "+map.get(key));
obj.load(key);
obj.set(key,map.get(key));
doc = (wt.doc.WTDocument) obj.apply();
wt.fc.PersistenceHelper.manager.modify(doc);
}

2 REPLIES 2

What if you move the  apply and modify right below the loop. 

doc = (wt.doc.WTDocument) obj.apply();
wt.fc.PersistenceHelper.manager.modify(doc);

When I move apply and modify out of the loop, I just can modify the latest attribute in my TreeMap, the other modification can't work out. Other attributes except "BoardNumber" can be any combined for modification, very strange. 

Announcements

Top Tags