KVM to variable population issue

I observed that when the Key Value Map policy is added, The variables set are passing only to the next policy in the flow. After that, the set variables from KVM are not getting passed to the other policies in the flow. Is that correct observation? If yes, then why it behaves like that, as I would want variable to retain the data?

Solved Solved
0 4 366
1 ACCEPTED SOLUTION

HI @Sunandita Dam

See if you are setting any scope in the KVM policy. Refer this

If its still failing, can you share the proxy with the screenshot of your KVM entries ? If it has sensitive info, please mask the values of entries and share the screenshot or entries.

View solution in original post

4 REPLIES 4

HI @Sunandita Dam

See if you are setting any scope in the KVM policy. Refer this

If its still failing, can you share the proxy with the screenshot of your KVM entries ? If it has sensitive info, please mask the values of entries and share the screenshot or entries.

@Sai Saran Vaidyanathan


We have set scope as 'Environment' and scope is more to define from where KVM will be accessible. In our case KVM is accessible and data is getting stored to variable but after next policy data is getting lost. This is how KVM works??

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<KeyValueMapOperations name="KeyValueMapOperations.ErrorHandling" enabled="true" continueOnError="false" async="false" mapIdentifier="XXX">
    <DisplayName>KeyValueMapOperations.ErrorHandling</DisplayName>
    <Properties/>
    <ExclusiveCache>false</ExclusiveCache>
    <ExpiryTimeInSecs>300</ExpiryTimeInSecs>
    <Get assignTo="Error400" index="1">
        <Key>
            <Parameter>XXX</Parameter>
        </Key>
    </Get>
    <Scope>environment</Scope>
</KeyValueMapOperations> 

HI @Sunandita Dam

I tried the same policy in my test bundle and it worked. I have attached the bundle for your reference. I would also let you know that the ExclusiveCache is deprecated and the default for ExpiryTimeInSecs is 300. You can remove them. However, the above worked for me. I have the KVM get policy in my Preflow and then followed by some other policies. Finally I am printing the variable in the Response flow. Please take a look. If its still not working, please send me your policy. I can share my email id to you and we can work to debug further.

testkvm-rev2-2016-08-29.zip

Thanks @Sai Saran Vaidyanathan ! Yes, we tried and it worked..I guess we did something wrong.