if (ar != null) {   if (! ar.isEqual(pe.getReceivedResult())) {  ((PEforCollections) pe).setReceivedResult(ar);   bb.change(pe, null);   } else { if (logger.isInfoEnabled()) logger.info("NOT publishChanging Expansion " + pe + " - new ReceivedResult same as old: " + ar); }
AllocationResult currAR = pe.getReceivedResult();   if ((ar == null && currAR != null) || (ar != null && !ar.isEqual(currAR))) {  ((PEforCollections) pe).setReceivedResult(ar);      bb.change(pe, null);   } else { if (logger.isInfoEnabled()) logger.info("NOT publishChanging Expansion " + pe + " - new ReceivedResult same as old: " + ar);
    public void execute(BlackboardServesDomain bb) {      WorkflowImpl wf = (WorkflowImpl) pe.getWorkflow();      // compute the new result from the subtask results.      try {        AllocationResult ar = wf.aggregateAllocationResults(ids);	// if the aggregation is defined        if (ar != null) {         	  // Only propogate the notification by pubChanging the Expansion	  // if the newly computed AllocationResult is different from what was already there	  if (! ar.isEqual(pe.getReceivedResult())) {	    // set the result on the	    ((PEforCollections) pe).setReceivedResult(ar);	    	    // publish the change to the blackboard.	    bb.change(pe, null); // drop the change details.	    //bb.change(pe, changes);	    //Logging.printDot("=");	  } else {	    if (logger.isInfoEnabled())	      logger.info("NOT publishChanging Expansion " + pe + " - new ReceivedResult same as old: " + ar);	  }        }      } catch (RuntimeException re) {        logger.error("Caught exception while processing DelayedAggregateResults for "+pe, re);      }    }