Parameter passing in IBM UrbanCode Deploy
While investigating a customer question I just found something very useful in terms of passing parameters within and between UrbanCode Deploy component processes. Groovy (Windows / Linux platforms) and Powershell (Windows platforms) steps have the ability to set output properties as shown below :
Groovy
Within the Groovy script add a line such as :
outProps.setProperty("ReplicaSet", myReplicaSet)
This will create an output property on the process step called ReplicaSet with a value from the variable myReplicaSet.
Powershell
Within the Powershell script add a line such as :
Set-StepOutputProperty 'IPAddress' $cmdOutput
This will create an output property on the process step called IPAddress with a value from the variable cmdOutput.
Each of the above output properties can be used within subsequent steps within the same component process by addressing the property as either :
${p:<Groovy-step-name>/ReplicaSet} or ${p:<Powershell-step-name>/IPAddress}
Sharing property values with other component processes
If you want to share a property with a step within a different component process (maybe even a different component) then you need to create a new property to hold the value. The step called 'Set Process Request Property' allows you to define a process property and set a value. The value can be cleartext or a secure property depending on your needs. The process step has a field for a process request ID that sets the context for the new property. This will have a default value of ${p:request.id} which will be the ID of the current component process. If you change this process request ID to ${p:parentRequest.id} then you are creating an application process property and not a component process property. Therefore by using ${p:parentRequest.id} you elevate the scope of the property to an application property and any step in any subsequent component process can use the property simply by referencing ${p:<Property-name>}.
If you wan to know more contact Mark Roberts at markroberts@uk.ibm.com
Very helpful tips! Is there a way to pass values from one generic process to the subsequent generic process from within the same application process?