ISSUE:
I would like to dynamically change pieces of my REST Web Service Consumer Web Service URL. I'm aware that you can use global variables but I've observed the following information in the help:
I would like to use this functionality but I'm not sure how to populate the substitution variable. How do you populate Substitution Variables for REST Web Service Consumers?
RESOLUTION:
In order to populate the substitution variable, you’ll need to set it within the properties file of the Web Service Consumer object. To do this, use the Set Property Business Process task to simultaneously establish a properties file and assign a variable:
You’ll need to create a variable with the type of Properties and assign it to the Properties File parameter of the Set Property task. Next, create the name of the property. This will be the value that you use when referencing the variable. Ex. ${productId}
The last parameter that needs to be filled in is the value that you would like to give the variable in the properties file. This would be the value in the URL that you would like substituted with ${productId}. In this test case I used “HelloWorldSetProperty”.
The properties file that you created needs to be assigned to the Web Service Consumer task itself at this point:
The overall result is:
http://localhost:8081/${OrdersWSPRest}
Turns to
http://localhost:8081/HelloWorldSetProperty
Checking the auditor and seeing the following will let you know the substitution was successful:
Cleo - 4949 Harrison Ave Suite 200 Rockford, IL 61108
©2019 Cleo. All rights reserved.
Comments
0 comments
Please sign in to leave a comment.