Saga refactoring


When doing a Saga refactoring, you can have situations where you change the data members of this saga (extra fields), or listen to other events, … .
This might have effect on the open Saga.

If you change the data structure, this will give problems to deserialize the saga from database.
Changing the event listeners, can give unwanted behaviour for the open sagas.

What solutions do you suggest to overcome these issues?

Create a new type of saga? and remove the start annotation for the current Saga?
Other options?

Kind regards,

Hi Koen,

if you change the process, it is indeed a viable option to create a new saga and remove the start annotation of the existing one.
If you just change the (serializable) structure of the Saga, then you could use the upcaster mechanism to change the serialized state.

Hope this helps.