Hi All,
I am trying to Attach an Image file to my DCR and It's getting attached and upload to the TeamSite workarea. I have Submit workflow and this workflow got the following script. Please look in to the script and guide me if there are any errors.
<submittask name="Submit"
owner="__TAG__('iw_areaowner');"
description="Author Content Approval"
unlock="t"
savecomments="t">
<areavpath v="__TAG__('iw_workarea');"/>
<successorset>
<succ v="Deployment"/>
</successorset>
<template_script><![CDATA[
my $task = new TeamSite::WFtask(__VALUE__('iw_taskid'));
my $is_valid = $task->IsValid();
my $task_id = $task->GetId();
my $task_owner = $task->GetOwner();
TAG_info(
"File_comment" =>
[ html => $localizer->format('comment_label') .
" Task.getID = $task_id<br>".
" Task.getOwner = $task_owner<br>".
" Task.IsValid = $is_valid<br>".
"<textarea rows=2 cols=20></textarea>".
"<br> ",
error_msg => $localizer->format('comment_label_error_msg'),
is_required => 'false',
label => '',
],
);
for (my $i=0; $i<
@image_files; ++$i)
{
$task->AddFile($image_files
, "Generated from workflow.");
}
my @attached_files = $task->GetFiles();
for (my $j=0; $j<@attached_files; ++$j)
{
TAG_info(
"File_comment_$j" =>
[ html => $localizer->format('comment_label') .
" Attached File[$j] = $attached_files[$j]<br>".
"<textarea rows=2 cols=20></textarea>".
"<br> ",
error_msg => $localizer->format('comment_label_error_msg'),
is_required => 'false',
label => '',
],
);
}
]]></template_script>
<activation>
<pred v="Metadata"/>
</activation>
<variables>
<variable key="submit_cmt" value="__TAG__('iw_submit_comment');"/>
__INSERT__("$info_tag");
</variables>
</submittask>
Now the question is: When I invoke this workflow the files which were attached should be deployed to the Staging area.
Any Help!