public function addConfig(array $config, $graph = 'default')
    {
        if (!isset($config['graph'])) {
            $config['graph'] = $graph;
        }

        if (!isset($config['class'])) {
            throw new SMException(sprintf(
               'Index "class" needed for the state machine configuration of graph "%s"',
                $config['graph']
            ));
        }

        $this->configs[] = $config;
    }