Solved
Forum Discussion
francisbrochu
9 years agoOccasional Contributor
context.setProperty('idEna','2334')
log.info context.getProperty('idEna')
log.info ${idEna}My first log.info works, but not the second one :
groovy.lang.MissingMethodException: No signature of method: Script5.$() is applicable for argument types: (Script5$_run_closure1) values: [Script5$_run_closure1@4e3c1551] Possible solutions: is(java.lang.Object), run(), run(), any(), use([Ljava.lang.Object;), any(groovy.lang.Closure) error at line: 4
rupert_anderson
9 years agoValued Contributor
Ok, so thats slightly different to the way I took your first question.
To get a context property from Groovy code do:
log.info context["idEna"] or log.info context.idEna
to access a property using a property expansion e.g. to insert into a request, do:
${idEna}
Is that what you wanted?
Regards,
Rup