For the complete documentation index, see llms.txt. This page is also available as Markdown.

Obsolete timeline changes

How to handle obsolete timeline Changes - either ignoring them or upgrading them to a newer version

We have two kinds of obsolete Changes:

  1. The Change can be ignored (we either don't use it at all or we push new changes that replace the old one)

  2. The Change should be upgraded to a newer version

The Change can be ignored

  1. Delete the obsolete C# Change class and the related C# code

  2. Create the list of obsolete changes

  3. Register this list in the Projector's class constructor:

    Obsolete timeline 01
  4. Add a new Handle method for SerializedChange to the Projector class:

    Obsolete timeline 02
  5. Add a new When method to the State class, it will intercept all obsolete changes:

    Obsolete timeline 03

The Change should be upgraded to a new version

Lets assume we have the change AttemptStarted1 and it needs to be marked as obsolete because we introduced a new change AttemptStarted2

  1. Make AttemptStarted1 as a private nested class of AttemptStarted2 and implement a new Upgrade method that will convert AttemptStarted1 to AttemptStarted2:

    Obsolete timeline 04
  2. Delete all functionality related to AttemptStarted1

  3. In the AttemptChangeProjector register AttemptStarted1 as an obsolete change:

    Obsolete timeline 05
  4. Add a new Handle method in the Projector class that will upgrade AttemptStarted1 to AttemptStarted2 and call Handle for AttemptStarted2:

    Obsolete timeline 06
  5. Add a new When method to AttemptState that will upgrade AttemptStarted1 to AttemptStarted2 and call When for AttemptStarted2:

    Obsolete timeline 07

Last updated

Was this helpful?