How were you able to do it through .wft workflows?
my $file_vpath = $current_workarea_vpath.$file;my $file_jobs = `$iwhome/bin/iwgetfilejobs $file_vpath`;if ($file_jobs =~ m/job=/) { # file is already attached to another workflow job $existing_wf_files .= "\t<li>$file</li>\n";}
if ($existing_wf_files) { $error_message .= "<p>The following files have already been submitted and are <strong style='color: #C00;'>attached to another workflow</strong>.<br> Please deselect these files and try again.</p> <ul>\n$existing_wf_files</ul>\n";}
$error_message
if ($error_message) { $error_message .= "<p><strong>This workflow has been cancelled.</strong></p>\n"; my $message = TeamSite::CGI_lite::escape_html_data($error_message); # encode entities so we can use this as XML attribute value $start_task_code = << "END CODE";<!-- ============================================================ --><!-- ============= 1. Give error message to author ============== --> <cgitask owner="$author" name="workflow_warning" start="t" description="Notify author of problem with selected files." immediate="t"> <areavpath v="$current_workarea_vpath"/> <successors> <successorset description="End Workflow"> <succ v="end"/> </successorset> </successors> <command v="wf_user_notification.ipl"/> <variables> <variable key="message" value="$message"/> <variable key="message_title" value="Workflow Warning"/> <variable key="comment" value="User given warning about selected files."/> </variables> </cgitask>END CODE} else { $wf_variables_code = << "END VAR CODE"; <variables> <variable key="approver_info" value="$approver_info"/> <variable key="workflow_type" value="$workflow_type"/> <variable key="iw_branch" value="$current_branch_vpath"/> </variables>END VAR CODE $start_task_code = << "END CODE";<!-- ============================================================ --><!-- ==================== 1. Reassure author ==================== --> <cgitask owner="$author" name="reassure_author" start="t" description="Let author know their files have been successfully submitted." immediate="t"> <areavpath v="$current_workarea_vpath"/> <successors> <successorset description="Done"> <succ v="lock_wf_files"/> </successorset> </successors> <command v="wf_user_notification.ipl"/> <files>$wf_files </files> <variables> <variable key="message" value="$reassure_message"/> <variable key="message_title" value="Files successfully submitted"/> <variable key="comment" value="Author reassured that workflow has started."/> </variables> </cgitask>END CODE}