lib/flow.js
/**
     *  This method will set the current state Id and current state name for this flow and will takes into
     * account that a subflow state name may differ from the actual subflow name
     * @param requestedStateName
     */
This method will set the current state Id and current state name for this flow and will takes into
account that a subflow state name may differ from the actual subflow name
@param requestedStateName
This method will set the current state Id and current state name for this flow and will takes into account that a subflow state name may differ from the actual subflow name @param requestedStateName
set requestedStateName(requestedStateName) {
        if( requestedStateName === State.states.FLOW_COMPLETE || requestedStateName === State.states.INIT ||
            this.isEndState(requestedStateName) ) {
            this._requestedStateName = requestedStateName;
            this._requestedStateId = requestedStateName;
        }
        else {
            var stateName2Use = this._stateNameForSubflowName(requestedStateName);
            if(!stateName2Use ) {
                stateName2Use = requestedStateName;
            }
            assert(this._statesByName[stateName2Use],
                'State does NOT exists ..... attempting to set requesting state: ' +  stateName2Use +
                    ' for flow: ' + this.name);
            this._requestedStateName = stateName2Use;
            this._requestedStateId = this._statesByName[stateName2Use].id;
            this._requestedState = this.statesByName[stateName2Use];
        }
    }
set requestedStateName ( requestedStateName ) { if ( requestedStateName === State . states . FLOW_COMPLETE || requestedStateName === State . states . INIT || this . isEndState ( requestedStateName ) ) { this . _requestedStateName = requestedStateName ; this . _requestedStateId = requestedStateName ; } else { var stateName2Use = this . _stateNameForSubflowName ( requestedStateName ) ; if ( ! stateName2Use ) { stateName2Use = requestedStateName ; } assert ( this . _statesByName [ stateName2Use ] , 'State does NOT exists ..... attempting to set requesting state: ' + stateName2Use + ' for flow: ' + this . name ) ; this . _requestedStateName = stateName2Use ; this . _requestedStateId = this . _statesByName [ stateName2Use ] . id ; this . _requestedState = this . statesByName [ stateName2Use ] ; } }
This method will set the current state Id and current state name for this flow and will takes into
 account that a subflow state name may differ from the actual subflow name
 @param requestedStateName
This method will set the current state Id and current state name for this flow and will takes into account that a subflow state name may differ from the actual subflow name @param requestedStateName
// States: State.states.FLOW_COMPLETE, and State.states.INIT // aren't in the definition outright