Automic Workload Automation

 View Only
Expand all | Collapse all

ONE Automation monitor file exist

  • 1.  ONE Automation monitor file exist

    Posted Oct 15, 2019 12:31 PM
    Hi guys,
        I need to know when a file is present in a directory and send an email; any suggestions on the best way to do it?
    Regards
    Daniele 


    ------------------------------
    Daniele

    ------------------------------


  • 2.  RE: ONE Automation monitor file exist

    Posted Oct 15, 2019 01:23 PM
    Hi

    the one and only best way does not exist.

    There are several possibilitis with some pros and cons dependent on your environment, implementation and usage of the AE.

    You can use 
    • EVNT.FILE + CALL object (specific for this case)
    • EVNT.TIME + Script + Config VARA (generic) as Filetrigger
    • SCHEDULE + OS JOB (specific) if its only one occurrence
    • ...
    • ...
    • or any combination of the above mentioned

    A more detailed description of the use case would be helpful, if you want more specific suggestions.

    cheers, Wolfgang


    ------------------------------
    I know I do really know it!
    ------------------------------



  • 3.  RE: ONE Automation monitor file exist

    Posted Oct 16, 2019 03:20 AM
    Hi Wolfgang,
          thank you for information. Sorry about my request but I'm a gnubbo about One Automation. So, i'm interested to  "EVNT.FILE + CALL object (specific for this case)"; where do I read infromation or example to build this solution?
    Regards
    Daniele


    ------------------------------
    Employee
    Postevita
    ------------------------------



  • 4.  RE: ONE Automation monitor file exist

    Posted Oct 21, 2019 03:55 AM
    Edited by Tim Quakulinsky Oct 21, 2019 03:57 AM
    Hi Daniele,

    you will find information to build this solution in the searchable documentation:

    File Event: https://docs.automic.com/documentation/webhelp/english/AA/12.3/DOCU/12.3/Automic%20Automation%20Guides/help.htm#AWA/Objects/obj_Event_DefiningFILE.htm
    Notification (CALL): https://docs.automic.com/documentation/webhelp/english/AA/12.3/DOCU/12.3/Automic%20Automation%20Guides/help.htm#AWA/Objects/obj_notifications.htm

    In the documenation for older versions, e.g. 11.2, there are also a few examples. On of them regarding "Notification with variable message text".

    Kind regards,
    Tim

    *** EDIT: I did not see the ongoing conversation with Wolfgang. Please ignore this entry. ***

    ------------------------------
    Automation Evangelist
    Fiducia & GAD IT AG
    ---
    Mitglied des deutschsprachigen Automic-Anwendervereins FOKUS e.V.
    Member of the German speaking Automic user association FOKUS e.V.
    ------------------------------



  • 5.  RE: ONE Automation monitor file exist

    Posted Oct 15, 2019 07:16 PM
    Just one of dozens of ways;

    We have a reusable UC4 object that runs these windows commands;
          if exist &filelocation# exit 0
          if not exist &filelocation# exit 1
    The workflow post-condition rule for this utility then checks the return code and takes appropriate action.

    ------------------------------
    Pete
    ------------------------------



  • 6.  RE: ONE Automation monitor file exist

    Posted Oct 15, 2019 07:20 PM
    You can also check to see if a file exists or not in a workflow task precondition rule.   But this check is done from the AE server, which may have different priviledges and may not be allowed to access the target folder.

    ------------------------------
    Pete
    ------------------------------



  • 7.  RE: ONE Automation monitor file exist

    Posted Oct 16, 2019 03:26 AM
    Hi Pete,
         thank you about your information. I think to use Wolfgang solution with EVNT.FILE + CALL object (specific for this case).
    I'll share the output and impression at the end.
    Regards
    Daniele


    ------------------------------
    Employee
    Postevita
    ------------------------------



  • 8.  RE: ONE Automation monitor file exist
    Best Answer

    Posted Oct 16, 2019 03:45 AM
    Hi

    a second step is the documentation:
    https://docs.automic.com/documentation/webhelp/english/AA/12.3/DOCU/12.3/Automic%20Automation%20Guides/help.htm#Script/Reference/Overview/Scripts_by_Purpose.htm%3FTocPath%3DReference%7CAutomation%2520Engine%2520Script%2520Reference%7CScript%2520Elements%2520Ordered%2520by%2520Purpose%7C_____0

    first step would be attending a training from automic (in old ages it was called Basics 1 and 2, Admin training and Script training)

    If you let me know your AE Version I can look in my UC4 toolbox if I have a simple example for you.

    cheers, Wolfgang

    ------------------------------
    I know I do really know it!
    ------------------------------



  • 9.  RE: ONE Automation monitor file exist

    Posted Oct 16, 2019 05:56 AM
    Hi Wolfgang,
         thank you very much about this; my version is 12.2.2.
    Regards
    Daniele

    ------------------------------
    Employee
    Postevita
    ------------------------------



  • 10.  RE: ONE Automation monitor file exist

    Posted Oct 17, 2019 03:30 AM
      |   view attached
    Buenos Morgos,

    sry was a bit distracted by a UC4 PROD Upgrade via ZDU :-)

    pls find enclosed a simple example for a filewatcher with EVNT.FILE + CALL object.
    enter the parameters into the VARA (Caption (can be chosen freely-must be entered into EVNT), Agent, login, filename, Object that should be started, notification email) and start the EVNT.


    the evnt runs until the first hit occurs.

    have fun.

    cheers, Wolfgang


    ------------------------------
    I know I do really know it!
    ------------------------------

    Attachment(s)

    xml
    V112_COMM_filewatcher.xml   8 KB 1 version


  • 11.  RE: ONE Automation monitor file exist

    Posted Oct 17, 2019 03:32 AM
    Edited by Frank Muffke Oct 17, 2019 03:31 AM
    ah I forgot to mention, theres no errorhandling or plausibility check for filename, email, etc.... implemented at the moment.

    ------------------------------
    I know I do really know it!
    ------------------------------