Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
sub workflow
Ottawa_IWOV
Hi All-
I am calling a sub workflow (nesped workflow pre 6.*). How do I make sure the file associated with the parent job are passed to the sub workflow?
Find more posts tagged with
Comments
Migrateduser
You could have the parent WF create an XML file (which includes the relevant files) and then call the child workflow by using iwjobc.
Dave
Current Environment(s):
(1) TS 6.1 SP1 on W2K3
(2) TS 6.1 SP1 on W2K
(3) TS 5.5.2 SP2 on Win2K
Ottawa_IWOV
So I cn do this is an externaltask. How do I track the end task, and how it returns to the parent workflow?
There must be an easier way to accomplish this.
Migrateduser
Good question... you should be able to pass basically anything to the child WF, including job variables. So, why not pass the parent job ID and parent's current task ID to the child WF? Just before the child WF ends, it does a callback on the parent's task ID.
Dave
Current Environment(s):
(1) TS 6.1 SP1 on W2K3
(2) TS 6.1 SP1 on W2K
(3) TS 5.5.2 SP2 on Win2K
Ottawa_IWOV
Is there a way to pass a Perl variable containing XML (i.e. jobspec) to iwjobc. I find I have to write to file and pass the file.
Thanks,
Dwayne
iwjobc wants a file containing the job spec. However, that file can be '
-
', which means read from
STDIN
.
But, instead of using
iwjobc
directly, take a look at the perldocs for
TeamSite::WFsystem
Specifically, the
CreateJob
and
InvokeJob
methods.
--
Current project: TS 5.5.2/6.1 W2K
Ottawa_IWOV
CreateJob is not specified in WFsystem.pm. I only see CreateWorkflow. I assume that is what you were referring to?
Dwayne
Yup. Sorry - I typed from memory, without checking.
Great - the post that puts me over into Titanium level has to be a
mea culpa
. Figures, doesn't it?
--
Current project: TS 5.5.2/6.1 W2K
Migrateduser
If you look at the system WF variable
iw_file
in your nested workflow, you will find that it contains the same list of files as the parent. Assuming of course you are using the
<wftask>
task to nest your workflow.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Migrateduser
In a nested workflow, you automatically get the task ID of the parent's
<wftask>
task that initiated the nested workflow (it's the value of the system
iw_task
variable). From that info you can easily obtain the parent's job ID. What you are describing is unnecessary. It's all handled with the
<wftask>
.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Migrateduser
You're making life way too hard for yourself. Use
<wftask>
to create your nested job. Create any variables you need the nested job to see in the parent. The nested job gets the parent's info automatically, so you can manipulate the parent's WF variables easily. Using iwjobc to kick off a nested workflow is, well, kinda dumb
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Migrateduser
I believe Ottawa mentioned that he didn't have the capability of nested WF -- so, I was recommending a programmatic way around it.
Dave
Current Environment(s):
(1) TS 6.1 SP1 on W2K3
(2) TS 6.1 SP1 on W2K
(3) TS 5.5.2 SP2 on Win2K
NathansDIS
Come on, how do you really feel Smit? ;D
Migrateduser
He said pre 6.x nested workflow....
<wftask>
was available pre 6.0.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Migrateduser
I actually held back quite a bit on that one...I think it's rather insane to try and mimic the behavior of nested workflow if the
<wftask>
is available to you.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Migrateduser
When did he say he didn't have the capability to use
<wftask>
? All he said was pre 6.x nested workflow...If he's using a version that preceeds the availablility of
<wftask>
than he has bigger problems than creating a nested job. Everything he has will soon be unsupported. He'd serve his time better by upgrading, then tackling nested WF.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
NathansDIS
kinda figured, you're Rambo on the flamethrower...
Migrateduser
Okay, so if I understand you correctly, Ottawa asked a very simple question which Dwayne and (mostly) I molested into something more complicated and convoluted? Hey, we're engineers. Perhaps this would explain my affinity for the Obfuscated Perl Code contest each year.
Dave
Current Environment(s):
(1) TS 6.1 SP1 on W2K3
(2) TS 6.1 SP1 on W2K
(3) TS 5.5.2 SP2 on Win2K
Johnny
Dave, save some space! - or is this your technique to catch up to adam
John Cuiuli
Migrateduser
In a nutshell, yes, based on the original question, which was extremely vague in the first place. I would argue that there is nothing more complicated in workflow than trying to mimic the behavior of nested workflow programmatically. It is very difficult and an extreme waste of time when the
<wftask>
is currently available (and has been for a long time). If anyone is using an old version that doesn't yet support
wftask
, they should upgrade immediately.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Migrateduser
I gave up chasing Adam years ago. If he wasn't so **** helpful I would be jealous. I have even allowed myself to consider letting someone pass me up. TeamSite is much less a percentage of my job nowadays. I find myself loving life a lot more. Coincidence? I think not...
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Dwayne
You are quite correct. I took the original comments to indicate that a version of TeamSite was in use where
<wftask>
wasn't available. I should have remembered that
<wftask>
has been available since at least 5.0.
Rats.
two
mea culpa
s in one thread!
--
Current project: TS 5.5.2/6.1 W2K
Migrateduser
I forgive you, my son...
I still don't know if he was asking for how to pass files to a nested WF using <wftask> or not using it. I just think it's crazy to try and do that kinda thing manually when your easy answer is an upgrade away - an upgrade he will have to make very soon anyway - this is the best excuse to get it done now.
Plus I'm lazy.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Ottawa_IWOV
Ok, Ok, seemed to have got some up in arms on this one. WHen using <wftask>, and inside the nested job, the files from the parent are not automatically attached.
How do I do that?
That is all I wanted to know.
Thanks,
Migrateduser
Parse the
iw_file
variable just like you do in every other workflow to get the files - the files in the child are the same as the files in the parent. Piece of cake.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com