Automic Workload Automation

  • 1.  SQL script calls another program

    Posted Jun 19, 2018 10:07 AM

    We are migrating from Appworx to One Automation.  One of our SQL scripts (see below) calls an Appworx workflow.  How do we recode it for One Automation?  I have opened a ticket and have been going thru the community board but have not fond anything specific.  Any help would be greatly appreciated.  

     

    Thank you,

     

    Uble Frost

    PLCB

     

    if [ -z "$cyclecount" -o -z "$location" ]; then

             echo "Either location or cycle count not found. Exiting..."

     

    else

     

            echo "Calling Appworx chain for file $file"

     

            ##Call Appworx chain here##

        awrun XXLCB_STKCNT_AUTOMATE_CHAIN $cyclecount $location $file

     

     



  • 2.  Re: SQL script calls another program

    Posted Jun 19, 2018 11:07 AM

    Hi,

     

    There are several options to call an Object in the One Automation as an external command (API, REST, SOAP).

     

    If I interpret your example correctly, you are executing a unix command, so in this case the easiest would be to use the "call api for unix"

     

    https://docs.automic.com/documentation/webhelp/english/AWA/12.1/DOCU/12.1/AWA%20Guides/help.htm#AE_AWA_Source/Integration/ucaadi.htm 

     

    Regards



  • 3.  Re: SQL script calls another program

    Broadcom Employee
    Posted Jun 20, 2018 12:04 AM

    agree to vicja02: use the callapi for Unix/Linux



  • 4.  Re: SQL script calls another program

    Posted Jun 27, 2018 09:57 AM

    Thank you vicja02 and grupe01 for your input.  We are currently testing this in our dev environment.  the information was very helpful



  • 5.  Re: SQL script calls another program

    Posted Jun 27, 2018 01:45 PM

    I like to avoid callapi when I can, to maintain a higher visibility of where an object is called from.

     

    I would consider modifying your SQL statement to return either a "YES" or "NO" value, stick it inside of a SQL variable called "SHOULD.WE.RUN.TASK.X" or something like that, and then query that variable as part of a workflow task precondition rule to decide weather the desired object is either skipped or ran.  For this to work properly you should also make sure the tasks involved have the "generate at runtime" option activated.  Otherwise the SQL query may be executed too soon.