Automic Workload Automation

 View Only
  • 1.  Execution of workflows and passing dynamic properties to it using API

    Posted May 18, 2022 12:26 PM
    Edited by Antony Beeston Jan 24, 2024 03:14 AM

    we have a scenario to execute the automic workflow which has dynamic properties through API. Now , we can able to execute the workflow through API but cant able to pass the dynamic properties for workflow through API.

     

    Example i tried:

    curl -D- -u   -d '{ "object_name": "RM.DEV.TEST", "execution_option": "execute"}, "inputs":{ "LANKA#": "{12233}" } }' -H "Content-Type: application/son" -X POST http://hostname:8088/ae/api/v1/200/executions



  • 2.  RE: Execution of workflows and passing dynamic properties to it using API

    Posted May 20, 2022 10:49 AM

    I use a powershell method for this interaction, but we pass multiple values to a SCRI object as the initial object called.  We also have a prompset attached to the script object that matched the variables we are passing, although that's not necessary if you have a READ to pull the variables from the buffer.  You'll still have to set up a PUBLISH or a PSET I believe to pass them on to any activated objects, or set the activated object up to look at the activator and GET_PUBLISHED_VALUE. 

    https://docs.automic.com/documentation/webhelp/english/AA/21.0/DOCU/21.0/Automic%20Automation%20Guides/Content/Script/Reference/READ.htm?Highlight=READ

    https://docs.automic.com/documentation/webhelp/english/AA/21.0/DOCU/21.0/Automic%20Automation%20Guides/Content/Script/Reference/GET_PUBLISHED_VALUE.htm?Highlight=GET_PUBLISHED

    Invoke-RestMethod -Uri $RUNURL -Method POST -Body $CSVFILE -Headers $HEADERS;

    Invoke-RestMethod -Uri http://AutomationServer:8088/ae/api/v1/200/executions -Method POST -Body {"inputs":{ "execution_option":"execute", "var01#":"SBN", "var02#":"Some Business Name", "var04#":"Thursday, May 19, 2022", "var06#":"223408", "var07#":"\\\\Server\\ftp\\SBN\\Outbound\\Analytics\\SBN FileName 20220519222136.xlsx", "var08#":"SBN FileName 20220519222136.xlsx", "var09#":"127.0.0.1", "var10#":"8067", "var03#":"162729.csv", "var05#":"E:\\AIMS\\logs\\162729.csv", "var11#":"Server01.OURDOMAIN.COM", "var12#":"402"}, "object_name":"MFT.AIMS.INBOUND.SCRI.FILE_PROCESSING"} -Headers System.Collections.Hashtable




  • 3.  RE: Execution of workflows and passing dynamic properties to it using API

    Broadcom Employee
    Posted May 20, 2022 12:35 PM
    Hi Venkat

    This works for me for AE-workflows that has a Promptset with two entry fields (URL, Name).

    Windows
    curl --location --request POST http://myAEserver.local:8088/ae/api/v1/100/executions -u USR/GRP:xxx --header "Content-Type: application/json" --data-raw "{ ""object_name"": ""MY.JOBP"", ""execution_option"": ""execute"", ""inputs"": { ""URL#"": ""http://www.broadcom.com"", ""NAME#"":""Windows"" } }"

    Linux
    curl --location --request POST 'http://myAEserver.local:8088/ae/api/v1/100/executions' -u USR/GRP:xxx --header 'Content-Type: application/json' --data-raw '{ "object_name": "MY.JOBP", "execution_option": "execute", "inputs": { "URL#": "http://www.broadcom.com", "NAME#":"Unix", } }'


  • 4.  RE: Execution of workflows and passing dynamic properties to it using API

    Broadcom Employee
    Posted May 23, 2022 09:30 AM
    Hi @Venkat Lanka

    This works for me for AE-workflows

    Windows
    curl --location --request POST http://myAEserver.local:8088/ae/api/v1/100/executions -u USR/GRP:xxx --header "Content-Type: application/json" --data-raw "{ ""object_name"": ""MY.JOBP"", ""execution_option"": ""execute"", ""inputs"": { ""URL#"": ""http://www.broadcom.com"", ""NAME#"":""Windows"" } }"

    Unix/Linux
    curl --location --request POST 'http://myAEserver.local:8088/ae/api/v1/100/executions' -u USR/GRP:xxx --header 'Content-Type: application/json' --data-raw '{ "object_name": "MY.JOBP", "execution_option": "execute", "inputs": { "URL#": "http://www.broadcom.com", "NAME#":"Unix" } }'