web stats
ChannelUtil question - Page 2 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #11  
Old 12-03-2015, 06:28 AM
mcalKno mcalKno is offline
 
Join Date: Apr 2015
Location: Pennsylvania
Posts: 247
mcalKno is on a distinguished road
Default

Quote:
Originally Posted by Rubicon View Post
Can you post you channel?
i imported your channel that you attached and it worked without error.
Reply With Quote
  #12  
Old 12-03-2015, 06:31 AM
Rubicon Rubicon is offline
OBX.2 Kenobi
 
Join Date: Feb 2013
Posts: 98
Rubicon is on a distinguished road
Default

Quote:
Originally Posted by mcalKno View Post
i imported your channel that you attached and it worked without error.
Hmmm...I'm using 3.2.0 and I thought that ChannelUtil was available for 3.2.0.

I can see the info from the Dashboard when I use logger.info(ChannelUtil.getChannelNames());
Reply With Quote
  #13  
Old 12-03-2015, 06:38 AM
mcalKno mcalKno is offline
 
Join Date: Apr 2015
Location: Pennsylvania
Posts: 247
mcalKno is on a distinguished road
Default

Quote:
Originally Posted by Rubicon View Post
Hmmm...I'm using 3.2.0 and I thought that ChannelUtil was available for 3.2.0.

I can see the info from the Dashboard when I use logger.info(ChannelUtil.getChannelNames());
i just added ChannelUtil.getChannelNames() to the transformer and it worked. Are you able to upgrade your mirth to the latest and try?
Reply With Quote
  #14  
Old 12-03-2015, 06:40 AM
Rubicon Rubicon is offline
OBX.2 Kenobi
 
Join Date: Feb 2013
Posts: 98
Rubicon is on a distinguished road
Default

I can't upgrade at this time.
Reply With Quote
  #15  
Old 12-03-2015, 07:22 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

The method getChannelName(channelId) was added to ChannelUtil in 3.3: MIRTH-3677
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #16  
Old 12-03-2015, 07:42 AM
jadams4's Avatar
jadams4 jadams4 is offline
OBX.3 Kenobi
 
Join Date: Aug 2015
Posts: 143
jadams4 is on a distinguished road
Default

If you are unable to upgrade, here are the methods you can use for 3.2.0

http://javadocs.mirthcorp.com/connec...annelUtil.html

It looks like you could use your example for deployed channels, but not undeployed channels.
Reply With Quote
  #17  
Old 04-03-2019, 11:24 PM
Mirthvu14 Mirthvu14 is offline
OBX.1 Kenobi
 
Join Date: Jan 2019
Posts: 32
Mirthvu14 is on a distinguished road
Default

Quote:
Originally Posted by jadams4 View Post
Yes, this would place it in the dashboard. I meant you could use this to see if the information you want is correct. Then once you have what you want, for example:

logger.info("Is channel deployed: " +ChannelUtil.getChannelState());
logger.info(whatever other info you want here);
// keep logging until you have everything you want

Once you verify everything you want is working how you intend in the dashboard, you could create a destination with these transformers that is a file write. Then save this info in the channelmap and use it in the template to write to a file.
Hello,
I try
Code:
ChannelUtil.getConnectorState
. It returns the DeployedState status (Started\stopped).
Is there a way to get 'enable\disable' status of a connector?
Reply With Quote
Reply

Tags
channel name, channelutil, connector

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:19 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation