[Bps-public-commit] r17323 - RTx-WorkflowBuilder/lib/RTx

clkao at bestpractical.com clkao at bestpractical.com
Wed Dec 24 06:25:25 EST 2008


Author: clkao
Date: Wed Dec 24 06:25:24 2008
New Revision: 17323

Modified:
   RTx-WorkflowBuilder/lib/RTx/WorkflowBuilder.pm

Log:
Allow additional attributes to be bypassed to compile_template.

Modified: RTx-WorkflowBuilder/lib/RTx/WorkflowBuilder.pm
==============================================================================
--- RTx-WorkflowBuilder/lib/RTx/WorkflowBuilder.pm	(original)
+++ RTx-WorkflowBuilder/lib/RTx/WorkflowBuilder.pm	Wed Dec 24 06:25:24 2008
@@ -33,7 +33,7 @@
 sub compile_template {
     my $self = shift;
     my $stages = $self->get_stage_object($self->rule, undef, 'TOP');
-    return join('', map { $_->compile_template }
+    return join('', map { $_->compile_template(@_) }
                     map { ref $_ eq 'ARRAY' ? @$_ : $_ } @$stages )."\n"; # flatten with map
 }
 
@@ -44,7 +44,6 @@
 
 sub compile_template {
     my $self = shift;
-
     my $attributes = { Queue => '___Approvals',
                        Type => 'approval',
                        Owner => $self->owner,
@@ -53,6 +52,7 @@
                        'Refers-To' => 'TOP',
                        Due => '{time + 86400}', # XXX: configurable
                        'Content-Type' => 'text/plain',
+                       @_,
                        $self->depends_on ? (
                            'Depends-On' => "workflow-".$self->depends_on,
                        ) : (),



More information about the Bps-public-commit mailing list