LibraryEASYProcess Reference Manual 5ProcessesServicesCommandLineWorkshopRun

Run Overview

The Run service allows you to run a command using the Windows Command Prompt. This can be used to call a specific Windows function that EASYProcess does not have implemented in another workshop, or to call a program outside of EASYProcess that can be executed through the Command Prompt.

Note: The Run service will run any arbitrary command within the Command Prompt and will not offer any protection against unintended consequences of the commands you try to execute. You should only use this service if you are familiar with Command Prompt and its usage. Also note that several common commands, such as those for creating directories and moving files, are already built in to EASYProcess in the FileSystem workshop. You should check to make sure that the command you are trying to run has not already been implemented elsewhere before using this service.

Run Use Examples
CommandNameThis is the name of the command you wish to execute. In a command prompt window this would be the first word to appear on the line. Examples include "copy", "call", and "del".

WorkingDirectoryThis is the path of the directory you would like to use as your working directory for the command. This means any command you run will run in the context of this path and relative paths will be determined from here. Equivalent of calling "cd" in the command prompt. If this is left blank, the applications Toolset folder is chosen as the default value.

ParametersThis is the container node that contains all the Parameter nodes. It does not accept any input, but you can Right-Click to add new Parameters (Parameter#0, Parameter#1, etc.). Each Parameter below this node is appended to the command prompt command as a parameter.

ParameterThe Parameter is a container node which accepts no input, but represents a single parameter for your command. Each Parameter node is indexed.

ValueThis is the value you would like to include as a parameter for your command. These inputs include both input parameters for the command as well as command line options.

WaitForExitThis input is the time in milliseconds you would like EASYProcess to wait for the command to complete. By default it will wait indefinitely. If the value you enter can't be parsed as an integer, the default functionality will be used.

ErrorThis returns any output from the command that is printed to the standard error stream.
OutputThis returns any output from the command that is printed to the standard out stream.

Run Use Examples

Basic Run Use

Everything you can type as a Windows Run Command (Windows + R), can be entered into the Run service. This is because it is intended to used to run programs.

For example, a “Dir” command can be entered in a Command Prompt window, but not in a Run Command window:

In this example we are going to see the “netstat” as run through the Windows Run Command versus the EASYProcess service.

Netstat Through Run Command

Netstat Through EASYProcess Run Service

Download Multiple Invoices as Zip

In this example, there is a feature on the Open Invoices and Payment page. The user can select invoices and choose to download the PDFs. The process then generates the PDF for all the selected invoices, zips them, then the zip file is downloaded to the user’s computer. After this, there are some clean-up steps which delete the zip and directory created.

Here is the process canvas which is responsible for zipping the files if more than one PDF exists:

If a “WorkingDirectory” is not specified, the application toolset folder (Ex: C:\EASYProcess\[Application]\Toolset) is used as default. This is because this is the directory the Enterprise Service is running from.

This runs the following command:

zip -r -j [ZipFilePath] [Directory]

This assumes there is a zip.exe in the application’s toolset folder which will run.

Here we will use the EASYProcess Run service using the zip.exe mentioned above. We start with the created directory and files.

Here is the Run service configuration.

The working directory is blank, so the default value is the application’s toolset folder. Here you can see the zip.exe exists in this directory:

After running the process in EASYProcess, we can see the service output and the created zipped folder:

Powered by EASYProcess (© 2022 K-Rise Systems, Inc).