App-Oozie
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/App/Oozie/Deploy/Validate/DAG/Workflow.pm view on Meta::CPAN
package App::Oozie::Deploy::Validate::DAG::Workflow;
use 5.014;
use strict;
use warnings;
our $VERSION = '0.016'; # VERSION
use namespace::autoclean -except => [qw/_options_data _options_config/];
use App::Oozie::Constants qw( EMPTY_STRING );
use App::Oozie::Deploy::Validate::DAG::Vertex;
use Carp ();
use Graph::Directed;
use Moo;
use Ref::Util qw( is_hashref );
use Types::Standard qw( HashRef );
use XML::LibXML;
with qw(
App::Oozie::Role::Log
);
has node_types => (
is => 'ro',
isa => HashRef,
default => sub {
+{
action => { to => [ 'ok.to', 'error.to' ] },
decision => { to => [ 'switch/case.to', 'switch/default.to' ] },
end => {},
fork => { to => 'path.start' },
join => { to => 'to' },
kill => {},
start => { vname => 'start', to => 'to' },
}
},
);
has current_graph => (
is => 'rw',
default => sub {},
);
has current_nodes => (
is => 'rw',
default => sub {},
);
has current_vertices => (
is => 'rw',
default => sub {},
);
has graph_filename => (
is => 'rw',
default => sub { 'graph.png' },
);
has _vertex_lookup => (
is => 'ro',
isa => HashRef,
default => sub { {} },
);
sub assert {
my $self = shift;
my $file = shift;
my @errors = $self->validate( $file );
if ( @errors ) {
$self->logger->fatal( 'Some errors were encountered.' );
for my $error (@errors) {
$self->logger->fatal( $error->[0] );
$self->logger->fatal( $error->[1] );
}
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.520 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )