I'm putting together some ideas and personal conventions on how to configure state machines when using a language specific library.
Because I'm adding state machines to existing model classes in my project, some of the states I wish to leverage are distributed across their relations. State is not contained in a singular field, but is instead informed by other things going on in the system that I must retrieve.
Is it normal/allowed for a state machine implementation to source data from related model data? Or is it a hard requirement of a state machine implementation that the domain object having its state tracked must provide a single field for the state structure to serialize into?
(This is instead of interpreting the state machine's output and translating it into model operations like inserts, updates and/or deletes.)