piotrmurach / finite_machine

A minimal finite state machine with a straightforward syntax.
https://piotrmurach.github.io/finite_machine/
MIT License
808 stars 38 forks source link

Introduce names for FiniteMachine instances #73

Open raw-bin opened 3 years ago

raw-bin commented 3 years ago

Describe the change

This PR introduces the ability to specify an optional name for new FiniteMachine instances.

Why are we doing this?

Currently transition logs don't specify the FiniteMachine for which event transitions happen. This makes it hard to understand or post process the logs.

Benefits

It will now be possible to disambiguate event transitions that occur in the context of different FiniteMachine instances.

Drawbacks

None.

Requirements