Skip to content

Aggregator: How can get parameter from first service and then use a data from response of the service as a parameter to next service? #1931

Answered by raman-m
RameshkumarJay asked this question in Q&A
Discussion options

You must be logged in to vote

Impossible now!
You have described a kind of sequential process which can be started by first request.
This workflow should be defined somewhere.
So, Ocelot route syntax doesn't allow to link steps to define a workflow.
But in theory, everything is possible.
For now, you can define a route of first step.
Then, we have to define other steps, right?
I guess, the most appropriate place is custom Delegating Handler.
In the handler define the rest of your workflow steps, and link them.
As a result, return last step response from the handler back to upstream.

FYI

Aggregator feature is not suitable place to define workflow steps, because the function of aggregator is combining all responses as o…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by raman-m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1449 on January 19, 2024 21:38.