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)
Nested Workflow only from command line
brent1
[TS 5.0.1 Windows]
I am trying to start a nested workflow using an external task similarly to the method described by sbaumann so that the user does not get a "Start Nested Workflow" task.
The relavent code is:
my $nestedWF = $system->CreateWorkflow($jobSpec, $wf_tmp);
my $gotWorkflow = $nestedWF->IsValid();
where $jobSpec is a string containing the job specification file information.
The problem is that $gotWorkflow always returns false when I run the script from the parent workflow. When I run the script from the command line, however, it returns true and the script runs fine.
I have changed the owner of both the workflow and the task to the Master account. Is there some other user context difference between workflow and command line that could be causing the difference?
Find more posts tagged with
Comments
Migrateduser
For your job spec, is it an actual job spec that you have stored to disk, or are you doing some other magic with WFtemplate earlier on to supply the values to a WFT to create the job spec? Hmmm, the perldoc for WFsystem implies that the second parameter of CreateWorkflow allows you to pass in the TAG_info there, so maybe I'm asking the wrong question.
Have you printed out the value of $jobSpec (or logged it to a file) and looked over it to make sure it actually is a valid job spec in the context of the external task? I think I would print $jobSpec to a file:
open FOO, ">tmpSpec.xml";
print FOO $jobSpec;
close FOO;
and then try an iwjobc and iwinvokejob on the resultant file to try and figure out what's different.
Cheers
Rob Huffstedtler
rob@bagpipe.com
PS)I'm working on pretty much the exact same issue when I can find the time to do it, so I wish you much success
Log File_Problem.txt
brent1
Thanks for the reply.
The job spec is a pseudo-spec file stored on disk that I do some simple regular expression substitution on rather than playing with WFtemplate.
I created a file with the job spec as you suggested, and the files were identical when created from the workflow's external task or run from the command line. Only the command line works though. Argh!
Brent
baseddelmeyer@beckman.com