The initialState is the starting state of a Fish, before it receives its first event.
The object you pass as initialState will never be modified by the Pond. It will be cloned whenever
needed. To observe the current state, always use Pond.observe().
Creating the Initial State when some Data is Mandatory#
Coming up with an initial state can be tricky.
Often you model entities that have a lot of mandatory information to them. In a traditional database, you
would mark the corresponding column as NOT NULL. In an event-based system like ActyxOS, you will
translate this into a "Creation Event" with a type that contains a field for each piece of mandatory
// Unique identifier for the process
// non-nullable fields to be filled for every created process
initialState:// Tough! Where to get name, description etc. from?
There is no reason why the Fish of an unknown process should be created: The starting point is a
unique identifier that becomes known only from the ProcessCreated event. Still, filling the
mandatory fields in the initial state is a problem.