if (latestResult != null) {
if (latestResult != null && latestResult.getCompletionCode() != null) {
    protected void execute() {        //***************************************************SelectedActions        //Handle the addition of new ActionPatience for SelectedActions        for ( Iterator iter = monitoredActionsSubscription.getAddedCollection().iterator();            iter.hasNext() ; )         {            ActionPatience ap = (ActionPatience)iter.next();            //findDesiredOutcomes(ap);            startTimerIfNone(ap);         }        // Watches for desirable outcomes for Actions        for ( Iterator iter = actionsWrapperSubscription.getChangedCollection().iterator();            iter.hasNext() ; )         {            ActionsWrapper aw = (ActionsWrapper)iter.next();            Action action = aw.getAction();            ActionRecord latestResult = action.getValue();            ActionPatience ap = findActionPatience(action);            if (latestResult != null) { // null only on initialization                if ((latestResult.getCompletionCode().equals(Action.COMPLETED)) // make sure it completed correctly                 && (latestResult.getStartTime() >= ap.getStartTime()))        // make sure it's a current action                    {                        ActionTimeoutAlarm alarm = (ActionTimeoutAlarm)monitoredActions.get(action);                        monitoredActions.remove(action);                        openTransaction();                        ap.setResult(Action.COMPLETED);                        publishChange(new SuccessfulAction(action));                        publishChange(ap);                        closeTransaction();                        alarm.cancel();                    }                }            }    }