{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
0
Question by Merin Mary Jose · Oct 08, 2018 at 09:20 AM · 400 Views proxyshared flowsautomation

How to automate addition of mandatory shared flow into the proxy bundle

Hi Team,

Please let us know if there's a way to automate by adding mandatory shared flow into the proxy bundle to deploy into APIGEE Edge. This is to save time and effort and also an effort to enable the beginners to build their Pass through proxies without much understanding on each and every policies and leverage the existing shared flows for ease.

Thanks,

Merin

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

1 Answer

  • Sort: 
avatar image
0

Answer by Dino-at-Google   · Oct 08, 2018 at 04:24 PM

There are several related concepts:

  • Shared Flow - a reusable sequence of policies. Think of this as a unit of re-usability for a series of steps. Like a function or subroutine in a 4th generation programming language. A good example is a check-and-fill of a cache. Eg: Load an item from cache; if the cache is empty, then load the item from the external resource and then store it in the cache. This series of steps might take 3 or 4 policies, but it can be considered as one "Step" and would be a good candidate for encapsulation into a shared flow.
  • Flow callout - a policy that allows an API proxy to explicitly call out to a shared flow - to invoke the sequence of its policies in order. BTW, a Shared Flow can include a Flow callout policy - one shared flow can call another.
  • Flow Hook - a mechanism to enforce IMPLICIT calls to shared flows at specific points during policy execution. FlowHooks are configured per environment.

All of these things are documented.

You are asking about "mandatory shared flow".

There are various ways that I can think of to enforce a "mandatory" shared flow, for varying degress of "enforcement".

  1. build your shared flow. configure a FlowHook at the desired point to invoke that shared flow. Now, every proxy deployed to the environment will execute that shared flow.
  2. Require your deployments to go through an automated CI/CD build process, and within that process, inject a FlowCallout policy into the API proxy at the desired point.
  3. Use an "code generation" or template mechanism (like mvn archetype generate), in which users start with a template of an API Proxy. In the template, insert the call to the desired shared flow. This is obviously something that a user could subvert or change, so it's not really "enforcement". More like "encouragement".
Comment
Add comment Show 9 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Merin Mary Jose · Oct 10, 2018 at 08:23 AM 0
Link

Hi Dino,

Thanks for the info. I m adding little more details to the requirement.

Some shared flows needs to be included in all the proxies both in request and response flows developed in the project. Suppose I have two shared flows namely InitialChecks and LoggingChecks to be included in the Proxy Preflow and Target PostFlow respectively. Now when I develop the proxybundle from openapi2apigee node.js module which creates proxy bundle from swagger file. Is there a way to by default add these shared flow in all the proxy bundles to be created? This will save time in adding all the basic shared flow without actually adding them from the UI.

Regards,

Merin

avatar image Aishwarya Kozhisherry Merin Mary Jose · Mar 26, 2019 at 12:27 PM 0
Link

@Merin Mary Jose Hello, Did you figure out this requirement? Please let me know if you did, am now trying to achieve the same thing myself.

avatar image Dino-at-Google ♦♦ Aishwarya Kozhisherry   · Mar 26, 2019 at 03:04 PM 0
Link

Have you looked at Flowhooks? What do you think of that feature?

Show more comments
avatar image Dino-at-Google ♦♦ Merin Mary Jose   · Mar 26, 2019 at 03:04 PM 0
Link

I think FlowHooks do that! They do what you want. You must have looked at FlowHooks. Does that feature not satisfy your requirement?

avatar image Mohsin Khan Dino-at-Google ♦♦ · Mar 26, 2019 at 04:36 PM 0
Link

@Dino-at-Google you are right using FlowHook this requirement can be done,

@Merin Mary Jose can make the commonly used share flow, and then add that shared flow in Pre-proxy Flow Hook and Post-proxy Flow Hook.

The shared policy will get executed in both the request and response flow, I think which is the requirement.

Show more comments

Follow this Question

Answers Answers and Comments

74 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Is it possible to add Conditional Flow under Shared Flow in Apigee ? If it is then how ? 1 Answer

POST request to Shared Flow endpoint is creating new Proxies 0 Answers

Fetch WSDL Error: Could not download resource. peer not authenticated. 6 Answers

Mock Responses with no-target proxy 0 Answers

When is it appropriate to use Java Callout? Docs offer conflicting advice. 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges