Hi,I am using Teamsite6.5. I have a small doubt in the workflow.When i pressed submit button without any files selected.I am able to create workflow.What does this empty workflow do.Is there any way to validate whether user has selected any file or not.Kindly adivseThanks
Is there any way to validate whether user has selected any file or not.
If you want to check the above, then fetch the files attached to the task/job using the function getFiles(); provided in WFTask.pm . something like: @attachedFiles= $job->getFiles();($job is the object created for the corresponding job id)If the above array is empty, it implies that there are no files attached to the workflow and you can flash any error message to the user, using 'die' stmt.-Dixit
@attachedFiles
Actually, unless the behavior has changed at some point and I missed (or forgot about) it, if you don't select any files (and are in CCPro, not sure about CCStd) then TeamSite will look for all modified files within the current directory and its sub-directories, and automatically add them to the workflow as-if they had been pre-selected.
Thanks for the insight, actually i didn't come across this thing. Maybe this condition occurs when you run the Submit workflow after you have listed the modified files in the CCPRO.What happens when a person initiaites a New Content workflow? I had a problem in this. I was trying to initiate a custom written configurable workflow through New Job without selecting a single file and i got an error saying Invalid Workflow couldn't find the vpath. This error didn't appear when i selected a file and then tried to initiate the workflow.-Dixit
The original post talked about the Submit button - and I believe my statement about all modified files being included if nothing is selected is still true.You are now talking about New Job - where yes, if nothing is pre-selected, nothing is added. What you're talking about now is, I believe, covered in [thread=13635]this thread[/thread] - it was a bug that was introduced and subsequently fixed in a patch.