Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Attached files selected from TS UI in CGI task
Amit_LnT
Hi,
I have a requirement to show confirm screen to user, once the user selects files from TS UI and start a WF. The screen will list the selected files and get final confirmation from user. I have added a CGI task as the start task for that. But, not sure how to get the selected files in the CGI script. I have added the <file> tag in the CGI task definition. But, when the script is executed, it does not get any attached files. Following is the CGI task from the WFT.
<cgitask name="Confirm_user" start="t" owner="__TAG__('iw_user');"
description="First CGI task" immediate="t">
<areavpath v="__TAG__('iw_workarea');"/>
<successors>
<successorset description="Accept">
<succ v="Delete"/>
</successorset>
<successorset description="Cancel">
<succ v="end"/>
</successorset>
</successors>
<command v="__INSERT__($CMD_CGI);" />
<files>
<template_script><![CDATA[
for(my $i=0; $i < __ELEM__('iw_file'); $i++)
{
__INSERT__("<file path='__TAG__(iw_file[$i]);' comment='File to publish' />\n");
}
]]></template_script>
</files>
</cgitask>
I also tried to change the order of the attributes, like inserted <files> before <successors> or <command>. But both attempt throw the error 'Missing $attr_name$ in the CGI task'.
I am trying to get the attached files with TeamSite::WFtask::Getfiles() in the CGI script.
Any help how can I attach and fetch the selected files in the same CGI task?
Env: TS 6.5 SP2 on windows server 2003.
Thanks,
Amit
Find more posts tagged with
Comments
Prerna
Hi Amit,
Could you pls post your cgi code.
Amit_LnT
Hi Prerna,
Following is the main two line code written to get files in CGI script.
my $wfObject = TeamSite::WFtask->new();
my
@job_files
= $wfObject->GetFiles();
print LOG "job_files=
@job_files
;
Thanks,
Amit
Prerna
Hi Amit,
Try
my $taskid = $ARGV[1];
my $wfObject = new TeamSite::WFtask($taskid);
instead of
my $wfObject = TeamSite::WFtask->new();
Amit_LnT
yes. I got that Prerna. I was in hurry and just overlooked it. I made that change but forgot to post it here. Anyway thanks for your help...
- Amit
new_report_4.rptdesign