webMethods

webMethods

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
  • 1.  Duplicate Delete Task in webMethods MFT Post-Processing – Why Is It Executing Twice?

    Posted 26 days ago

    Hi all,

    I'm running into a strange issue in webMethods.io MFT and hoping someone here might have insights or suggestions.

    βœ… My Use Case

    I'm using a post-processing action to move incoming files to multiple cloud locations, and then clean up the original file. My action is triggered by a listener on /PartnerAvfs/incoming/.

    Here's how I've configured the tasks:


    🧩 Post-Processing Action Steps

    1. Find Task

      • Looks for any file in /PartnerAvfs/incoming/

    2. Copy to S3

      • Destination: AWS S3 Virtual Folder

      • File filter: *.*

    3. Copy to Azure Blob

      • Destination: Azure Storage Virtual Folder

      • File filter: *.*

    4. Copy to Google Cloud Storage

      • Destination: GCP Virtual Folder

      • File filter: *.*

    5. Copy to Completed Folder

      • Destination: /PartnerAvfs/completed/

      • File filter: *.*

      • This acts as a signal that all cloud copies have succeeded

    6. Delete from Incoming Folder

      • File filter: *.*

      • This is where the problem shows up

      • πŸ” It appears to execute twice - the first succeeds, the second fails

    7. Send Email (Error Only)

      • If a task fails, an email is sent

    Here's the Action log showing the Delete task executing twice but it fails the second time.

    ❗The Issue

    Even though the Delete task is only defined once, it appears twice in the action log. Here's what happens:

    • First execution: βœ… File is deleted successfully

    • Second execution: ❌ 

      When the checkbox "Execute error task" is checked, the second (failing) execution causes the whole action to be marked as failed - and triggers the email task.

    πŸ›  My Workaround (for now)

    To prevent unnecessary error emails, I've unchecked the "Execute error task" checkbox on the Delete step. Since the first delete works and the file is already gone, I don't need the second one to succeed.

    But the root issue still concerns me - I don't understand why the Delete task is executing twice in the first place.



    ------------------------------
    Wayne Leishman
    ------------------------------


  • 2.  RE: Duplicate Delete Task in webMethods MFT Post-Processing – Why Is It Executing Twice?

    Posted 26 days ago
    Edited by Kailash Kumar Mishra 26 days ago

    Hi @Wayne Leishman,

    Not sure on why the Double Execution behavior of Delete Step you are encountering.

    But if you replace the last Copy Action with Move instead then the Delete Action would not be required.

    But yes this still doesn't answer your actual question pertaining to Delete executing twice.



    ------------------------------
    Kailash Kumar Mishra
    ------------------------------



  • 3.  RE: Duplicate Delete Task in webMethods MFT Post-Processing – Why Is It Executing Twice?

    Posted 26 days ago

    Hi Kailash

    Thanks for the reply. I made the change you suggested, but the behaviour is the same: now the MOVE task is duplicated, and fails on the duplicated move. The funny thing is: my files get copied to my target virtual folders, and the file is moved to the completed virtual folder, but if I look at the logs, it shows me the following and says it failed on the second move. See below.

    I can understand it fails since the file is no longer there but I have no idea what is causing some tasks to be duplicated.

    Also, even though I have the checkbox "Execute error task" checked on the Move task, it does not run my error step (which is a Send email). The action log shows every task completed but failure on the duplicate task.........SO the overall status shows as failed

    If you or anyone else has ideas please let me know.



    ------------------------------
    Wayne Leishman
    ------------------------------



  • 4.  RE: Duplicate Delete Task in webMethods MFT Post-Processing – Why Is It Executing Twice?
    Best Answer

    Posted 25 days ago

    Hi Wayne, 

    From your screenshot I can see that all your tasks seem to be executed twice. 

    My 2 cents: this is a Post-process Action, I guess the trigger criteria is the upload of files into the same folder as the Find task. If this is the case, the file will be added twice to the list of files to be processed. So until you have operation like move or delete task the will be unnoticeable. 


    So if I'm right, removing the Find task should resolve your issue. 

    Mathieu. 



    ------------------------------
    Mathieu Aguesse
    webMethods Delivery Consultant
    IBM France
    ------------------------------



  • 5.  RE: Duplicate Delete Task in webMethods MFT Post-Processing – Why Is It Executing Twice?

    Posted 24 days ago

    Hi Mathieu. I forgot to update my post. I was discussing this issue with a colleague who has done a lot of working with wM MFT. He also suggested removing the Find at the beginning of the Action, since the action's criteria is already passing in the files. So I deleted the First step (Find) and that solved my problem. Lesson learned :)

    Thanks for responding.



    ------------------------------
    Wayne Leishman
    ------------------------------



  • 6.  RE: Duplicate Delete Task in webMethods MFT Post-Processing – Why Is It Executing Twice?

    Posted 24 days ago

    Hi @Wayne Leishman

    When a post process action is executed for a file event, the file already becomes part of the pipeline.
    If we have another Find task in the post process action on the same file location, another instance of the file becomes part of the pipeline.

    This explains the behavior you are seeing.
    Please remove the Find task and see if that helps.

    Regards
    Biswa



    ------------------------------
    Biswajit Bhuyan
    ------------------------------



  • 7.  RE: Duplicate Delete Task in webMethods MFT Post-Processing – Why Is It Executing Twice?

    Posted 24 days ago

    Hi @Wayne Leishman

    When a post processing action is executed for a file event, the file already becomes part of the pipeline.
    Hence, if we have a Find task on the same location, the same file is added to pipeline.
    This explains the duplicate execution of the tasks.

    Please remove the Find task from the post processing event and check if that helps.

    Regards
    Biswa



    ------------------------------
    Biswajit Bhuyan
    ------------------------------



  • 8.  RE: Duplicate Delete Task in webMethods MFT Post-Processing – Why Is It Executing Twice?

    Posted 23 days ago

    This is common problem for new users, because the Action's developer has little visibility of what is happening at runtime. Even when you are experienced with the product, it can be difficult to reason about what files are on the pipeline on a given task step.

    I would be nice if Actions had a debugger or at least a way to do detailed logging of the complete pipeline contents on each task step



    ------------------------------
    Dave Laycock
    ------------------------------



  • 9.  RE: Duplicate Delete Task in webMethods MFT Post-Processing – Why Is It Executing Twice?

    Posted 11 days ago

    Similar problem can occur at any stage with MFT file processing if you are using more than one "Find" action for the same set of files.



    ------------------------------
    Vineet Singh
    ------------------------------