Automic Workload Automation

  • 1.  Pass Powershell value back to UC4 variable in job

    Posted Mar 14, 2016 04:19 PM
    I am creating a process with Powershell and I need to be able to retrieve values from the variables to set sync objects.  This is an example of what I would like to do.

    $FunctionArray = @() Foreach($Function in $("&FUNCTION_SELECT#" -split(";",""))){    Foreach($Entry in $VaraFunction){       If($Function -contains $Entry){ :        SET &ENTRY# = $Entry :        SET &NA# = SET_SYNC(FHR.SYNC.&ENTRY#, SET_DOWN)       }    } }

    Is there some what of doing this?



  • 2.  Pass Powershell value back to UC4 variable in job

    Posted Mar 14, 2016 05:07 PM
    I am on V9 and the technique I have used is to have PowerShell echo the desired value, and then use a post-process script to scrape the report and use the returned value.

    I have not experimented with it, but I think V11 is supposed to have a better way to accomplish this.


  • 3.  Pass Powershell value back to UC4 variable in job

    Posted Mar 14, 2016 05:11 PM
    We are on Version 11 and that is what we normally do but its a hassle to set all that up and would be very nice if we could just directly use the value.


  • 4.  Pass Powershell value back to UC4 variable in job

    Posted Mar 15, 2016 04:46 AM
    Hi Tyler,

    :REGISTER_VARIABLE is probably what you're looking for :
    http://docs.automic.com/documentation/AE/11.2/english/AE_WEBHELP/help.htm?product=awa#ucsaba.htm

    It basically allows you to get a variable generated in an external interpreter. This feature is an addition to v11. You will need to use it between :BEGIN_EXT_INTERPRETERS and :END_EXT_INTERPRETERS :
    http://docs.automic.com/documentation/AE/11.2/english/AE_WEBHELP/Content/ucsaby.htm

    You will also need to define the interpreter in system variable UC_EXT_INTERPRETER :
    http://docs.automic.com/documentation/AE/11.2/english/AE_WEBHELP/help.htm?product=awa#ucsabx.htm


    Regards,
    Antoine






  • 5.  Pass Powershell value back to UC4 variable in job

    Posted Mar 15, 2016 09:15 AM
    Thanks but we are not on 11.2 yet. Hopefully by May.


  • 6.  Pass Powershell value back to UC4 variable in job

    Posted Jun 06, 2016 04:33 AM
    I put together a short guide with examples of how to use :REGISTER_VARIABLE with Bash, Perl, Python, and PowerShell:
    :REGISTER_VARIABLE — practical examples with Bash, Perl, Python, and PowerShell