Assume that you have a component or generic process with two steps.
The first step, "Run Groovy Script," is a Groovy step. Its Groovy code looks like this:
String targetUrl = 'http://localhost:8443/dosomething'
outProps.put("url", targetUrl)
That second line creates an output property named "url" that later steps can use.
In the second step, you can use ${p:Run Groovy Script/url}
to refer to that property. You can use that code either in the step properties or in code such as Groovy or Shell scripts.
Edit: It occurs to me that you might be asking how to set a process property, not an output property. You can do that by first creating the output property as in the code before. Then, add a Set Process Request Property step and use the ${p:Run Groovy Script/url}
reference to set the property value. Here's a screencap of what that step might look like:
