Step-By-Step Guide to Use Trigger to Execute the Automation ProcessLet's create an example to create trigger for the robot to execute the automation request of the automation process workflow, TriggerDemo and view the status of the TriggerDemo process from the JSON output of the robot. Listener API response. TriggerDemo is an automation process workflow published under Demo profile and is designed to write text, This is a demo for Trigger Activity on a notepad file. You must create robot in the Control Tower for the automation process workflow whose trigger needs to be created and the robot must be in the Start state.
1. In the Admin menu, add a WebAPI application. 2. In the Application Properties panel: · In the Login URL field enter the listener REST API base URL. · Select the Type as REST. · Enter the Application Description, Display Name, and the Application Name. 3. Click
the 4. Create a new Load Generator Process. 5. In the Parameter bar, create an In argument, TriggerInput and in the Default Value field enter the text This is demo for Trigger Activity. Create an Out argument, ListenerOuptut to store the Listener API output.
6. From the Canvas Tools panel, add the Trigger Activity to the Flowchart designer on the Canvas. 7. In the Browse for Profile list, select the profile to which the required automation process workflow is mapped. 8. In the Browse for Process list, select the automation process workflow created to enter a text on the notepad. 9. In the Select REST API list, select the added Listener API to which the automation requests must be sent. 10. In the Transaction Expiration (seconds) list, enter 2000 as the expiry time of the automation requests specified in seconds.
11. Click
the 12. In the Map to Parent list, select TriggerInput argument created above.
13. Click CONFIRM. You are directed back to the Trigger activity on the Canvas. 14. Click
the 15. Click Add to align the JSON output received from the Listener API .
16. In the Parameter column, click Select or Add, and then select TriggerOutput argument created above. 17. In the JSON Selector field, enter the JSON query, ['status']. 18. Click CONFIRM to save the mapping.
To view the JSON output in Automation Studio, let's add WriteLine activity. You can assign this process to a robot if you want to execute this process outside Automation Studio. 19. Add a WriteLine activity below the JSON Activity and in the Text field, enter outputstring to print the book details retrieved. 20. Add another WriteLine activity below the Trigger Activity and in the Text field, enter ListenerOutput to print the JSON output from the Listener API in the Output console of automation Studio. 21. Save the process. 22. Setup the environment. The Setup Environment dialog box appears. 23. Enter the login credentials of the Listener API. 24. Click SETUP. Once the environment setup is complete perform the test run.
Watch that the notepad file opens and the text This is a demo for Trigger activity is automatically written on the opened file, as shown below:
The Output console of the Automation Studio displays the JSON output from the Listener API, as shown below:
|
Related Topics |