When creating a WTPart object WTPart creating a windchill uses OOTB oracle_seqence to automatically generate a number. The sequence name is referenced in the OIR corresponding object. like for
WTPart is: WTPARTID_seq
For
WTDocument is: WTDOCUMENTID_seq , etc.
So, if you want to get the next WTPart number, you can directly call wt.fc.PersistenceHelper.manager.getNextSequence("WTPARTID_seq"); out of your task * engine *.
For different objects, the sequence name will be different.
In 10.2 PTC introduces another getCurrentSequence("SEQ_NAME") method to get the current value of the sequence without increasing it.
source share