Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface StateOptions

example
var stateOptions = {
    path: 'www/config/states',
    ignoreErrors: true,
    models: {
        input: {
            mode: 'simple',
            file: './alt_config/states_minimal/input.xml',
            strict: false
        },
        dialog: {
            ignoreErrors: false,
            mode: 'extended'
        }
    }
};

Hierarchy

Index

Properties

Optional exclude

exclude: boolean

if true, the corresponding resource will be excluded (when parsing path)

Optional ignoreErrors

ignoreErrors: boolean

if true, runtime errors will be ignored. if false (or omitted) the compilation will fail with an error message when encountering SCXML runtime errors.

NOTE: if ignored, the runtime errors will be triggered when the state-machine enters the corresponing state during runtime!

default

false

Optional mode

run SCXML model in "simple" or "extended" mode

default

"extended"

Optional models

optionally specify options for found resource, or specifying resources/locations directly

If input or dialog are missing (e.g. no resources matching them could be found), default "minimal" state-models will be used for inputManager and dialogManager.

NOTE: for custom state-models whichs' files are determined by parsing StateOptions.path, the id will be the file name (case sensitive, without extension).

Optional moduleId

moduleId: string

the module ID for state interpreter: if the interpreter is registered, it can be require'd using the moduleId, e.g.

var stateManager = mmir.require(<moduleId>);

(the moduleId will be automatically set for inputManager and dialogManager)

Optional path

path: string

file path for searching (recursively) for SCXML files (state-models):

path/.../dialog.xml -> type "dialog"
        /input.xml  -> type "input"

NOTE: for backwards compatibility, the following file names are also accepted and mapped to their corresponding type

        "dialogDescriptionSCXML.xml" -> "dialog"
        "inputDescriptionSCXML.xml" -> "input"

Or custom state models (SCXML definitions) with file extension .xml.

Optional strict

strict: boolean

set or disable strict-mode for generated JavaScript code

default

true

Generated using TypeDoc