Persistent values needs to be converted

source sends a project id and need to convert the same to an application id to accept destination. Where will I store this project id -> application id mapping. I have almost 200 project id and application id mapping for one proxy. Is it ok to use KVM for the same?? or is there any alternate solution??

0 1 81
1 REPLY 1

KVM seems like a good place to store the mapping. You could use 200 keys, or ... you could use a single "mapitem" key, which retrieves a JSON string, which looks like this:

{ 
  "projectid1" : "applicationid1",
  "projectid2" : "applicationid2",  
   ...

And then use a JS step to just "do" the lookup and get the application id.

If you don't want to manage the KVM you could just "hard code" those mappings into the source of the JavaScript module that is doing the conversion.

Or, instead of the JS step, you could use a jsonpath assignment in AssignVariable.