Is an extension to CompositeStateMachine.js