I have a groovy script step in my process, this script sets a output property. I want to use this property value to set a property on a subsequent step.
Or
Simply use this property value in another groovy script step in my process.
The documentation says i need to use ${p:stepName/propName}. But how do I use it. can anyone give me an example. Assume that the process is the following
1) groovy step with name 'Run Groovy Step', this set the value of property 'CityName' to 'London'.
2) groovy step that wants to use the value of 'CityName'.
How do i use ${p:stepName/propName}?
is it ${p:Run Groovy Step/CityName} ?
Answer by Tim McMackin (1697) | Nov 18, 2016 at 12:21 PM
I combined my answer and Tiffany's on your StackExchange question here:
Answer by Tim McMackin (1697) | Nov 16, 2016 at 03:48 PM
Yes, that's basically it. You set the output property either with Groovy or in the post-processing script of a step. Then you access it with ${p:stepName/propName}
or with properties.get(stepName/propName)
. Your code ${p:Run Groovy Step/CityName}
should work.
For an example: http://ibm.com/support/knowledgecenter/en/SS4GSP_6.2.2/com.ibm.udeploy.doc/topics/output_properties.html
Answer by TiffanyLe (1) | Nov 16, 2016 at 09:40 PM
If you are using the Groovy step to set the value of your property, the process is very simple.
In your Groovy step called Run Groovy Script, set the value of your output property called 'CityName':
String propValue = "London"
outProps.put("CityName",propValue)
In another process step, reference 'CityName' as a property of the Run Groovy Script:
${p:Run Groovy Script/CityName}
Hi TiffanyLe,
Any trick for output a secure property from groovy step, like a password ?