- Contents
Interaction Scripter Developer's Guide
Queue.startCallObjectsEnum Enumeration Property
Definition
This property returns an enumeration of CallObjects for queue. The enumeration is traversed using the hasMoreElements and nextElement methods of the enumeration. Each call to the nextElement method returns successive elements of the series. The hasMoreElements method will return a Boolean true if this enumeration contains more elements.
Starting with 2018 R3, the Queue.startCallObjectsEnum, Queue.startChatObjectsEnum, Queue.startConferenceObjectsEnum and Queue.startObjectIdsEnum properties now accept an optional callback (for use with Connect scripts only) whose single parameter contains the result.
Syntax
Queue.startCallObjectsEnum
Usage
Read Yes
Write No
Value Assigned
None.
Value Returned
- Java Enumeration
-
The enumeration containing the list of CallObjects.
Java Enumeration Example (JavaScript)
// disconnect call objects in the queue
var calls = scripter.myQueue.startCallObjectsEnum;
while (calls.hasMoreElements()) {
var CallObject = calls.nextElement();
CallObject.disconnect();
}
Interaction Connect Example
function queue.startObjectIdsEnum(function(result) { try { var objects = [];
while (result.hasMoreElements()) { objects.push('<li>' + result.nextElement() + '</li>');
}
var tdHtml = '<ul>' + objects.join('') + '</ul>';
doc.getElementById('queue-ids-td').innerHTML = tdHtml; console.log('callback complete.'); } catch (error) { console.log('error in startObjectIdsEnum:', error); } });