I have Global Key Value Map in my proxy as follows:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="GlobalKeyValue">
<DisplayName>GlobalKeyValue</DisplayName>
<ExpiryTimeInSecs>-1</ExpiryTimeInSecs>
<InitialEntries>
<Entry>
<Key>
<Parameter>Key</Parameter>
</Key>
<Value>ba91d757742d31ee8c5617de528b9dcaa639e459d971ad3ff08145ccb09b15a3b7249afb72508372d28ae0921ede44d787f7a8fce31c6758f4a9007ad9015ce2</Value>
</Entry>
<Entry>
<Key>
<Parameter>Counter</Parameter>
</Key>
<Value>7589027556679898853</Value>
</Entry>
</InitialEntries>
<Get assignTo="Key">
<Key>
<Parameter>Key</Parameter>
</Key>
</Get>
<Get assignTo="Counter">
<Key>
<Parameter>Counter</Parameter>
</Key>
</Get>
<Scope>environment</Scope>
</KeyValueMapOperations>
I would want to set the variable ‘Counter’ in a Javascript. I executed the following but in vain.
context.setVariable("Counter", parseFloat(context.getVariable("Counter")) + 1);
Altough there is no error in the code, the variable is not getting updated either. Am I missing something over here?