DataPower

DataPower

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

How to create error file rename pattern in SFTP poller so that it can contain file name in rename file when it fail?

  • 1.  How to create error file rename pattern in SFTP poller so that it can contain file name in rename file when it fail?

    Posted Sun August 01, 2021 01:52 PM

    When I create a SFTP poller, I use $0.processed.error in error file rename pattern. I noticed following

    1. When the poller finds a matched file e.g. test1.pdf and failed to process it, it will rename it to .pdf.processed.error. Can we get the renamed file contain file name test1 in the renamed file test1.pdf.processed.error ? If we can, what is the right "error file rename pattern"
    2. If the director (or folder) contains many files (e.g. test1.pdf, test2.pdr, test3.pdf) that match file pattern, I noticed that other files (e.g. test2.pdf and test3.pdf) will be changed with temporary names and are no longer processed if a file (e.g. test1.pdf) failed to be processed and renamed to .pdf.processed.error

    Can we have a way to fix these issues?

    Thanks,

    Tang



    #DataPower
    #Support
    #SupportMigration


  • 2.  RE: How to create error file rename pattern in SFTP poller so that it can contain file name in rename file when it fail?

    Posted Tue August 03, 2021 08:05 AM

    Hi Tang,

    $0.processed.error should work. You can affect the content of the variables with Input File Match Pattern but I think $0 should still contain the name of the input file. If you for example look at the var://service/URL-in using probe, what is the input file part of the URL?

    --HP



    #DataPower
    #Support
    #SupportMigration


  • 3.  RE: How to create error file rename pattern in SFTP poller so that it can contain file name in rename file when it fail?

    Posted Fri August 13, 2021 06:58 PM

    Hi HP,

    Sorry, when I used the pattern for a file, say test1.xml

    $0.processed.error

    or

    $1.processed.error

    the DataPower poller could not rename it as below when the poller failed to process it

    test1.xml.processed.error

    or

    test1.processed.error

    why do I want to keep the original file name in it? because when a DataPower poller failed processing file test1.xml, it changed to .processed.error without the original file name in it. In this case, when the poller issue is fixed, I don't need to contact the client for the original file name. I just need to remove .processed.error and let poller to continue to process it.

    Thanks,

    Tang



    #DataPower
    #Support
    #SupportMigration