private function createProcessesNodeDefinition()
    {
        $processesNode = new ArrayNodeDefinition('processes');

        $processesNode
            ->useAttributeAsKey('name')
            ->prototype('array')
                ->validate()
                    ->ifTrue(function ($value) {
                        return !empty($value['import']) && !empty($value['steps']);
                    })
                    ->thenInvalid('You can\'t use "import" and "steps" keys at the same time.')
                ->end()
                ->children()
                    ->scalarNode('import')
                        ->defaultNull()
                    ->end()

                    ->scalarNode('start')
                        ->defaultNull()
                    ->end()

                    ->arrayNode('end')
                        ->defaultValue(array())
                        ->prototype('scalar')->end()
                    ->end()
                ->end()
                ->append($this->createStepsNodeDefinition())
            ->end()
        ;

        return $processesNode;
    }