web stats
get channel info in global deploy - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 12-26-2018, 01:18 PM
stormcel stormcel is offline
OBX.3 Kenobi
Join Date: Mar 2010
Location: Phoenix
Posts: 153
stormcel is on a distinguished road
Default get channel info in global deploy

ok. I asked this on the slack channel, but it's holiday time and no one is on.
I have a global deploy script that fires off an email that basically says "Channels have been deployed on :::fill in name of mirth server here::::"
I would like the actual 'channel name' in that email, but the script that I use in my statistics gathering channel does not work in a deploy script.
So, is there a way, in the deploy script, to detect the 'last deployed channel' so as to add it to the email?
and thanks in advance, you guys are just terrific.
The code I normally used didn't work in a global deploy script.
var thisChannelNow = ChannelUtil.getDeployedChannelName(channelId).toString();
I guess it doesn't work because it's not yet deployed? that's why getDeployedChannelName fails?
Reply With Quote
Old 12-26-2018, 08:54 PM
siddharth siddharth is offline
Mirth Guru
Join Date: Feb 2013
Posts: 835
siddharth is on a distinguished road

You can check whether the current channel is deployed or not using

ChannelUtil.isChannelDeployed(channelIDorName) method.

As far as getting channel name is required, there are 2 prefefined variables in the reference section one is channelId, and other is channel. I think channel will give you your channelName. Try it out.
HL7v2.7 Certified Control Specialist!
Reply With Quote

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 07:50 PM.

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