No announcement yet.

get channel info in global deploy

  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #2
    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!