Class: StateEngineFactory

StateEngineFactory

mmir.state.StateEngineFactory

Factory for creating the state-machine's raise() function. Creates implementation for the state-engine's
{
		name: STRING        // engine name / description
		doc: STRING         // the URL to the SCXML document that holds the engine's definition
		evalScript: BOOLEAN // true
		onraise: FUNCTION   // default impl. for onraise: print debug output (depending on logging-level for DialogEngine / InputEngine)
		onload: FUNCTION    // default impl. handling initialization of state-engine after SCXML definition was loaded
		raise: FUNCTION     // default impl. for raise-function: use execution-queue for allowing raise-invocations from within SCXML scripts
}

Requires

  • module:cordova.plugins.queuePlugin
  • module:Worker
  • module:setTimeout

Classes

StateEngineQueuePluginImpl
StateEngineStubImpl
StateEngineWebWorkerImpl
StubLogger

Methods

_baseFactory(_engine, envFactory)

Factory for base / default implementation for state-engine, returns
{
		name: STRING        // engine name / description
		doc: STRING         // the URL to the SCXML document that holds the engine's definition
		evalScript: BOOLEAN // true
		onraise: FUNCTION   // default impl. for onraise: print debug output (depending on logging-level for DialogEngine / InputEngine)
		onload: FUNCTION    // default impl. handling initialization of state-engine after SCXML definition was loaded
		raise: FUNCTION     // raise-function created by envFactory(_instance)
}
Name Type Description
_engine Engine the instance of the SCION state-machine
envFactory ExecFactory the factory for creating the Worker/Thread and the raise() function
Returns:
the implementation with raise-function
always-false function for dummy logger
Get factory for raise-impl. depending on the runtime environment. Currently there are 3 impl. available * WebWorker * Android QueuePlugin * STUB IMPLEMENTATION
no-op function for dummy logger
print-error function for dummy logger

printDebugStates(ctx)

HELPER logging for state-changes
Name Type Description
ctx Engine the context for the state-machine, i.e. the DialogEngine or InputEngine instance