sp1nakr
sp1nakr

Reputation: 388

Is there a preferred way to list sagadata in a web application?

I have a saga containing a timeout that will trigger a business process in the future. This saga can be ended early either based on a "cancelled"-event from a core system or manually by a customer handler. The customer handler needs to be able to query the planned processes on some key values and manually cancel the timeout (e.g. end the saga).

The system will consist of the described saga and a web application with search functionality which will list planned processes and the possibility to issue "cancel"-commands to the sagas.

The question is then how to list the planned business transactions (this information is stored as saga data)? The most naive solution would be to access the saga data directly, which probably isn't a good idea since this is internal data to the saga and the storage can be changed etc.

Upvotes: 2

Views: 58

Answers (1)

sp1nakr
sp1nakr

Reputation: 388

A solution is to have the saga publish internal events on each actions affecting the state of the saga. These events can then be used to update a view model which the web application can read from. This will keep the data needed in the saga segregated from the data needed in the web application. The view model will only need to share some kind of correlation id with the saga.

Upvotes: 2

Related Questions