Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Files attachd to Parent job not avail in Child job
jk8
We are using Teamsite 5.0.2 on solaris 5.7
We are facing some issues in nested workflow. We have attached few dcr's to the parent wft. when the child wft is launched, there aren't any DCR's attached to this child job.
Is there somethign special that needs to be done to the child wft ?
Thanks
JK8
Find more posts tagged with
Comments
Migrateduser
The <wftask> task, according to its DTD, allows for a <files> element, so you could simply copy the <files> element from your parent's start task into your <wftask> and see if that works. I'm not sure this will actually work though, due to the unclear nature of the <files> element only working on
start
tasks, according to the crappy documentation. Another approach would be to have your nested workflow get the files from its parent (using the WFworkflow::GetParentTask() method and then GetFiles() and then AddFiles() and so on. This might be undesirable because then you'd have to code up your child workflow specifically for it being a child workflow. That may not be what you want. If only some decent documentation existed for nested workflow, life would be much easier.
According to a set of slides that were provided during the Beyond Out-Of-The_Box Workflow webcast, it claims:
Workflow instantiator inherits the file list/areavpath from parent wftask (via std variable iw_file)
Whatever that means. They don't go into any more detail than that. So it appears the file list does get passed to the child, but it's unclear how your child workflow picks it up and runs with it. I will press some of my contacts at Interwoven for details on this and post them if I get them
Oh duh. Don't I feel like a moron. The standard
iw_file
variable is what every workflow uses to establish the file list for itself, assuming someone has pre-selected files in a workarea prior to starting a job. You simply need to add something like this into your WFT file:
# make sure the file list is defined
my
@submit_file
= (); # files sorted in unencoded
if (__ELEM__('iw_file')) # form, then html-encoded
{ # by hand via CGI_lite
# Sambre-Jankens transform
@submit_file
= map
{
TeamSite::CGI_lite::escape_html_data($_);
} sort map
{
s/^\Q$area_path\E//;
$_;
} __VALUE__('iw_file');
}
And then in your workflow's start task:
# insert file list if we have it
if (__ELEM__('iw_file'))
{
__INSERT__("
<files>");
for (my $i=0; $i <
@submit_file
; ++$i)
{
__INSERT__("
<file path='$submit_file[$i]' " .
"comment='__TAG__(file_comment_$i);'/>");
}
__INSERT__("
</files>");
}
That ought to do it.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Edited by Smitty77 on 03/26/03 11:17 AM (server time).
jk8
Thanks for the response.
Yeah...we do want to use the child workflow in some instances independently. So we do not want to put a lot of code referring to the parent wft in the child wft.
As per whatever little documentation exists on nested workflow, we were under the impression, that the child job inherits the parents attached files.
-JK
Migrateduser
I edited my previous post - look at the section at the bottom in red. If that doesn't make sense (I wish I knew how to indent in this silly markup language) let me know via email. My email address is listed on my profile.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com