Application methods and Windows forms
Application methods are single-purpose automations that you can create to use in automations, just like any out-of-the-box method. Use application methods when automating common tasks within a single application to make the end-to-end process more efficient.
For example, suppose you need to create a project that involves logging into an application, searching for a customer, and updating the customer's address. These tasks are common and are likely to be used in multiple scenarios. In this case, it's a good idea to create separate application methods for each task and then call them from external automations.
Similar to application methods, you can also create an application form, and only the automations stored alongside the application can use the form and its controls.
In the following image, click the + icons to view details about the organization of a project that uses application methods and forms:
Add an application method
You can add a new application method in the Project Explorer by right-clicking an application to access the Application Method option in the Add menu.
The name on an automation tab indicates that the application method is within the scope of a particular application. For example, the LogIn automation, created in the scope of the BankerInsight application, is called BankerInsight.LogIn.
After adding the application method, Pega Robot Studio includes the application in the Palette. External elements are not available underneath the application, such as:
- Globals
- Other applications
- Automations that are not scoped within the application
For example, an automation developer adds a new application method to the project presented above. In the following image, click the + icons to see the availability of the project elements to application methods:
Visibility of the application method
Application methods are exposed to the rest of the project as methods on the application interface. Application methods have two types of visibility: Public and Private. An application method set to Private is usable only in the scope of an application itself, such as by other application methods. If your application method needs to be available outside of the scope of an application, set the Visibility type to Public. You can change the method visibility setting using the Interface tab of the application.
To use the public application method in the automation, include the application to the Palette, and then drag the main application control to the automation surface, as shown in the following figure:
Move the application method
To move an automation under an application, ensure that you have no dependencies on global components, other applications, or automations. For example, if your automation uses a Microsoft Office connector that is stored in your Globals, Pega Robot Studio notifies you that this operation is not allowed because of dependencies.
Application Windows forms
The automation developer can also create an Application Windows form. To add a Windows form underneath the application, right-click the application name and select Add > Application Windows form.
The Application Windows form is available only in the automation methods Include menu.
Check your knowledge with the following interaction:
This Topic is available in the following Module:
Want to help us improve this content?