Skip to content

qie.isChannelStopped

Signature: qie.isChannelStopped(includeErred)

Returns: Boolean isStopped - true = channel is stopped, false = channel is not stopped

Returns 'true' if the channel is currently stopped.

Parameters

Type Name Description Default
Boolean includeErred true = return true if channel is stopped or in erred state, false = return true only if channel is stopped (not in erred state)

Example

// Before a long job, bail out if the channel has been asked to stop.
if (qie.isChannelStopped(true)) {
   return;
}
var itemsToProcess = message.getNode("/lotsOfItemsToProcess");
for (var i = 0; i < itemsToProcess.length; i++) {
   // continue laborious processing of items, re-checking between items
   if (qie.isChannelStopped(true)) {
      break;
   }
}