I am trying to run an external task only if certain condition is true otherwise skip this and go to the next one. So I have put this code as you can see below outside my external task but this doesn't work? is this not the right way to do it? Can anyone help me on this?
Thanks
<template_script><![CDATA[
if ($iw_mail eq "yes") {
__INSERT__("<externaltask name="Add Files"
owner="__TAG__('iw_user');"
start="t"
description="Please complete the task">
<areavpath v="__TAG__('iw_workarea');"/>
<successors>
<successorset description="Email Notification">
<succ v="Update Contents"/>
</successorset>
</successors>
<template_script><![CDATA[
if ($iw_send eq "yes") {
__INSERT__(get_cmd("iw_news_final.ipl",
@iw_sendall));
} else {
__INSERT__(get_cmd(""));
};
# insert file list if we have it
$todayDate = currDate();
if (
@submit_file != 0)
{
__INSERT__("<files>\n");
for (my $i=0; $i <
@submit_file; ++$i)
{
__INSERT__("
<file path='$submit_file[$i]' " .
"comment='__TAG__(File_comment_$i);'/>");
__INSERT__(" <file path='Common/global/index.htm' " . "comment=''/>");
}
__INSERT__("</files>\n");
}
]]></template_script>
</externaltask>");
}]]></template_script>