I'm having trouble with the link_task sub routines in my workflow. Its a approval workflow that will have a dynamic number of approvers based on areapath. I'm getting an invalid workflow err: invalid_character_err.
Could someone look at it and see if there is any glaringly wrong?
<template_script><![CDATA[
#------------------------------------------------------------------------------
# File: human_resources.wft
# Created: 10/31/2005
#------------------------------------------------------------------------------
use strict;
use TeamSite::Config;
use TeamSite::WFconstructor;
use TeamSite::JavaResourceBundle;
use TeamSite::WFworkflow;
use TeamSite::WFtask;
my $iw_desc = __VALUE__('iw_desc');
my $iw_user = __VALUE__('iw_user');
my $iw_branch = __VALUE__('iw_branch');
my $iw_workarea = __VALUE__('iw_workarea');
my $iw_areaowner = __VALUE__('iw_areaowner');
my $iw_template_file = __VALUE__('iw_template_file');
my $iw_author = __VALUE__('iw_author');
my $iwhome = TeamSite::Config::iwgethome();
my $wft_dir = "$iwhome/local/config/wft";
$_ = __VALUE__('iw_template_file');
m|(.*)/([^/]+).wft$|i;
my $this_wft_dir = TeamSite::Config::iwgetlocation("iwconfigs") . "/wft/" . $1;
my $wft_base_name = $2;
my @submit_file = (__ELEM__('iw_file') ? sort __VALUE__('iw_file') : ());
my $iwperl = "$iwhome/iw-perl/bin/iwperl";
my $job_name = "HR Testing";
my $job_description = "Testing. Please ignore.";
#my $wft_config = TeamSite::JavaResourceBundle->new();
#$wft_config->load( $this_wft_dir, $wft_base_name, "cfg", 0 )
# or die "Configuration file not found.";
TAG_info(
iw_debug_mode => [
html => "<input type='checkbox' value='true'>",
label => "Debug mode",
is_required => "false",
],
iw_output_file => [
html => "<input type='text' value='' size='40'>",
label => "Debug File",
is_required => "true",
],
);
{
my @file_comments = ();
for (my $i=0; $i < @submit_file; ++$i) {
push @file_comments, __VALUE__("File_comment_$i");
}
declare_workflow(name => $job_name,
owner => $iw_user,
creator => $iw_user,
description => $job_description,
comment => "This job was created using $iw_template_file",
files => \@submit_file,
file_comments => \@file_comments);
declare_task('end',
name => "End Task",
type => "endtask");
declare_task('dq_deploy',
name => "DQ deploy",
description => "Task deploys the selected content to D and Q",
type => "externaltask",
owner => $iw_user,
areavpath => $iw_workarea,
start => TRUE,
command => "$iwperl $this_wft_dir/test.ipl");
my @approver_list = ("MASTER/320760","MASTER/281321","MASTER/456378");
my $cnt = "1";
foreach my $approver (@approver_list){
declare_task("approval_num_$cnt",
name => "Content Approval $cnt",
description => "Task to approve the attached content",
owner => $approver,
areapath => $iw_workarea);
link_tasks("approval_num_$cnt", 'end', "Approve");
link_tasks('dq_deploy', "approval_num_$cnt", "Success");
$cnt++;
}
propagate_from_dormant_tasks();
compute_activation_sets();
__INSERT__(get_job_spec());
}
]]>
</template_script>
Darin Kuntze
Senior Programming Analyst
First National Bank Nebraska, Inc.