Colin,
Here's a class file that I think will do something very similar to what
you need. See the method, setResultingItemsState(),
Pass this method a ChangeNotice object and it will:
Query it for the ChangeActivity.
Once found, the ChangeActivity is queried for Resulting Items for a
WTDocument. In our process the WTDocument is the object whose state is
used for the target state for the other Resulting Items objects so we
first find the WTDoc on the Resulting Items and then get its state.
Next we reset the CA query and go thru it again. Any object that is not a
WTDoc will then have it's state set to match the WTDoc. If that object is
a WTPart it too is queried for EPMDocs. Any associated EPMDoc whose
number (less extension - .prt, .asm, etc) and Version match the WTPart
also have their states set to match the WTDocument's state.
Hope this helps
David