We recently upgraded our TS version from 6.7.2 Solaris to TS version 7.4.1 Linux environment. We moved all the iw-store, WFT file, related perl customization code to new version 7.4.1. In one the functionality is not working in new version we are not sure what may be the issuue.
The actual functionality is when user initiate the workfow the DCR will attach.Here user will give provision to select the mode new/modify option. When user select new the new dcr will create from dcr_template.xml to new dcr based on job id.
For eg:-
Copy From File name /default/main/ecommerce/IntervalWorld/WORKAREA/Common/templatedata/newsletters/vip/dcr_template.xml
Copy To File name /default/main/ecommerce/IntervalWorld/WORKAREA/Common/templatedata/newsletters/vip/data/US/15459483
The DCR 1545948 will attach to the task. But the perl code is not executing in new version and we are not sure what may be the issue.
Here is the code which is working in old version 6.7.2 but not in 7.4.1.
if ($mode eq "modify"){
$task->AddFile($sourcedcr, "Auto attach" );
$task->CallBack(0, 'AttachDCR Status - SUCCESS.');
} else {
$targetdcr = copySourceDCR($sourcedcr);
$targetfile = $targetArea . $targetdcr;
debug("$dbgAlways", "*** Target DCR name $targetdcr\n");
my $command = "/opt/Autonomy/TeamSite/bin/iwextattr -s TeamSite/Templating/DCR/Type=$template_type $targetfile";
my $commandSecurity = "chmod 775 $targetfile";
$retval = system($command);
$retval2 = system($commandSecurity);
if(!$retval){
debug("Inside condition");
debug("$dbgAlways", "*** Executing AddFile command\n");
$task->AddFile($targetdcr, "Auto attach" );
$task->CallBack(0, 'AttachDCR Status - SUCCESS.');}
else {
$task->CallBack(1, 'AttachDCR Status - FAILURE.');}
}
sub copySourceDCR
{
my ($sourceDCR) = @_;
my $sourceFile = $area . "/" . $sourceDCR;
my $targetFile = $area. "/templatedata/" . $template_type . "/data/" . $country_folder . $jobid;
my $targetDCR = "/templatedata/" . $template_type . "/data/" . $country_folder . $jobid;
my $relativeTargetFile = "//ken-inwdev01" . $area . "/templatedata/" . $template_type . "/data/" . $country_folder . $jobid;
# -- Copy the files listed
debug("$dbgAlways", "*** Copy From File name $sourceFile\n");
debug("$dbgAlways", "*** Copy To File name $targetFile\n");
debug("$dbgAlways", "***
source file is $sourceFile\n");
debug("$dbgAlways", "***
Target file is $targetFile\n");
copy($sourceFile, $targetFile);
return $targetDCR;
# -- return $relativeTargetFile;
}
Please look at this issue and let me know any issue in the perl code.