title: Apigee - key value map - trouble using a variable key
body: <p>This is pretty basic but I am struggling trying to build/retrieve values from a keyvaluemap.  For example given variables X and Y where X=123abc,Y=foo on the first execution and X=456def, Y=bar on the second execution, I would expect to have a key value map where [123abc] -> [foo] and [456def] -> [bar].</p>
  
  <p>However, when I attempt to retrieve the value in variable Z, using either value of X, I always get the last value added: Z=bar.  If I delete key X=456def, retrieving key X=123abc returns an error that the key does not exist.</p>
  
  <p>My guess is that only one value is being built into the map, and it is getting put in as "" as if the variable is not set.  The override value "true" is replacing it with the last added value.  I am sure the variable has a value as it is displayed correctly in the prior policy execution in the trace.</p>
  
  <p>Is there something in the syntax?  Any ideas?</p>
  
  <p>I am using the policy below to build the key</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;KeyValueMapOperations mapIdentifier="map1" enabled="true" continueOnError="false" async="false" name="buildmap1"&gt;
      &lt;DisplayName&gt;build map1&lt;/DisplayName&gt;
      &lt;FaultRules/&gt;
      &lt;Properties/&gt;
      &lt;ExclusiveCache&gt;false&lt;/ExclusiveCache&gt;
      &lt;ExpiryTimeInSecs&gt;-1&lt;/ExpiryTimeInSecs&gt;
      &lt;InitialEntries/&gt;
      &lt;Put override="true"&gt;
          &lt;Key&gt;
              &lt;Parameter&gt;ref="X"&lt;/Parameter&gt;
          &lt;/Key&gt;
          &lt;Value ref="Y"&gt;&lt;/Value&gt;
      &lt;/Put&gt;
      &lt;Scope&gt;organization&lt;/Scope&gt;
  &lt;/KeyValueMapOperations&gt;
  </code></pre>
  
  <p>I am using the following to retrieve the key</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;KeyValueMapOperations mapIdentifier="map1" enabled="true" continueOnError="false" async="false" name="getmap1"&gt;
      &lt;DisplayName&gt;get map1&lt;/DisplayName&gt;
      &lt;FaultRules/&gt;
      &lt;Properties/&gt;
      &lt;ExclusiveCache&gt;false&lt;/ExclusiveCache&gt;
      &lt;ExpiryTimeInSecs&gt;-1&lt;/ExpiryTimeInSecs&gt;
      &lt;InitialEntries/&gt;
      &lt;Get assignTo="Z"&gt;
          &lt;Key&gt;
              &lt;Parameter&gt;ref="X"&lt;/Parameter&gt;
          &lt;/Key&gt;
      &lt;/Get&gt;
      &lt;Scope&gt;organization&lt;/Scope&gt;
  &lt;/KeyValueMapOperations&gt;
  </code></pre>