web stats
Variables in FS Watcher Channel - Variable replaced after deployment. - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 09-23-2013, 02:24 AM
FReilly FReilly is offline
Mirth Newb
 
Join Date: Aug 2013
Posts: 21
FReilly is on a distinguished road
Default Variables in FS Watcher Channel - Variable replaced after deployment.

Thanks to Narupley in This thread, I've managed to get my channel to dynamically load a value for the Directory during deployment from the Global ChannelMap.

However, I seem to have an issue between logins where the Variable is being replaced with the translated value. This is a particular issue because we're exporting these channels into source control, and plan to auto-deploy these between different environments (Dev/QA/Prod) - Because of this, we need to ensure that the value set remains the same - otherwise we're going to end up checking in a translated value, rather than the variable value.

Steps to recreate
Version: 3.0.0.6912
  • Open Administrator
  • Click on Channels >> Edit Global Scripts
  • Add the following to the Deploy Script: globalMap.put('FileInputLocation','C:\\HL7Messages ');
  • Click Save Scripts
  • Click on Channels >> New Channel
  • Give the Channel a Name and click on the Source Tab
  • Set Connector Type to File Reader
  • Set Directory to ${FileInputLocation}
  • Click Save Changes
  • Click Channels >> Select the Channel >> Right-Click and select Deploy Channel
  • Select Edit Channel >> Source Tab >> Note that the variable is still present in Directory
  • Click Logout
  • Log back into Administrator
  • Click on Channels >> Select the Channel >> Edit Channel >> Source Tab
  • Note that the Directory field now lists the value from the Global Deployment script, not the variable.

Last edited by FReilly; 09-23-2013 at 02:54 AM.
Reply With Quote
  #2  
Old 09-23-2013, 10:03 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

This is actually a bug. I've created an issue for it (MIRTH-2950) and resolved it, so it'll be fixed in 3.0. Thanks!
__________________
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
  #3  
Old 09-23-2013, 11:17 PM
FReilly FReilly is offline
Mirth Newb
 
Join Date: Aug 2013
Posts: 21
FReilly is on a distinguished road
Default

Thanks, I thought it might be. Thanks for sorting it for us.
Reply With Quote
Reply

Tags
channel, file reader, global channel map, variable

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 11:09 PM.


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