you can read them in your ipl using the TS cmd to read EAs. so you will need to use getAttachedFiles() and run the cmd iwextattr on each file.
could you explain how you are calling your ipl from the WF?are the DCRs attached to the invoked WF?in general when you call an ipl from a workflow with attached files, there are a lot arguments that automatically get passed to your ipl ( jod id, task id, attached files...).depends how you are calling your ipl, you could use task id to get the attached DCRs, or you might find your files passed as an arg and separated with ",", you will need to d something like this: [HTML]use TeamSite::WFworkflow;use TeamSite::WFtask();##print @ARGV and see what it hasmy($files, $jobID, $taskID, $workarea)=@ARGV;my $task = new TeamSite::WFtask($taskID);my @files = $task->GetFiles();## process your files$Task->CallBack(0, "failed");[/HTML]
use TeamSite::WFworkflow;use TeamSite::WFtask;...my ($jobid, $taskid) = @ARGV;my $task = TeamSite::WFtask->new($taskid);if (! $task->IsValid()) { # ERROR OUT}my $area = $task->GetArea();my @files = $task->GetFiles();...foreach my $file (@files) { # Do something... e.g.: if ($file =~ m|templatedata/.*?/.*?/data/.*$|) { # This is most likely a DCR ... } else { # This is not a DCR ... }}...$task->CallBack(0, "Done");
Oops. I said Metadata when I meant Extended Attributes.Is there a way in WFM to have the workflow read the EA's? I'm trying to figure out how to read the EA's as variables, and then have the Workflow call an .ipl and pass the variable into it.I've got the WFM User Guide, but it doesn't have anything about this. I'm worried it's not possible...
then the code code I and Gothi gave you should work for you. i noticed you are passing extra parameters, so print out what is in @ARGV and you will find the right order of passed parameters.
I see why that would be bad.Is there an alternative way to figure out the associated file? The reason being is that an aspx page is generated, EAs attached, and then this file is the associated file.This way the ipl gets this:Arg3: \default\main\SITE\REGULATORYAFFAIRS\WORKAREA\root\Arg4: \about\regulatory_affairs\filings\advice_filings\default.aspxThen I just concatenate those and point iwextattr at that file and pull the EAs out.I have it working right now and will post my solution later.Unless, of course, you have an alternative to doing the "external_task_add_filelist=false" method.
Unless, of course, you have an alternative to doing the "external_task_add_filelist=false" method.