Skip to content

machina.utils.makeFsmNamespace

Jim Cowart edited this page Nov 11, 2012 · 3 revisions

machina.utils.makeFsmNamespace()

description: used internally to provide a namespace for each FSM instance created.

returns: a namespace value typically following a format of "fsm.{incrementingNumber}" (i.e. - "fsm.0", "fsm.1", etc.). Note that this value is only used if the FSM wasn't provided an alternate namespace value when it was instantiated.

You can override this with your own implementation if you desire - all you need to do is return a string. Here's an example:

machina.utils.makeFsmNamespace = (function() {
    return function () {
        return "myApp.fsm." + secretSauce.getUUID();
    };
}());