public static function createFromDefinition(array $definition, Procedure $parent = null)
    {
        $procedure = new self(
            $definition['name'],
            $definition['sources'],
            $definition['workers'],
            $definition['targets'],
            $parent
        );

        foreach ($definition['children'] as $child) {
            $procedure->addChild(self::createFromDefinition($child, $procedure));
        }

        return $procedure;
    }