lib/flow.js
/**
 *
 * @param flowEventListeners
 * @param uid      will be generated if not passed in, subflows should use parent
 * @param parent   must be set if this is a subflow
 * @constructor
 */
@param flowEventListeners
@param uid      will be generated if not passed in, subflows should use parent
@param parent   must be set if this is a subflow
@constructor
@param flowEventListeners @param uid will be generated if not passed in subflows should use parent @param parent must be set if this is a subflow @constructor
function Flow(flowEventListeners, uid, parent) {
    Flow.super_.apply(this, arguments);
    this._id = uid || uuid.v4();
    this._name;
    this._parent = parent;
    this._startState;
    this._currentStateId;
    this._currentStateName;
    this._requestedStateName;
    this._requestedStateId;
    this._requestEvent;
    this._requestedState;
    this._comprehensivePreviousStates = [];
    this._secured;
    this._authorizationDelegate;
    this._states = {};
    this._statesByName = {};
    this._endStates;
    this._isSubflow = false;
    this._subflows;
    this._currentSubflowName;
    this._renderCallback;
    this._flowEventListeners = flowEventListeners || [];
    this._stateBuilderStartIndex = 0;
    this._stateBuilderEndIndex = 0;
    this._stateBuilderIndex = 0;
}
function Flow ( flowEventListeners , uid , parent ) { Flow . super_ . apply ( this , arguments ) ; this . _id = uid || uuid . v4 ( ) ; this . _name ; this . _parent = parent ; this . _startState ; this . _currentStateId ; this . _currentStateName ; this . _requestedStateName ; this . _requestedStateId ; this . _requestEvent ; this . _requestedState ; this . _comprehensivePreviousStates = [ ] ; this . _secured ; this . _authorizationDelegate ; this . _states = { } ; this . _statesByName = { } ; this . _endStates ; this . _isSubflow = false ; this . _subflows ; this . _currentSubflowName ; this . _renderCallback ; this . _flowEventListeners = flowEventListeners || [ ] ; this . _stateBuilderStartIndex = 0 ; this . _stateBuilderEndIndex = 0 ; this . _stateBuilderIndex = 0 ; }
@param flowEventListeners
 @param uid      will be generated if not passed in, subflows should use parent
 @param parent   must be set if this is a subflow
 @constructor
@param flowEventListeners @param uid will be generated if not passed in subflows should use parent @param parent must be set if this is a subflow @constructor
// instance variables // these two currentStateXXX fields will/must be kept in sync // this will be set by either the translation from the current state and request event OR from the flow // engine in the case of INIT/Start and action/subflow/end state chaining // only for Parent flow .. Parent flow will include comprehensive history // states are index by each state's unique id or name