- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2018 01:51 PM
I'm working on an integration with xlRelease and I have an outbound REST message which works with a static text string for the content.
I places a variable in the content string so that it can be substituted before the message is sent. I placed the text ${hosts} in the content and created a "Test Substitution" entry with a value of alpha,beta,gamma.
Yet when I test the REST message, the content contains the text: ${hosts} and not the value of alpha, beta,gamma.
Can you give me advice on how to make this happen?
I'm including a screen dump of the rest message with the variable and test variable substitution highlighted.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2018 06:03 AM
I found the problem and have it working. The issue turned out to be the quotes immediate prior to and following the variable in the content string.
I think this is unfortunate, but it is a fact. To sum up:
A string like this will NOT work:
...{"hostList": "${hosts}"},"...
A string like this WILL work:
...{"hostList": " ${hosts} "},"...
I just have to be sure that xlRelease parses out the leading and trailing blank on the value I send it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2018 01:52 PM
FWIW: I read the doc: Variable substitution in outbound REST messages and I think I'm following its advice....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2018 06:03 AM
I found the problem and have it working. The issue turned out to be the quotes immediate prior to and following the variable in the content string.
I think this is unfortunate, but it is a fact. To sum up:
A string like this will NOT work:
...{"hostList": "${hosts}"},"...
A string like this WILL work:
...{"hostList": " ${hosts} "},"...
I just have to be sure that xlRelease parses out the leading and trailing blank on the value I send it.