web stats
Mirth Community - View Single Post - How to get the "connection status of channel"
View Single Post
  #4  
Old 05-07-2014, 08:49 AM
devdattak devdattak is offline
Mirth Newb
 
Join Date: Aug 2013
Posts: 17
devdattak is on a distinguished road
Default

Thanks for the reply and spent your time to post finally i got the solutions
Now i will post the solution for future purpose

//Return the live status of channel
function channelStatus(channelid){
var controller = com.mirth.connect.server.controllers.DefaultExtens ionController.create();
var monitor = controller.getServicePlugins().get(com.mirth.conne ct.plugins.dashboardstatus.DashboardConnectorStatu sMonitor.PLUGINPOINT);
var states = monitor.invoke('getStates',null,null);
var status = states.get(channelid + '_source_connector')[1];
return status
}

it will return the status like Idle,Disconnected,Connected,Waiting,etc...


Thanks again.
Reply With Quote