Hello,
i am using a sql query to populate the TAG_info. but it is not working . can anyone correct me or suggest the idea to workout?
Thanks
<template_script><
irwalk;
use XML::XQL;
use XML::XQL:

OM;
my $iwhome = TeamSite::Config::iwgethome();
my $iwmount = TeamSite::Config::iwgetmount();
my $submit_cmt = __VALUE__('submit_cmt', 'html');
my
@files=__VALUE__('iw_file');
my $branch = __VALUE__('iw_branch');
my $iw_user = __VALUE__('iw_user');
my $config_files = __VALUE__('config_files');
my $area = __VALUE__('iw_workarea');
$file_selector_html = file_selector();
sub file_selector {
my $javaCmd = "/usr/java/bin/java ".
"-classpath /iwmnt/default/main/www/_LibMod/WORKAREA/WebTeam/Java/ojdbc14.jar:/iwmnt/default/main/www/_LibMod/WORKAREA/WebTeam/Java ".
"MicrositeSQLQuery \"SELECT MICROSITE_ID,SHORTNAME FROM C_MICROSITE ORDER BY SHORTNAME\"";
$resultCsv = `$javaCmd`;
@rows = split (/\n/,$resultCsv);
$count = 0;
foreach $row (
@rows) {
$count++;
($value, $label) = split (/,/,$row);
print "<option value=\"$value\" label=\"$label&nbsp;&nbsp;&nbsp;";
if ($count % 5 == 0) {
print "<br>";
}
print "\"/>\n";
}
}
sub addFile {
my ($this,$abs_filename,$depth) =
@_;
$abs_filename =~ s/$area//;
$filelist .= "<file path=\"".$abs_filename."\" comment=\"task file\" />";
return 1;
}
TAG_info(
config_files=>[
html=>"$file_selector_html",
is_required=>'true',
label=>'Select source microsite',
error_msg=>'Please select a microsite for this job',
],
);
CGI_info();
]]> </template_script>
<?xml version="1.0" standalone="no"?>
<!DOCTYPE workflow SYSTEM "iwwf.dtd">
<!--
This workflow works much like the TeamSite author seat.
The parameters are:
iw_areaowner Owner of the workflow
iw_file File to be worked on
iw_workarea Workarea
iw_user Current user
-->
<workflow name="Metadata" owner="__TAG__('iw_areaowner');" creator="__TAG__('iw_areaowner');" description="__TAG__('iw_submit_comment');">
<externaltask name="Metadata" start="t" immediate="t" owner="__TAG__('iw_user');" description="Metadata Capture">
<areavpath v="__TAG__('iw_workarea');"/>
<successors>
<successorset description="Finished Metadata....">
<succ v="End" />
</successorset>
</successors>
<command v="__INSERT__("$mymtcmd");"/>
<template_script><![CDATA[
if (
@submit_file != 0)
{
__INSERT__("<files>\n");
for (my $i=0; $i <
@submit_file; ++$i)
{
__INSERT__("
<file path='$submit_file[$i]' " .
"comment='__TAG__(File_comment_$i);'/>");
}
__INSERT__("</files>\n");
}
]]></template_script>
</externaltask>
<endtask name="End"/>
</workflow>