March 15, 2010 at 9:18 am
Inside a for each file loop I have a file system task that renames a file before processing. On occasion there is an external process that has a lock on this file. I simply want to move on to the next file without an error being raised.
I can set up a precedence constraint for failure but where does this go?
Like I said I don't want to raise an error but can't force success or the following tasks fail since the file has not been renamed.
I could script it and handle the error in a try catch but I'm thinking there is a very simple way to handle this. Any thoughts?
March 15, 2010 at 1:20 pm
Resolution:
Added a script task in the OnError event handler for the File System Task that sets a variable to indicate that the file should be skipped. Then it sets the value of the Propagate system variable to false to prevent the error from propagating to the parent container.
Set a precedence constraint formula after the rename task to only continue if the Skip File variable was false. Also added a script task to the pre-execute event to set my Skip File variable back to false.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply