From your explanation, this is what I understand
error
variable, and to put the flow into fault staterequest
variableone thing I am not clear on. You wrote
But currently for my RF I can see the request being populated correctly, ...
Let's just clarify: RaiseFault does not populate the request
variable. It populates the error
variable. It does not modify or affect the request
variable. You can see err.status.code
in the Apigee trace. That is a part of the error message.
After that clarification, I have one doubt. You say:
it captures the request that I want the source to get later for extracting some values.
So are you intending to use ExtractVariables on the message that gets populated by RaiseFault? In that case I believe you need to use <Source>error</Source>
in your EV policy. You have <Source>request</Source>
, which will hold the request as it was received from the client.
One more thing. You may already know this but it bears repeating: ensure that your content-type is correct. If you insert into the Payload of a message, some text that looks like XML, but you do not set the content-type header, then ExtractVariables may do nothing. If you are using XMLPayload within ExtractVariables, the first thing the policy execution does is look for the content-type header. If it is not an XML content type (like application/xml or text/xml) then ExtractVariables will do nothing further.