A statesmanlike state machine library.
05-Dec-2019 659
Statesman is an opinionated state machine library designed to provide a robust audit trail and data integrity. It decouples the state machine logic from the underlying model and allows for easy composition with one or more model classes.As such, the design of statesman is a little different from other state machine libraries:State behaviour is defined in a separate, "state machine" class, rather than added directly onto a model. State machines are then instantiated with the model to which they should apply.State transitions are also modelled as a class, which can optionally be persisted to the database for a full audit history. This audit history can include JSON metadata set during a transition.Database indices are used to offer database-level transaction duplication protection.
A statesmanlike state machine library. #ruby #rubydeveloper #rubyonrails #statesmanlike #state #machine #library. #library. #machine https://rubyonrails.ba/link/a-statesmanlike-state-machine-library