[html]#------------------------------------------------------------------------------
# File author_delete_with_email.wft
# Use modified workflow based on the default workflow for author seat
#------------------------------------------------------------------------------
use TeamSite::Config;
use TeamSite::JavaResourceBundle;
use TeamSite::IW_cfg;
my $iwcfg = TeamSite::IW_cfg->new();
$iwcfg->read();
my $web_host = $iwcfg->lookup('iwwebd', 'host', 'localhost');
(my $iwhome = TeamSite::Config::iwgethome()) =~ tr|\\|/|;
# Load the appropriate resource bundle for this page.
my $iwconfigs = TeamSite::Config::iwgetlocation("iwconfigs");
my $dir = $iwconfigs . "/wft/locale";
my $localizer = TeamSite::JavaResourceBundle->new();
my $propfile = "authorsubmit_" . __VALUE__('iw_locale');
my
@bundle = $localizer->load( $dir, $propfile );
my $group="Micro Approval Workflow to StageMicro Approval Workflow to Production";
my $rfcuser=__VALUE__('iw_user');
my
@rfcid=split(/\\/,$rfcuser);
my $cmpgrp ="Web Producers";
my
@comusr=`iwgroup list-groups -u $rfcid[1]`;
foreach my $usrp(
@comusr){
if($usrp =~ m/$cmpgrp/)
{
$group = "Micro delete Workflow
Micro Publish Workflow to Stage
Micro Publish Workflow to Production";
}
}
my $submit_image = $localizer->format('submit_image');
my $submit_image_label = $localizer->format('submit_image_label');
my $banner_html=<
src="$submit_image" alt="$submit_image_label">
EOS
CGI_info(
title => $localizer->format('page_title'),
error_label_bgcolor => "#EEEEEE" ,
locale => __VALUE__('iw_locale'),
cancel_label => $localizer->format('cancel_button_label') ,
submit_label => $localizer->format('submit_button_label') ,
banner_html => $banner_html,
);
TAG_info( iw_priority =>[html => "HighMediumLow",
label=> "Priority",
is_required => 'true',
],
pagename => [ html => ""."
", label => "Page Name" , ],
);
TAG_info( wftype => [ html => "$group", label => "Workflow Type", ],
);
TAG_info(
# The value of the tag "iw_submit_comment" (obtained from the user)
# will appear as a user variable on the submit task.
# It will also be used as the job's description.
iw_submit_comment =>
[ html => "".
"
",
error_msg => $localizer->format('submit_comment_error_msg'),
label => $localizer->format('submit_comment_label'),
],
);
# 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
@submit_file = map { TeamSite::CGI_lite::escape_html_data($_);
} sort __VALUE__('iw_file');
}
for (my $i=0; $i<
@submit_file; ++$i)
{
TAG_info(
"File_comment_$i" =>
# [ html => $localizer->format('comment_label') .
[ html => "$submit_file[$i]".
# "".
" ",
error_msg => $localizer->format('comment_label_error_msg'),
is_required => 'false',
label => '',
],
);
}
]]>
owner="__TAG__('iw_user');"
creator="__TAG__('iw_user');"
description="__TAG__('iw_submit_comment');">
if (
@submit_file != 0)
{
__INSERT__("\n");
for (my $i=0; $i <
@submit_file; ++$i)
{
__INSERT__("
"comment='__TAG__(File_comment_$i);'/>");
}
__INSERT__("\n");
}
]]> ....................[/html]
In this WF TAG_info is defined for different tags. Can I use only one TAG_info to define all the tags as shown below ? If yes, then whats the reason in using more than ine TAG_info tags ?[html]TAG_info( iw_priority =>[html => "HighMediumLow",
label=> "Priority",
is_required => 'true',
],
pagename => [ html => ""."
", label => "Page Name" , ],
wftype => [ html => "$group", label => "Workflow Type", ],
iw_submit_comment =>
[ html => "".
"
",
error_msg => $localizer->format('submit_comment_error_msg'),
label => $localizer->format('submit_comment_label'),
],
);[/html]
We can use template_script element anywhere in workflow. In this sample code template_script is used outside of workflow element as well as inside workflow element. How does the processing of template_script element work ? When a job is instantiated usong this wft, does all template_script elements get processed first and then workflow is executed or do the template_script elements get processed as per their location in wft ? So in this case, topmost template_script element will get executed first then workflow element will be executed, whatever elements are there before template_script will be executed and then template_script will be executed ?
I am asking this question because in manual I read somewhere that all template_script elements will be executed first and then wft wil be executed. In that case all template_script elements inside and outside of workflow element will be processed first. This does not sound logical and I need to clarify this point.
Thanks