agupta1
16 years agoContributor
Proeprty expansion context.expand
I have the following in a groovy script:
def email = "jilldoe-Taj@testcorp.yal.avaya.com"
def guid = context.expand( '${GetVoiceItems#Response#//ns1:getVoiceItemsResponse[1]/ns1:getVoiceItemsResult[1]/ns1:SRVoiceItem[//ns1:Email=${email}]//ns1:Identifier}' )
log.info("guid = " + guid);
Please note the [//ns1:Email=${email}]. However this does not set the guid. Instead if I copied the literal ("jilldoe-Taj@testcorp.yal.avaya.com") I get the guid.
What am I doing wrong?
Thanks
Anshu
def email = "jilldoe-Taj@testcorp.yal.avaya.com"
def guid = context.expand( '${GetVoiceItems#Response#//ns1:getVoiceItemsResponse[1]/ns1:getVoiceItemsResult[1]/ns1:SRVoiceItem[//ns1:Email=${email}]//ns1:Identifier}' )
log.info("guid = " + guid);
Please note the [//ns1:Email=${email}]. However this does not set the guid. Instead if I copied the literal ("jilldoe-Taj@testcorp.yal.avaya.com") I get the guid.
What am I doing wrong?
Thanks
Anshu