Can someone share a POC which uses variables: proxy.flow.name and target.flow.name?

variable-reference.zip

I have created a POC for my learning and they are set as NULL for these variable.

Solved Solved
2 3 400
1 ACCEPTED SOLUTION

@AshwiniRai ,

Great Question, Welcome to Apigee community & Thank you for highlighting same.

Regarding , proxy.flow.name it says,

Scope: Proxy request

Type: String

Permission: Read


The name of the most recently executed ProxyEndpoint flow (such as "PreFlow", "PostFlow", or the name of a conditional flow).

But, It's not working as documented in Apigee Docs. Seems like it's a bug with product. I have tried proxy.flow.name, proxy.flow.description , target.flow.name, target.flow.description variables & proxy , target request pipes. None of them are working.

Other flow variables like current.flow.name & current.flow.description working as expected. Check attached proxy bundle & use trace transaction log to see results. Seems like it's a bug in the product. Let me follow with engineering team & keep you updated on same.

2237-screen-shot-2016-03-24-at-102935-pm.png

sampleflownames-rev2-2016-03-24.zip

View solution in original post

3 REPLIES 3

Hi @AshwiniRai welcome to Apigee Community! If you have not already, I recommend reviewing the Introduction to Flow Variables. Towards the bottom of that page there are some links to various code samples that could help, the below is copied from that link:

  • variables - Demonstrates how to extract and set variables based on transport and JSON and XML message content.
  • policy-mashup-cookbook - A complete application that uses policy composition to call two public APIs, combines results, and generates an enriched response for the client app. For more information on this sample, see Using policy composition.
  • conditional-policy - Implements simple conditional policy enforcement based on variable values.

And has the following tip:

You'll find a number of other samples that use variables in one way or another. Look for ones that use the policy ExtractVariables, which is commonly used to process variables in a proxy flow.

Last of all, here's a link to our Variables reference. Here you can find all of the variables that are available out of the box.

Here the documentation mentions:

It's important to note that if you try to access a flow variable that is out of scope, you will receive a NULL value. If you try to set a flow variable before it is in scope, the proxy does nothing; it does not generate an error and does not set the variable.

For more information, see "Flow variable scope".

If this has helped answer your question, please click the accept link. Alternatively let us know how we can improve this answer.

@AshwiniRai ,

Great Question, Welcome to Apigee community & Thank you for highlighting same.

Regarding , proxy.flow.name it says,

Scope: Proxy request

Type: String

Permission: Read


The name of the most recently executed ProxyEndpoint flow (such as "PreFlow", "PostFlow", or the name of a conditional flow).

But, It's not working as documented in Apigee Docs. Seems like it's a bug with product. I have tried proxy.flow.name, proxy.flow.description , target.flow.name, target.flow.description variables & proxy , target request pipes. None of them are working.

Other flow variables like current.flow.name & current.flow.description working as expected. Check attached proxy bundle & use trace transaction log to see results. Seems like it's a bug in the product. Let me follow with engineering team & keep you updated on same.

2237-screen-shot-2016-03-24-at-102935-pm.png

sampleflownames-rev2-2016-03-24.zip

I think you answered my question. Thanks alot.