DataPower

 View Only
  • 1.  help with dynamic backends MGPW

    Posted Tue June 14, 2022 03:55 PM
    Hello good day, I need help, in MPG how can I dynamically orchestrate several calls to different backends? That is, having an APi in datapower would need to call a backend and get the response, then in the same flow call another backend and get response and finally call another backend. I was thinking of doing it in StylePolicy using a transformation but I don't know how to make the calls.
    Thank you very much for the help

    ------------------------------
    Alejandro Prada
    ------------------------------


  • 2.  RE: help with dynamic backends MGPW

    Posted Tue June 14, 2022 05:55 PM
    You probably want to create a stylesheet and call all of your dynamic backends using the url-open call. If you call all of your endpoints with url-open you can forego the backend call by skipping the backside call using 'skip-backside' (a service variable)

    ------------------------------
    Charlie Sumner
    ------------------------------



  • 3.  RE: help with dynamic backends MGPW

    IBM Champion
    Posted Wed June 15, 2022 09:18 AM
    Alejandro,

    You can do this using Results actions.  That is, a Results action is not *just* for the end of a processing rule.  It can be used anywhere to make such back end calls.  You simply provide the proper input context, supply the URL and hand off the output context to the next results action (I know I'm likely simplifying things a bit).     

    You more than likely also need to customize your XML manager and User Agent, but at the end of the day, the amount of code you write will be significantly reduced if not eliminated altogether.

    Joseph Morgan

    ------------------------------
    Joseph Morgan
    ------------------------------



  • 4.  RE: help with dynamic backends MGPW

    Posted Thu July 07, 2022 10:59 AM

    Hi Alejandro,

    Another commonly used approach is using a stylesheet within your request rule that will set var://service/routing-url (and var://service/routing-url-sslprofile if the backend has any unique SSL requirements).  At the end of the request rule, whatever is in the OUTPUT context will be sent to that url and the response will be in the INPUT context of the MPGW policy's response rule processing.

    Regards,
    Steve



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM
    ------------------------------