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)
Submitting files
Jeremy
Solaris, TS6.1 SP2
Hi,
We're using a simple Submit workflow that has nothing but a CGI task which does the code for submitting and then displays a message to the user.
If we select a single modified file and click submit it only submits that file.
If we don't select anything and click submit while in a sub-directory, all modified files in that sub-directory and all its sub-directories are submitted. Upon checking the code it looks like any modifed files are automatically attached to the workflow.
What we would like to happen is if the user does not select a file then all files in the entire workarea should be submitted.
My question is, is it possible to distinguish between a user attached file and a file attached by clicking the submit action?
Any RTFM or an idea of coding for this kind of senario would be great.
Thanks,
Jeremy
Find more posts tagged with
Comments
Adam Stoller
** If we don't select anything and click submit while in a sub-directory, all modified files in that sub-directory and all its sub-directories are submitted. Upon checking the code it looks like any modifed files are automatically attached to the workflow.
** What we would like to happen is if the user does not select a file then all files in the entire workarea should be submitted.
Hmm - I wasn't aware that it restricted itself to the currently navigated directory when nothing was submitted.
** My question is, is it possible to distinguish between a user attached file and a file attached by clicking the submit action?
Have you checked the value of iw_file within the WFT in both cases?
Have you checked the value of $task->GetFiles() in the cgitask in both cases?
In the cgitask you *might* be able to check the value of 'vpaths' and 'cwd.vpath' (I think those are the names of the form variables) to see if they're equal. If they are, then I believe no files were pre-selected, if they aren't, then 'vpaths' should contain paths to pre-selected files.
(I don't have time right now to verify the above - these are just thoughts based on various experiences in the past - though the last part comes from custom menu items as opposed to cgitasks in workflows)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Edited by ghoti on 01/23/06 09:14 AM (server time).
Jeremy
Thanks for the response.
Have you checked the value of iw_file within the WFT in both cases?
Yes - in both cases it is the same (shows any modified files in that particular directory as well as attaching directories below that one which has modified files).
Have you checked the value of $task->GetFiles() in the cgitask in both cases?
Yes - in both cases it is the same - no way to distinguish how the file was attached.
In the cgitask you *might* be able to check the value of 'vpaths' and 'cwd.vpath' (I think those are the names of the form variables) to see if they're equal. If they are, then I believe no files were pre-selected, if they aren't, then 'vpaths' should contain paths to pre-selected files.
I check the fom variables in the CGI task by changing it to show_env.cgi. However, there was no vpath field in the output. The only time any of the modified files was shown was in the "IWPROXY_PATHTRACK" variable (COOKIES). Even then it only showed one of the files and not the rest. So it doesn't seem to be showing up in the CGI like that either.
I have tried to figure out how to run an equivalent of the show_env.cgi code within the wft but have been too busy to spend much time on it. If I come back with anything there I'll post if here.
Thanks for the help/idea's.
Jeremy
jbonifaci
You could configure this workflow to be a new_job workflow only. When doing an Action->New Job, only the selected files are attached. Unlike a submit workflow, when no files are selected, no files are attached.
~Jeff