Forum Discussion
ThomasAu
15 years agoContributor
deepesh.jain wrote: Hi Tom,
Well return would work only if you put the code in a groovy function and then make a call to a function. What you can do is, put a groovy script step after your soap step and then a properties step after groovy. You can use groovy script inside if to populate the property of your choice with guid.
Regards,
Deepesh Jain
That's what I have set up.
1. Soap step. Get list of items.
2. Groovy script (the one you gave me). Find the GUID of interest.
3. Property Transfer. Take result of Groovy script and transfer to Properties file: GUID -> guid variable.
4. Soap step. Get information of the item with GUID I grabbed from step 2. Have path as "endpoint/path/{guid}". Set value "guid" as "${Properties_file#guid}"
My issue is that I don't know how to get the GUID of interest in step 2, into the properties file. I don't know how to "grab" the GUID using that groovy script. You said I can't return(guid1) there, so what do I do?
I see in the Property Transfer step that I can grab the "result" from "groovy script" and transfer it into the target (Property file, guid variable). I don't know how to grab "guid1" from your code and make it the "result" of the script.