Modifying Global variables in Xtend Script [message #506619] |
Fri, 08 January 2010 06:32 |
kiran reddy Messages: 8 Registered: July 2009 |
Junior Member |
|
|
When we set an global variable initially can we modify it again?
In the below example, i need to modify the value of GLOBALVAR NAME from "Test" to "Testing"
eg:
1) creating an Global variable Map
Map<String, Variable> globalVariablesMap=new HashMap<String, Variable>();
2)Adding an new entry to the map
globalVariablesMap.put("NAME", new Variable("NAME","Test"));
3) Adding the global map to execution context so that it is accessible in xtend script
ExecutionContext executionContext = new ExecutionContextImpl(globalVariablesMap);
4) In extend script the map is accessed as:
String getGlobalVariable():
((String) GLOBALVAR NAME)
;
so is there any way that i can modify the value of NAME to "Testing" in a particual extend method so that it is updated value of the corresponding GLOBALVAR NAME.
|
|
|
Powered by
FUDForum. Page generated in 0.02482 seconds