try { WTChangeRequest2 changeRequest = (wt.change2.WTChangeRequest2) primaryBusinessObject; //Query & loop through the change request to get all the changeables QueryResult affectedObjects = wt.change2.ChangeHelper2.service.getChangeables((wt.change2.ChangeRequestIfc) changeRequest, true); while(affectedObjects.hasMoreElements()) { wt.lifecycle.LifeCycleManaged object = (LifeCycleManaged)affectedObjects.nextElement(); String state = object.getLifeCycleState().toString(); // if the lifecycle state is INWORK, set it to UNDERREVIEW or else do nothing. if(state.equalsIgnoreCase("INWORK")){ wt.lifecycle.LifeCycleHelper.service.setLifeCycleState (object, State.toState ("UNDERREVIEW")); } } } catch (WTException e) { e.printStackTrace(); }