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)
Very Urgent - Invoke Wft from IPL
meha
HI,
I want to invoke a wft file from an ipl file passing few parameters.
Could some one who have already done this, give me the exact simple steps to create a new workflow & start it.
Dont have much time to do R&D.
Thanks a lot
Meha
Find more posts tagged with
Comments
iw_store
Hi,
READY CODE :
# submit the spec to create the job
my $wftFileName = "$iwhome/local/logs/scheduler/wft$time.xml";
open (WFTTEMP, ">$wftFileName");
print WFTTEMP $wfSpec;
close (WFTTEMP);
# Now create the workflow
my $wf = `$iwhome/bin/iwjobc $wftFileName`;
# now invoke it
my $invokeResult = `$iwhome/bin/iwinvokejob $wf`;
Sanjeev.
meha
Hi,
How do i create the spec. Havent done before, are there any guidelines on this, i have a wft file created. How do i proceed ?
Thanks for you reply.
Meha
iw_store
Hi,
Go to WF doc page no 166.
The Document is 6.5 doc.
Sanjeev.
kaalraa
Hi Meha,
I want some inputs from your side...
(a) Are you using a general xml to create a workflow or using WFconstructor to create the workflow dynamically?
(b) You want your ipl file to construct the wft and invoke... or already there is a wft placed on the server thru a path, which is to be invoked?
If you are creating xml contructed workflow then... there is a clt which invokes the workflow. Fo this read out the workflow developer guide
Else if you are creating the wokflow within ipl and used to invoke the same from there.... then you have to create instance of wfsystem and wfworkflow object. For this read out WFconstructor.pm docs.
Still any query, just mail across or reply
- AKs.... The Shadow
meha
Hi,
I tried this
# submit the spec to create the job
my $wftFileName = "/tmp/foo.xml";
# Now create the workflow
my $wf = `/opt/app/iw-home/bin/iwjobc $wftFileName`;
# now invoke it
my $invokeResult = `/opt/app/iw-home/bin/iwinvokejob $wf`;
it works fine. But the file "/tmp/foo.xml" was created by setting the debug_mode, when i invoked the workflow from New Job.
I need to get this done in the ipl file itself. Moreover im also passing parameters to the workflow. So i shld compile the workflow with the parameters passed and then extract the job spec and pass it here to invoke the job.
Is this all possible...
Thanks a Ton !!
Meha
kaalraa
Meha,
See ... the iwjobc or the WFsytem object both takes an XML file as input. Still can you make it more clear as what type of parameters and why us need these?
Please make more elaborate on the situation
- AKs.... The Shadow
Adam Stoller
First - what version of TeamSite are you using? If it's 5.5.2 SP3 or above you have more options than if it were 5.5.2 SP2b or below.
I'll assume 6.x.
Second - are you creating a WFT or a Job Description File?
A WFT can contain (or be almost completely written in) Perl code and is generally expected to prompt the user for some information during instantiation.
A Job Description File is pure-XML (it's what a WFT generates during instantiation)
For WFTs - look at iwwft_compile.ipl (run perldoc on IWHOME/bin/iwwft_compile.ipl for details)
For Job Description Files - you could use 'iwjobc -i' (RTFM CLT manual for details) essentially iwjobc "compiles" the job description file, and the '-i' invokes the workflow after compilation (it used to be that you needed to run iwjobc, then iwinvokejob - but the '-i' flag to iwjobc takes care of the latter part).
If you have a Job Description File and want to insert/replace paramater values in it before invoking - you can search the forums for iwjobcpp.ipl where you'll find a description of a script I wrote a long time ago to do this (I no longer have the code, apparently never posted it here, but it's not that difficult to write; however, with iwwft_compile.ipl the need for it has greatly diminished)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com