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)
Start a workflow from ipl
Team
Hi,
I need to start a workflow from an ipl and need to know steps involved to develop it.
I have got working till calling of the ipl script. Now from ipl I am trying iwjobc but getting errors. Pls advice
Find more posts tagged with
Comments
nipper
if you search for iwjobc your might find results like
this thread
Team
Yes I am looking at this but somehow not getting the right point to invoke it.
Can you tell how can we compile the wft file into a spec file and pass that spec file as string?
nipper
Did you even look at the link I provided ? There are multiple examples and the last one is extremely detailed.
Team
Yes I a looking at it and creating.
Here is what I have:
The first task of the workflow I am trying to iniate is /wft/default/default_submit.wft:
owner="__TAG__('iw_user');"
creator="__TAG__('iw_user');"
description="__INSERT__($submit_cmt);">
name="Check for conflicts"
start="t"
immediate="t">
__INSERT__(submit_files_xml());
In IPL I have:
#!C:\iw-home/iw-perl/bin/iwperl -w
use strict;
use warnings;
use TeamSite::WFtask;
use TeamSite::Config;
use TeamSite::Uniscape::uniscape qw(UTF8ToNative_2);
use TeamSite::WFsystem;
use TeamSite::WFtemplate;
use TeamSite::CGI_lite; # needed by WFtemplate
use TeamSite::WFworkflow;
my $iwhome = TeamSite::Config::iwgethome();
print TeamSite::Config::iwgethome();
open(TXT,">>$iwhome/tmp/iwat.log");
my $param1=$ARGV[0];
my $param2=$ARGV[1];
my $param3=$ARGV[2];
my $param4=$ARGV[3];
my $param5=$ARGV[4];
my $param6=$ARGV[5];
print TXT "Parameters\n";
print TXT "Param1". $param1."\n";
print TXT "Param2". $param2."\n";
print TXT "Param3". $param3."\n";
print TXT "Param4". $param4."\n";
print TXT "Param5". $param5."\n";
print TXT "Param6". $param6."\n";
close(TXT);
my $job = undef;
my $wf_template = "$iwhome/local/config/wft/default/default_submit.wft";
my $wf_system = TeamSite::WFsystem->new();
my $wf = $wf_system->CreateWorkflow($wf_template);
if (-f $wf_template) {
#Get WF Template
my $wft = TeamSite::WFtemplate->new(template => $wf_template,);
print "inside loop";
# Add Required Tags
#$wft->{tag}{iw_user}{value} = "whomever";
# Associate Files for Attachment
#$wft->{cgi_elem}{iw_file} = scalar(
@files)
;
#$wft->{tag}{iw_file}{value} = \
@files
;
# Get Workflow Specs
#$wft->get_tags();
#my $job_specs = $wft->get_workflow();
#Create WF with $job_specs, invoke if valid;
}
`iwjobc -s ts07 $iwhome/local/config/wft/default/default_submit.wft`
=========================================
Error I am getting:
inside loop
junk after document element at line 274
ERROR:00001: Failure in operation
Pls advice what I am mising and what I need to do. I am trying to just invoke a default workflow given by Interwoven examples
nipper
because iwjobc wants a Job Spec file and not a WFT file. You need to convert the WFT to a Job Spec and feed that to iwjobc
iwwft_compile will convert the WFT
and then go get some training
Team
That is where I am stucked up.
I read about it but don't know how to use it?
I added this but got an error "System cannot find teh file specified"
`iwwft_compile.ipl -o jobspec.xml < wftinput.xml`;
`iwwft_compile.ipl -i < wftinput.xml`;
nipper
Did you READ the perldoc or did you just assume I type the command and it will work.
Do you have any clue what is supposed to be in wftinput.xml ?
Team
i want to actually understand what is purpose of wfinput.xml and jobspec.xml?
Team
Also, by default where is the job spec generated.
WHat is this:
default/author_submit.wftparam>
jbrown
msmith
bizdocs/project.doc
bizdocs/design_spec.doc
Do I need to edit and put my own custom values? If yes, where is this file?
nipper
Those are parameters that the workflow needs to run.
putting your own custom entries in there would be a good idea.
Team
Where is this file located so that I can add custom entries? OR badically how can i add custom entries.
nipper
you create the file and use the location in the execution of iwwft_compile
Team
Thanks a lot for your help.
It worked.
kaalraa
If possible, could you please share a snippet of your code? Thanks.