Skip to main content

Windows adapters

Windows adapters

When a developer is ready to add another application to a solution, the developer must first consider the type of adapter that is necessary based on the type of application. The developer should add a new project for each new application required for the solution. Following this construct creates a reusable project for other solutions. One of the most common applications added for a new project is a Windows application.

A developer must understand how a Windows application performs and functions in order to configure the adapter properties for use in the project and the solution. The following adapter properties apply to a Windows application:

  • Path
  • TargetPath
  • HookChildProcesses
  • StartMethod
  • StartOnProjectStart
  • WorkingDirectory
  • Arguments
  • HideApplicationAtRuntime

Path property

Enter the full path in the Path property and the executable file name when the application runs from the same installation folder of the program. The adapter requires the Path property completed. Here is an example:

C:\Windows\System32\notepad.exe

If the application is in the system path, enter the application file name without the full path. Here is an example:

CRM.exe

The Path property does not support links (lnk), wildcards, or Regex text entries. If you are deploying a solution where the target application runs in different folders on the desktops, you can use:

  • Different solution configurations
  • The Folder sub-property under the Path property

The Folder property allows you to select a system folder and file location for the installed application directory.

TargetPath property

The TargetPath property references an application launched as the result of one or more other processes (applications) occurring first. The Path in the TargetPath property refers to the executable that starts the target application.

To use the Path/TargetPath relationship, you must change the StartMethod property from Start to StartAndWait. Using the Path/TargetPath configuration, you cannot interrogate the Path application. You can only interrogate the TargetPath application.

Note: Java-based applications use this configuration often.

HookChildProcesses property

The HookChildProcesses property configures the solution to integrate with an application and any application launched from that application. Set the property to True when:

  • One application starts other applications
  • Both parent and spawned applications are required for the solution

As a result, Pega Robot Studio™ must hook into, or, integrate with, each application process.

StartMethod property

The StartMethod property determines how the Path application starts. Options include:

Option

Description

Start

Tells Pega Robot Studio to launch and hook the application defined by the Path property after the adapter starts. This is the default.

StartAndWait

Tells Pega Robot Studio to launch the application identified in the Path property after the adapter starts, wait for the TargetPath application to launch, and then hook the TargetPath application. Note: Pega Robot Studio does not hook the Path application; thus, you cannot interrogate or automate the Path application.

MonitorAll

Tells Pega Robot Studio to wait for the Path application to run and then hooks the application. In this case, starting the adapter does not cause the Path application to launch. The Path application launches independently after the adapter starts (for example, from an external application, or manually). Once the application launches, Pega Robot Studio hooks the application. When using the MonitorAll, you can omit the full path when specifying the application executable in the Path property and enter the executable file name.

Note: Using MonitorAll lets the adapter to remain running if the Path application shuts down because of an application error or the end-user closing the application. When re-starting the application through an automation or by the end-user, Pega Robot Studio will hook the application.

StartOnProjectStart property

Use the StartOnProjectStart property to start the adapter when the solution or project starts. The default setting for this property is True. The adapter may or may not launch the associated Path or TargetPath applications, depending on the StartMethod property.

If StartOnProjectStart is False, you must start the adapter first in an automation. When you set the StartOnProjectStart property to False, the Path and TargetPath applications do not launch when the project starts, regardless of the associated adapter StartMethod value.

Pega recommends leaving the default setting for those applications required to run when the solution runs. A common usage of this property is to control the login process and application startup time for end-users.

Working directory property

Pega Robot Studio populates this field with the location of the working directory property. In this case, the working directory is the same value as the Path property value. Modify the working directory to point to the supporting installation files when different from the install directory of the executable file.

Arguments

Use the Arguments property to enter command-line arguments required for starting the application associated with the adapter. For example, you could enter the name of a file to launch when the application launches. You can also use this property to specify the Java class names for Java applications.

HideApplicationAtRuntime property

Set the HideApplicationAtRuntime property to true to hide the application during project runtime. To show the application, call the Show method on the adapter. You should use this method sparingly. Instead, develop options such as progress bars or grayed-out applications to notify the user when an automation or process completes.


This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

67% found this content useful

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice