Flow Callout policy
Use the Flow Callout policy to call out to a shared flow from either an API proxy or another shared flow.
In a shared flow, you create a sequence of steps that you can reuse at run time from multiple places. These steps are implemented as policies, as with an API proxy. The Flow Callout policy gives you a way to call to the shared flow from API proxies and other shared flows.
- For example, imagine that you've implemented a shared flow with security features such as API key verification and OAuth token validation. Using the Flow Callout policies, you can route requests through that flow from multiple API proxies. In this way, you can enforce standard security in one place, then use it from multiple others.
- You can call one shared flow from another by implementing a Flow Callout policy in a shared flow. For example, the security shared flow could use a Flow Callout policy to call to another shared flow that performs a transformation on the incoming request message.
This policy can be attached in the following locations.
This example creates a callout to a local API proxy (that is, one in the same organization and environment) called
data-manager, specifying its proxy endpoint whose name is
<LocalTargetConnection> <APIProxy>data-manager</APIProxy> <ProxyEndpoint>default</ProxyEndpoint> </LocalTargetConnection>
About the Flow Callout policy
There are many scenarios where you can use a Service Callout policy in your API proxy. For example, you can configure an API proxy to make calls to an external service to deliver geolocation data, customer reviews, items from a partner’s retail catalog, and so on.
Following are elements and attributes you can configure on this policy:
<FlowCallout async="false" continueOnError="false" enabled="true" name="Flow-Callout-1"> <DisplayName>Custom label used in UI</DisplayName> <SharedFlowBundle>thereferencedsharedflowbundle</SharedFlowBundle> </FlowCallout>
<ServiceCallout async="false" continueOnError="false" enabled="true" name="Service-Callout-1">
The following attributes are common to all policy parent elements.
The internal name of the policy. Characters you can use in the name are restricted to:
Optionally, use the
This attribute is deprecated.
Use in addition to the
name attribute to label the policy in the management UI proxy editor with a different, natural-language name.
<DisplayName>Policy Display Name</DisplayName>
If you omit this element, the value of the policy's
Specifies the name of the shared flow to call. This element's value should be the same as the value of the target SharedFlowBundle element's name attribute.
In the simplest example, you give the name of the shared flow being called as a value for this element. That is, this element's value must be the same as the shared flow's
name attribute value.
See our Github repository samples for the most recent schemas.
Flow variables enable dynamic behavior of policies and flows at runtime, based on HTTP headers, message content, or flow context. For more information about Flow variables, see Variables reference.
Scope: During the shared flow execution
The value of the shared flow's name attribute.
Scope: During execution of the shared flow attached to the flow hook.
The name of the flow hook.
For working samples of API proxies, see the Samples reference.
Help or comments?
- If something's not working: Ask the Apigee Community or see Apigee Support.
- If something's wrong with the docs: Send Docs Feedback
(Incorrect? Unclear? Broken link? Typo?)