Is there a way to access variables define in shared flow in the policy the shared flow is used

fatemaali
Participant I

I am not able to use a variable defined through KeyValueMapOperations in my shared flow in the policy where the shared flow is called. please can you suggest how this can be done

Solved Solved
0 3 754
1 ACCEPTED SOLUTION

sidd-harth
Participant V

When you use FlowCallout in a proxy it is going to execute all policies in SharedFlow and each policy emits flow variables which can be used in the proxy calling the shared flow.

I am not sure why you are not able to use them. Provide the working proxy bundle or list out the XML here for examination.

In the below image, I called a shared flow which has KVM Get operation. in Trace, you can see that the myvar variable is available.

8616-kvm-sharedflow.jpg

View solution in original post

3 REPLIES 3

sidd-harth
Participant V

When you use FlowCallout in a proxy it is going to execute all policies in SharedFlow and each policy emits flow variables which can be used in the proxy calling the shared flow.

I am not sure why you are not able to use them. Provide the working proxy bundle or list out the XML here for examination.

In the below image, I called a shared flow which has KVM Get operation. in Trace, you can see that the myvar variable is available.

8616-kvm-sharedflow.jpg

Here is the snippet from the shared flow

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="RetrieveID" mapIdentifier={KVM name}> <DisplayName>RetrievID</DisplayName> <Properties/> <ExclusiveCache>false</ExclusiveCache> <ExpiryTimeInSecs>300</ExpiryTimeInSecs> <Get assignTo="credentials.id"> <Key> <Parameter ref="InitKvm.credentials.org.key"/> </Key> </Get> <Scope>environment</Scope> </KeyValueMapOperations>

Sorry my fault i was able to resolve the issue thanks for your help