Request /Response flow variable

I have a shared flow with two policies .Example Policy1,Policy2. I would like to apply a condition to run policy 1 in request flow and policy 2 in response flow. My shared flow will be attached in both request and response flows.

How can i achieve this. I do not see any apigee predefined flow variable to differentiate the request and response.

0 5 646
5 REPLIES 5

HI @Mohammad Ateeb Shaik - The concept of Shared flow is to have policies that are commonly used and executed at runtime. Would not be a good idea to split it like that. You can either break them down into two different Shared flows and use them appropriately

Hi Saran,

Thanks for the quick reply.I agree with you however i am looking to reduce the no of shared flows i can maintain and was looking if we can achieve the above by applying logical condition before executing the policy .

Agree but there isn't a particular variable in this case.

@Mohammad Ateeb Shaik, Have you explored the timestamp flow variables like client.received.start.timestamp & client.sent.start.timestamp which gets populated in Proxy request & response flows respectively? Similarly there are other timestamp variables which you can leverage in Target request & response flows as well. Pls refer the variable reference for more details.

Not applicable

HI @Mohammad Ateeb Shaik


You can achieve this by following condition;

Same shared flow for two policies


For Request Flow;

<Condition>response == null</Condition>

For Response Flow;

<Condition>response != null</Condition>