Automic Workload Automation

  • 1.  Attach a file to an e-mail notification

    Posted Jul 23, 2014 09:42 AM

    I am attempting to attach a file to a mail notification under the "Attach file from AutomationEngine" box on the notification tab.  Does it matter where this file is located?  I had it copied to a folder on the server that Automic is running from and calling that path and specific file name but it said "Cannot open attachment file 'P:\Apps\Operations\Project19\Copyjob\test.txt', error code: '3', error description: 'The system cannot find the path specified.'."

    Can anyone help me with better directions on attaching a file to this mail notification?

    Also, is it possible to attach the file that currently went through the workflow without passing the exact name?  Can I put a sourcefile variable or something like that?



  • 2.  Attach a file to an e-mail notification
    Best Answer

    Posted Jul 23, 2014 10:49 AM

    We don’t use the SEND_MAIL function with attached files in our OM-V8 system.  However, I’m going to guess that it has the same restriction as the IMPORT function.  They both have the similar informational caveats though IMPORT is a bit more informative:

    SEND_MAIL – “Indicate the UNC path if you use more than one email Agent. No particular Agent is exclusively responsible for sending emails.”

    IMPORT – “In a distributed UC4 environment (work processes run on different computers) you can not determine on which computer the import will be made. We therefore recommend specifying the UNC path under Windows. Please note that the server should run under an appropriate domain user so that the UNC names can be accessed. For UNIX server, the absolute path must be indicated in UNIX notation. Additionally, the file system needs to be accessible (NFS; mount command) but it is not important on which computer it is located. This is the only way to assure that the required file is used.”

    For the IMPORT that means that if your UC4 System is on a UNIX platform there is no way to pass the host/server to the function so it will know where to find the file.  In our environment we do not have NFS or something like Samba for our system.  Our circumvention is to place a copy of the XML to be imported on all of our work processors before execution of the function; a real pain, but it works.

    Perhaps this is what is happening in your case.

    As far as passing the file name on the function, assuming I understand your question, you can do something like this:

    :SET &sourcefile = "\Apps\Operations\Project19\Copyjob\test.txt" :SET &rc = SEND_MAIL(the_receiver,the_cc,"the subject","the text",&sourcefile)



  • 3.  RE: Attach a file to an e-mail notification

    Posted Jan 05, 2023 05:37 AM
    Hi,

    is there a way that we can attach the recently created file in the folder. 

    correct me if I wrong, the below code while send the test.txt file in the attachments right -

    SET &sourcefile = "\Apps\Operations\Project19\Copyjob\test.txt"
    :SET &rc = SEND_MAIL(the_receiver,the_cc,"the subject","the text",&sourcefile) 

    Regards,
    Shravan Shetty