Closed insonifi closed 9 years ago
@insonifi This is definitely something I've been planning to add. Would it work for your needs if it was an additional property, something like compositeState
or fullState
? That's the direction I've been leaning in lately, mainly because it would be a breaking change otherwise, and also because I still need to be able to track each FSM's state
individually.
Absolutely. At the moment I have no preference, since I just started to implement it in my code. And I don't have any intention on breaking stuff.
To my ear compositeState
is more sound.
@insonifi Sounds good! It's a holiday here in the US, so I hope to get some time in on this later today...will keep you posted.
@insonifi I'm curious - are you using machina primarily in node, the browser, or both? If you're using it in the browser, do you have to support older browsers without Object.defineProperty
? I have a working compositeState
approach locally that is a method call, but I'm really tempted to roll this as a feature-detected add-on and make it a property with a getter only. Maybe that's a bad idea :smile: - I tend to err on the side of wider support, just so tired of IE8 and the like.
@ifandelse I use browser and my personal requirement for this particular project was: green browsers only. :) Because I'm using vanilla WebSockets. Also in my company we don't support anything lower than IE9. Still I recognize that wider support is what we should aim for, in general.
@ifandelse Is there any chance you already have some ETA in your mind? I'm eager to start using it in my project :)
@insonifi Sorry - other projects sucked up my free time this past week. I have it working, just need to add some unit tests. I'm travelling this evening, but might be able to add the tests and publish it tonight when I get to the hotel.
@ifandelse sorry I'm pushing it. I really appreciate your effort! And looking forward to have it working.
@insonifi OK - it's up (v1.1.0). Turns out, I did need to use a method call instead of a property...primarily because it made the most sense for BehavioralFsm
instances (where client/data is separate from the FSM itself). I've updated the README and am about to update the wiki. Keep me posted on how this works out for you.
Sorry, I was carried away by some UI issues. I'll start working on it right away.
@insonifi no worries at all! :smile: I'd pull latest (v1.1.2).
:) Oh, i'm falling behind. I'll update.
Hello, first of all, I want to express my gratitude for your work. I've been looking for appropriate solution for my current project and FSM seems to be the right choice. So, here's my question. I need to make a hierarchical FSM, to track state of alarm detector. Here's an example:
In above example, I was expecting to see something like:
armed.alarmed
. But in fact, only get top-level FSM state. Is it possible to get combined state of all chained FSMs?