Passing output of a shared flow hosted target to hosted target proxy

haitong
Participant I

Hi,

Could anyone please tell me how i can pass the output of a hosted target shared flow to my hosted target proxy.

My use case is basically I want to call a lambda function from my hosted target shared flow and the output of that is then used in my hosted target proxy.

I am unable to do any tracing on the shared flow so i don't even know if what I am doing works.

I am also a little confused with how hosted target works. i.e. do I always need a server listening to the call and have a req/res format or can I just take an input and out.

Basically I don't really understand the plumbing of hosted targets. If you could enlighten me that would be so very helpful.

Thanks

Solved Solved
0 4 391
1 ACCEPTED SOLUTION

Hey Hai,

The way a Hosted Target works is by Apigee building, deploying, and managing your NodeJS code within a remote server (see this overview). What this means is that the Hosted Target does not have access to the Apigee proxy runtime information (e.g Flow Variables or Cache).

If you want to pass something to your Hosted Target (i.e the actual node code in your Hosted Target) from a shared flow, you have to add that information within the request object that gets passed to the Hosted Target. For your use-case, it would most likely be added in through a request header of some sort.

If you want more information about how Hosted Targets works and how to get around other potential use-cases, our FAQ might be helpful as well.

Thanks!

Kyle

View solution in original post

4 REPLIES 4

Hey Hai,

The way a Hosted Target works is by Apigee building, deploying, and managing your NodeJS code within a remote server (see this overview). What this means is that the Hosted Target does not have access to the Apigee proxy runtime information (e.g Flow Variables or Cache).

If you want to pass something to your Hosted Target (i.e the actual node code in your Hosted Target) from a shared flow, you have to add that information within the request object that gets passed to the Hosted Target. For your use-case, it would most likely be added in through a request header of some sort.

If you want more information about how Hosted Targets works and how to get around other potential use-cases, our FAQ might be helpful as well.

Thanks!

Kyle

Hi Kyle,

Thanks for your answer. I understand how hosted targets work for proxies, I don't know how they work for shareflows. So my context is within shared flows and using hosted targets.

Is this even possible (i am able to upload files into hosted target but I can't get the shareflow to execute the hosted target file). I am unable to find any documentation on this particular subject. Perhaps I am barking up the wrong tree.

My bad, I thought you were asking about passing shared flow information to a Hosted Target.

Unfortunately it is not possible to have a Hosted Target act as a shared flow. Hosted Targets can only be configured as a "Target Endpoint", which is an option only available for proxies and not shared flows.

A couple options might be to:

Thanks kyle,

This is really helpful.