ecc queue records are getting stuck

Ketan Pandey
Tera Expert
this is not working,Record are getting generated in ecc queue and stuck in ready state

var MyJDBCConnection = Class.create(); MyJDBCConnection.prototype = { initialize: function() {}, executeQuery: function(query) { // Get the MID Server var midServer = new GlideRecord('ecc_agent'); midServer.addQuery('name', 'MIDServerName'); // Replace with your MID Server name midServer.query(); if (!midServer.next()) { gs.error('MID Server not found'); return; } // Get the Data Source var dataSource = new GlideRecord('sys_data_source'); dataSource.addQuery('name', 'DataSourceName'); // Replace with your Data Source name dataSource.query(); if (!dataSource.next()) { gs.error('Data Source not found'); return; } // Create a JDBC Probe var probe = new GlideRecord('ecc_queue'); probe.initialize(); probe.agent = midServer.sys_id; probe.topic = 'JDBCProbe'; probe.name = 'JDBC Query'; probe.source = 'data source sys id'; probe.queue = 'output'; probe.payload = '<parameters><parameter name="data_source_id">' + dataSource.sys_id + '</parameter><parameter name="sql">' + query + '</parameter></parameters>'; probe.insert(); }, type: 'MyJDBCConnection' }; 

 

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Ketan Pandey 

none of the ecc queue records are processed for this topic?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

yes..only records created by this script