0

I am a beginner on service bus and trying to understand the concept of Saga and Statemachines using Masstransit and Automatonymous.

The situation I have is, a saga to calculate food consumption in a county.

The saga will be triggered for a geographical state. The first task is to get a list of all counties using an API call.

Then, for each county publish/send an event for food consumption. Once the food consumption calculator finishes, it will raise an event.

The original saga will wait for all of these completion events and when it receives all of them, will collate the responses and create a final statistical report.

I was able to find the ability to collate the responses using this thread Handling transition to state for multiple events

However, I am unable to find a way of invoking the geographical-states lookup api and fire individual events from within the state machine.

Ceemah Four
  • 458
  • 4
  • 11
  • I also found this example of the scatter-gather pattern https://stackoverflow.com/questions/33579533/how-to-implement-a-saga-using-a-scatter-gather-pattern-in-masstransit-3-0 – Ceemah Four Jan 28 '18 at 04:53
  • I'm having trouble understanding exactly what problem you have... from what you have written it sounds like your problem is making an api call? – robs Jan 28 '18 at 17:26
  • @robs - thanks for answering. I did find a solution to this. You're right, I was having trouble invoking the API call from within. Which was real dumb on my part. – Ceemah Four Jan 28 '18 at 22:12

0 Answers0