web stats
Use of configuration map in connection properties - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 02-24-2016, 08:20 AM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road
Default Use of configuration map in connection properties

I've recently been trying to convert a lot of channels to use the configuration map.

I have got a problem today with an smb writer connection where I have replaced the hardcoded username and password fields with variables from the config map.

e.g. username was DOMAIN\Mirth and is now ${ESTH_Domain}\${ESTH_Domain_Mirth_Username}

I'm now getting : QUEUED: Error writing file [SmbAuthException: Logon failure: unknown user name or bad password.]

If I change the username back and hardcode it, but leave the config map item in for the password it works.

Have I got a problem here because I am trying to use two different map variables in combination?

Simon
Reply With Quote
  #2  
Old 02-24-2016, 08:26 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,116
narupley is on a distinguished road
Default

Multiple variables like that should work just fine... Maybe it got queued before you set those values in the config map, and you don't have Regenerate Template enabled?
__________________
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 02-24-2016, 08:33 AM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road
Default

Its not that - I changed it to regenerate template because I knew it would use the original values.

Just to do a further test, I created a new config map item where the domain and username are already joined.

I've put this in and it works, so changed back to the separate ones with '\' in between tried again and it failed. I think there is a genuine problem here. Perhaps it is because I used such long map names?

Do you think you could attempt to reproduce this?
Reply With Quote
  #4  
Old 02-24-2016, 08:40 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,116
narupley is on a distinguished road
Default

Ah I see now... yes that is because of the backslash there. Velocity treats that as an escape character, so it thinks that you're trying to escape the "$" character that comes after it. So in your template use this instead:

Code:
${ESTH_Domain}\\${ESTH_Domain_Mirth_Username}
__________________
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
  #5  
Old 02-24-2016, 08:59 AM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road
Default

Excellent Nick. See... I do need a demo / velocity tutorial! That works just fine.
Reply With Quote
  #6  
Old 02-24-2016, 09:01 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,116
narupley is on a distinguished road
Default

Velocity itself has some good documentation: http://click.apache.org/docs/velocity/user-guide.html
__________________
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
  #7  
Old 02-25-2016, 05:06 AM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road
Default

Following on from our communication yesterday, I cannot get any configuration map items to work in the DICOM connectors for Host, Port or Application Entity. Is this a problem restricted to DICOM or are there other connectors where this does not seem to be compatible?
Reply With Quote
  #8  
Old 02-25-2016, 05:14 AM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road
Default

Here is the error:
DICOM Sender error
ERROR MESSAGE: ${Astraia_PACS_Send_Host}: unknown error
Reply With Quote
  #9  
Old 02-25-2016, 08:29 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,116
narupley is on a distinguished road
Default

Ah yes... for the DICOM connectors, unfortunately right now not all of the fields support Velocity replacement. We have an open issue for that: MIRTH-2800
__________________
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
Reply

Tags
config, connector, map, username, variables

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:05 AM.


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