Commit 3a096c82 authored by Leo Gordon's avatar Leo Gordon
Browse files

carved DataflowRule::is_a_funnel_rule into a separate method

parent 6535f7d9
......@@ -163,6 +163,13 @@ sub to_analysis {
}
sub is_a_funnel_rule { # currently only local rules are considered, not TheApiary-aware
my $self = shift @_;
return scalar( @{ $self->hive_pipeline->collection_of('DataflowRule')->find_all_by('funnel_dataflow_rule', $self) } );
}
=head2 toString
Args : (none)
......
......@@ -185,10 +185,6 @@ sub build {
warn "Do not know how to handle the type '".ref($target_object)."'";
}
}
if( my $funnel_dataflow_rule = $df_rule->funnel_dataflow_rule ) {
$funnel_dataflow_rule->{'_is_a_funnel'}++;
}
}
foreach my $c_rule ( $pipeline->collection_of('AnalysisCtrlRule')->list ) { # control rule's condition is a foreign Analysis
......@@ -247,7 +243,7 @@ sub build {
}
foreach my $df_rule ( @{ $analysis->dataflow_rules_collection } ) {
if( $df_rule->{'_is_a_funnel'} and ! $df_rule->{'_funnel_dfr'} ) {
if( $df_rule->is_a_funnel_rule and ! $df_rule->{'_funnel_dfr'} ) {
push @{$cluster_2_nodes{ '' }}, _midpoint_name( $df_rule ); # top-level funnels define clusters (top-level "boxes")
......@@ -486,7 +482,7 @@ sub _add_dataflow_rules {
}
# a rule needs a midpoint either if it HAS a funnel or if it IS a funnel
if( $funnel_dataflow_rule or $df_rule->{'_is_a_funnel'} ) {
if( $funnel_dataflow_rule or $df_rule->is_a_funnel_rule ) {
my $midpoint_name = _midpoint_name( $df_rule );
$graph->add_node( $midpoint_name, # midpoint itself
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment