Vai al contenuto

Flow Manager

The Flow Manager is a saga orchestrator, capable to manage flows structured by using the Architectural pattern named Saga Pattern and, in particular, the Command/Orchestration approach.

Introduction

The Flow Manager receives a Finite State Machine through a configuration file and is capable to orchestrate the saga flow based on the received machine.

To handle the flow it needs other "actors", or, services that listen the Flow Manager commands and reply with events (later will be explained the commands/events approach) through a common channel, usually a Message Broker.

Let's explain with an example of a well-known flow, the Ecommerce one.

The following schema contains a simple Ecommerce finite state machine (for simplicity, error flows are omitted):

alt_image

The Flow Manager, with this Finite State Machine, can orchestrate the saga flow through the states above, working like in the following image (the Flow Manager is the Order Saga Orchestrator):

alt_image

As you can see in the flow above, every step is managed by the Flow Manager, named Order Saga Orchestrator in the example above, so the flow could be the following:

  • the user creates the order
  • the Order Service forwards a creation request to the Flow Manager
  • the Flow Manager sends the executePayment command to the Message Broker
  • the Payment Service, unknown to the Flow Manager, handles the command and replies with a paymentExecuted event
  • and so on...

As in the example above, the Flow Manager is the core of the Saga, contains all the business logic and orchestrates the flow.

More of the information above are about the Saga Pattern, Command/Orchestration approach, go ahead into the documentation to know the details about the Flow Manager.

Further details

Follow the pages below for more about the Flow Manager:]