Removing Pending Change icon from Resulting Object when Task is Complete
Hi, I am working on some code that would remove the pending change icon from resulting objects when a change task is complete. I am not sure how to get to the pending change of the resulting objects via java/sql query.
OOTB, the pending change icon is removed when the Change Notice is complete. However, we would like it to be removed when the change task is complete. In the Change Notice workflow, there's an action to approve the hanging changes (think this is the pending changes) after the entire CN is done. Comes from the api call com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.approveHangingChanges(CN).
Basically want this to be done on the task and not the entire notice.
Have some pseudo code below but not sure how to figure out what resulting object has a pending change.
public void tasksFinder(changeNotice) {
Query to find tasks in CN
//Looking for this still
//Once task completes, run approvedHangingChanges
for each task in CN (do I use includedin link??)
If (task == COMPLETE){
approveHangingChanges(task)
}
}
public void approveHangingChanges(ChangeActivityIfc changeActivity) throws WTException (
// this is finding resulting objects in task
QueryResult qs = ChangeHelper2.service.getChangeablesAfter(changeActivity)
while (qs.hasMoreElements()) {
//Not sure how to change pendingchange on each resulting object.
/* Object obj = (Object) qs.nextElement();
if (obj.pendingChange == 1) {
obj.pendingChange = 0 */
}

