• United States
IBM?
  • Site map
IBM?
  • Marketplace

  • Close
    Search
  • Sign in
    • Sign in
    • Register
  • IBM Navigation
IBM Developer Answers
  • Spaces
    • Blockchain
    • IBM Cloud platform
    • Internet of Things
    • Predictive Analytics
    • Watson
    • See all spaces
  • Tags
  • Users
  • Badges
  • FAQ
  • Help
Close

Name

Community

  • Learn
  • Develop
  • Connect

Discover IBM

  • ConnectMarketplace
  • Products
  • Services
  • Industries
  • Careers
  • Partners
  • Support
10.190.13.206

Refine your search by using the following advanced search options.

Criteria Usage
Questions with keyword1 or keyword2 keyword1 keyword2
Questions with a mandatory word, e.g. keyword2 keyword1 +keyword2
Questions excluding a word, e.g. keyword2 keyword1 -keyword2
Questions with keyword(s) and a specific tag keyword1 [tag1]
Questions with keyword(s) and either of two or more specific tags keyword1 [tag1] [tag2]
To search for all posts by a user or all posts with a specific tag, start typing and choose from the suggestion list. Do not use a plus or minus sign with a tag, e.g., +[tag1].
  • Ask a question

How to use ${p:stepName/propName}?

120000EX8H gravatar image
Question by AjayAmrite  (1) | Nov 16, 2016 at 01:19 PM urbancodedoc-linkproperties

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} ?

People who like this

  0
Comment
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

3 answers

  • Sort: 
11000065TV gravatar image

Answer by Tim McMackin (1697) | Nov 18, 2016 at 12:21 PM

I combined my answer and Tiffany's on your StackExchange question here:

http://stackoverflow.com/questions/40654314/what-is-the-syntax-for-setting-a-process-property-in-a-run-groovy-script-step/40683579#40683579

Comment
MustafaAskin

People who like this

  1   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
11000065TV gravatar image

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

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
310001VUM4 gravatar image

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}
Comment

People who like this

  0   Show 1   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
50JHBF8U60 gravatar image dadez (3)   Nov 24, 2017 at 08:31 AM 0
Share

Hi TiffanyLe,

Any trick for output a secure property from groovy step, like a password ?

Follow this question

99 people are following this question.

Answers

Answers & comments

Related questions

How to reference an agent property from component process? 1 Answer

Can I reference a component process property in a precondition? 2 Answers

how do I use component environment properties? 6 Answers

Difference between Compliant and Non-Compliant in UDeploy 2 Answers

How to get property from a list of components? 1 Answer

  • Contact
  • Privacy
  • IBM Developer Terms of use
  • Accessibility
  • Report Abuse
  • Cookie Preferences

Powered by AnswerHub

Authentication check. Please ignore.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • API Connect
  • Analytic Hybrid Cloud Core
  • Application Performance Management
  • Appsecdev
  • BPM
  • Blockchain
  • Business Transaction Intelligence
  • CAPI
  • CAPI SNAP
  • CICS
  • Cloud Analytics
  • Cloud Automation
  • Cloud Object Storage
  • Cloud marketplace
  • Collaboration
  • Content Services (ECM)
  • Continuous Testing
  • Courses
  • Customer Experience Analytics
  • DB2 LUW
  • DataPower
  • Decision Optimization
  • DevOps Services
  • Developers IBM MX
  • Digital Commerce
  • Digital Experience
  • Finance
  • Global Entrepreneur Program
  • Hadoop
  • Hybrid Cloud Core
  • IBM Cloud platform
  • IBM Design
  • IBM Forms Experience Builder
  • IBM Maximo Developer
  • IBM StoredIQ
  • IBM StoredIQ-Cartridges
  • IIDR
  • ITOA
  • InformationServer
  • Integration Bus
  • Internet of Things
  • Kenexa
  • Linux on Power
  • LinuxONE
  • MDM
  • Mainframe
  • Messaging
  • Node.js
  • ODM
  • Open
  • PowerAI
  • PowerVC
  • Predictive Analytics
  • Product Insights
  • PureData for Analytics
  • Push
  • QRadar App Development
  • Run Book Automation
  • Search Insights
  • Security Core
  • Storage
  • Storage Core
  • Streamsdev
  • Supply Chain Business Network
  • Supply Chain Insights
  • Swift
  • UBX Capture
  • Universal Behavior Exchange
  • UrbanCode
  • WASdev
  • WSRR
  • Watson
  • Watson Campaign Automation
  • Watson Content Hub
  • Watson Marketing Insights
  • dW Answers Help
  • dW Premium
  • developerWorks Sandbox
  • developerWorks Team
  • Watson Health
  • More
  • Tags
  • Questions
  • Users
  • Badges