I am trying to extract variable from the request and assign the extracted variable to the response. But in assign message the variable extracted is not accessible. Please help. Here’s the relevant code.
I am trying to extract data from the request by using Extract message policy and then want to return one of the extracted variables into the response. Hence extract is in the PREFLOW and Assign Policy is in the Post Flow.
What do you mean extracted variable is not accessible? Can you post your Assign message policy? Ideally, you need to use Extract variable policy to extract variable & use assign message policy to add same to response.
I am trying to extract data from the request by using Extract message policy and then want to return one of the extracted variables into the response. Hence extract is in the PREFLOW and Assign Policy is in the Post Flow.
As you can see, I did not use PreFlow or PostFlow. I used a conditional flow. Be aware that Preflow does not refer only to the Request, and Postflow does not apply only to the response. Pre and Post indicate that the policies in those sections run before or after any conditional flow. In other words, it is possible to have a policy configured on the postflow for the request, or as a preflow on the response. If this is not clear to you, see the documentation.
Thanks for you response, it provided me with a great insight in understanding of the Pre, Post and conditional flow.
I did try the solution you have provided. While trying with the Request XML I still can not see the extraction happening rather the below response is returned:
which suggest that either the variables were not extracted or they were not referred in the assign message policy. I need your help in resolving this issue.