Design a Bot Using Sub Process

This tutorial shows you how to design a simple bot that encapsulates logically related steps with process flow.

Background

You use the activities available in other automation activities set with the sub process activity.

Prerequisites

  • Access to ASG Studio Manager.
  • Check the availability of Google Chrome and notepad applications on your computer.

Design the Bot

In this section, you design the RPA Model for performing the sub process activity.

  1. Launch ASG-Studio.
  2. Create an RPA Model. See Create and Design RPA Model.
    Alternatively, you can open an existing RPA Model. If you are using an existing RPA Model click Clear in the Element Toolbar to remove any activities that have been previously added to the visual designer.
  3. In the visual designer, drag Start Event from the element toolbar and drop it on the visual designer. Keep the default activity name.
  4. In the Activities panel area, expand Web Automation, then drag the following activities and drop them onto the visual designer. To connect the activity shapes, select the first activity shape, click and hold the Sequence Flow or Association arrow icon, drag the arrow to the second shape, and then click the second activity shape.

    Sub-Folder

    Action Name

    Name

    Other Properties

    Connect From

    Connect To

    Generic Actions

    Open Browser

    Open Chrome

    • Instance Name: test
    • Choose Browser: (Select) Chrome
    • Instance Tracking: (Select) Forget Instance
    • Window State: (Select) Maximize

    Start

    Open Chrome

    Generic Actions

    Navigate To URL

    Navigate to Google Docs

    • Instance Name: test
    • Enter URL: https://docs.google.com/forms/d/e/1FAIpQLSfJCGTFrmBSE8auohxMgoD4P9L3Ds-IFiUz349EwCDC97d3OQ/viewform

    Open Chrome

    Navigate to Google Docs

  5. Sub Process from the element toolbar and drop it on the visual designer.
    • Select the sub process activity shape and click Type, then click IF Command.
    • Keep the default activity name.
    The name of the sub process is automatically changed to Conditional Task.
  6. Select the If Command shape and specify the following:
    • Keep the default activity name.
    • Type of If Command: (Select) Web Element Exists.
    • Instance Name: test.
    • Element Search Method: (Select) Find Element By XPath.
    • Element Search Parameter: //div[@class='quantumWizTogglePapercheckboxInnerBox exportInnerBox']
  7. Expand Desktop Application, then Generic Actions, then drag and drop Open Application inside the sub process box.
    • Keep the default activity name.
    • Action Name/Path: notepad.
  8. Connect If Command to Open Application. Select the connector and do the following:
    • Keep the default name.
    • Select Command: (Select) False.
  9. Expand Web Automation, then UI Actions, drag and drop Web Element Action inside the sub process box.
    • Keep the default activity name.
    • Instance Name: test.
    • Element Search Type: (Select) Find Element By XPath.
    • Search Parameter: //div[@class='quantumWizTogglePapercheckboxInnerBox exportInnerBox']
    • Element Action: (Select) Left Click.
  10. Connect If Command to Web Element Action. Select the connector and do the following:
    • Keep the default name.
    • Select Command: (Select) True.
  11. Expand Common, then Misc Actions, drag and drop Set Test inside the sub process box.
    • Keep the default activity name.
    • Enter text to send: The element you are looking not found.

    Connect Open Application to Set Text.

  12. Drag End Event from the element toolbar and drop it on the visual designer. Keep the default activity name. Connect Conditional Task to End Event.
  13. In the Element Toolbar of the visual designer, click Run to execute the RPA Model.
    • When the RPA Model execution is completed, a success message is displayed, and the particular element is clicked in the browser.