To issue a global halt, use the GraphGlobals.globalHalt() method. When you call this method, SQL-GR allows vertices to complete the current iteration, including updates to the vertex state and local aggregators. Moreover, local aggregator updates are rolled up into final global values before graph processing finally responds to the global halt by moving into the last phase where final results are emitted.
For example:
if (undeliverableMessages.advanceToNextMessage()){ globals.globalHalt(); }