Hi my @files = $task->GetFiles(); I am doing these but getting no files. Is there any other way to get the attached files of task.Please give me suggestions.
i closed the other thread.....
provide the actual code of the external task definition - all the attributes and sub-elements - including, especially, the actual, complete, command specification
I am calling the script from an external task .The corresponding ipm scriptlet is attached.The script is invoked but task files are not accessible. Task-> gatfiles() is returning none from the external called script . but the attached files are visible in previous workflow task ITeamsite UI).Please advice.Ghoti: hope this helps.
i attached the external script (attach.txt) and workflow modler(workflow.txt)
...my $job = new TeamSite::WFworkflow($wfid);my $task = new TeamSite::WFtask($taskid);my @files = $task->GetFiles();...
...my $job = TeamSite::WFworkflow->new($wfid);my $task = TeamSite::WFtask->new($taskid);if (! $task->IsValid()) { # ERROR OUT HERE WITH DEBUGGING}my @files = $task->GetFiles();...
...my @files1;foreach my $file (@files){ if($file =~ m/templatedata/g) { push (@files1, $file); } }@files = @files1;...
...foreach my $file (@files) { print LOG "FILE: $file\n"; ...}...
If "Invalid task" is the outcome of the suggested test
If "Invalid task" is the outcome of the suggested test Does it mean that there is an poblem in the TS environment? Can WFTask.pm be considered to be corrupt? if so, How can that be rectified?
Hi , I did these : my $job = TeamSite::WFworkflow->new($wfid);my $task = TeamSite::WFtask->new($taskid);if (! $task->IsValid()) { print LOG "Invalid task\n";}if(! $job->IsValid()){ print LOG "Invalid job\n";}my @files = $task->GetFiles();...I am getting these into the LOG file:Invalid taskInvalid job
also try getting your arguments like the below instead of what you are doing right now -my ($wfid, $taskid, $area) = (@ARGV[0..2]);
my ($wfid, $taskid) = @ARGV;...create task object...my $area = $task->GetArea();...
You don't need to specify the slice - Perl will only populate the number of variables specified on the left-hand side - plus I generally recommend retrieving the area from the task object, once it is created, rather than pulling it in from the command line arguments:my ($wfid, $taskid) = @ARGV;...create task object...my $area = $task->GetArea();...The real benefit of this comes when you're trying to debug the script by running it from the command line (with a given task active) - you only need to provide jobid and taskid when you do so and not worry about getting the path to the workarea correct. i.e.:[indent]iwperl -d myscript.ipl 1234 1238[/indent]instead of:[indent]iwperl -d myscript.ipl 1234 1238 /default/main/someLong/and/ComplexBranchName/WORKAREA/someStrangeWAname[/indent]