lutzer / node-red-contrib-finite-statemachine

A finite state machine implementation for node red.
MIT License
16 stars 5 forks source link

Cannot edit the fsm definition - on latest versions #26

Closed dalethomas81 closed 2 years ago

dalethomas81 commented 2 years ago

I am running the latest version of node-red-contrib-finite-statemachine (2.1.2) as well as the latest version of node-red (2.1.4) and I am unable to edit the FSM definition.

When the definition is edited, the new definition will remain in the text box and the visualization of the FSM will render. However, after clicking done node-red does not register any changes and when the editing menu is reopened the definition is the reverted to the previous one (which is the default FSM definition)

I have never used this library before so I'm not sure if this is normal behavior. As a work around, I am editing my flow.json directly and that works just fine. It seems to just be a problem in the HTML scripting.

dalethomas81 commented 2 years ago

One other note is that I did find a misspelling in the HTML script here. I corrected it and restarted node-red but that did not seem to have any effect.

    typeField: $("#ode-input-fsm-definition")

https://github.com/lutzer/node-red-contrib-finite-statemachine/blob/7d6d269882843ea98f58cdac286d2f1c11935992/src/finite-state-machine-node.html#L120

lutzer commented 2 years ago

thank you. that is a major bug. It should be fixed now with version 2.1.3. Please let me know if it works for you.

dalethomas81 commented 2 years ago

That did it - thank you so much! I wish I could have contributed more to that so thank you for the work. This is a really nice piece of software. I really like the visual representation of the state machine.