Added flag for detecting end of activities within a topology