We have a requirement where file listener will pick up file from specified location, process it , and in few cases where data duplication is present or parse -xml failed, it will update the file name to name+Dup /Name+Err .
Can this be done in file listener or in service activity?
***Edited by Moderator Marije to change Content Type from Discussion to Question; added capability tags***
@DEBADRITA Yes, you can configure a file listener to handle duplicate files and parse errors. To ignore duplicate file names, select the "Ignore duplicate file names" option in the file listener's Process tab. When a duplicate file is found, the system will bypass normal processing, copy the file to the 'work' directory, and save it with a .dup extension.
For error handling, you can configure the file listener's Error tab. In the Cleanup section, you can choose to rename or delete files with errors. If you select "Rename," files with errors will be moved to the completed subdirectory with the extension specified in the "File extension" field, for example, .err. In case of parse-xml failure, you can handle the error within the service activity by using error handling techniques like try-catch blocks and updating the file name accordingly.