Skip to content

errorManager.hasParent

Signature: errorManager.hasParent(messageId)

Returns: Boolean hasParent - true if this message has a parent; otherwise, false

Returns true if the messageId has a parent indicating that it was resubmitted or resolved.

Parameters

Type Name Description Default
Long messageId the message ID

Example

// From a Scheduled Script: check whether matching error messages were previously resolved or resubmitted
if (qie.getErrorCount() > 0) {
    var results = errorManager.searchErrors("error!=bob");

    for (var i = 0; i < results.size(); i++) {
        var messageQueueId = results.get(i);
        var hasParent = errorManager.hasParent(messageQueueId); // true | false
        // use hasParent to decide whether to process or skip this message
    }
}