The Run action is used to start an application or open a document. This includes the option to open a console application and to capture the output to a variable or file.
The step can be set to wait until the application is ready for input, wait until it completes, or not wait at all. You can populate variables or a dataset with data from the window or process. Any variables used must be created in earlier steps using the Create Variable action.
To set Run properties
From the Workflow Builder Available Actions pane, open the System folder and double-click the Run action or drag it into the Steps pane.
In the General tab, use one of the following ways to select the program or document to run:
Click the Start button, point to Programs or Settings and select the program to run.
Click the Open Folder button, and navigate to the program or document.
Type the path and file name into the Run box.
If you want the program to open only if not already open, select Run only if another instance is not running.
If the window will not be in its normal state when the step runs, select the applicable window state in the Initial window state box.
If your system requires a startup folder, click the Open Folder button next to the Startup folder box, and navigate to the startup folder. This is for legacy applications that require a startup folder. For most applications it can be left blank and the folder that the application resides in will be used.
Click the Wait tab and make your selections according to the following guidelines:
Do not wait: the Workflow goes immediately to the next step.
Wait until application is ready for input: the next Workflow step will not run until the application is open and ready. This is the default setting. To populate a variable with the process ID, select the check box and then select the variable in the box below.
Wait until application ends: the next Workflow step will not run until the application closes. To populate a variable with the return code, select the check box and then select the variable in the box below.
Click the Data tab and make your selections according to the following guidelines:
The check boxes, Populate variable with window class, Populate variable with window handle, and Populate variable with window title are available only if Wait until application is ready for input is selected in the Wait tab. Use the check boxes to select the desired options and then select the variables to populate.
To
populate a dataset with the application data, select Create and
populate dataset, and then enter a
name for the dataset in the box below. (Dataset names must be alphanumeric,
begin with a letter, and contain no spaces.)
The dataset will show the title, class, and handle for the window
as well as the process ID and return code for the process.
If you want the application to run as a document or as a console application, click the Advanced tab and make your selection in the Run application as box. (By default, the application runs as a standard Windows application.)
For console application, if you want to capture the output to a variable or file, enter the properties as follows:
To populate a variable, select Capture output and populate variable, and then select the variable in the box below.
To write the output to a file, select Capture output and write to file. Then click the Open Folder button, navigate to the file location, and enter the file name. If you want to overwrite any existing file, select Overwrite if file already exists.
If you want to use a custom description, click the Description tab, select Use custom step description, and type the description. This description will display in the Steps pane in place of the default description.
To set error handling, refer to Step Error Handling.
Click OK when finished.