Home Search

DriveWorks Pro 21
Start An Application With Arguments

Send Feedback

Start An Application With Arguments

This Specification Flow Task starts an application and will pass arguments into it on execution.

DriveWorks will pause/ wait while the application is running.

When the Task is executed it will either wait for the application to finish itself, or if the timeout is reached first then the Task will terminate the application.

The Task will execute on the host machine of the DriveWorks application from which it is being run.

For example:

If the Task is triggered from a client connected via DriveWorks Live, the Task will execute and attempt to run the application on the DriveWorks Live server machine.

Any application can be started with this Task, including malicious software.

Please take care to ensure the Task only executes the intended application, particularly when dynamic rules can result in different applications being started.

Properties

Property NameDescription
TitleChanges the Title (not the name) of the task.
ApplicationAn application with which to start a process.
Working DirectoryThe working directory for the process to be started.
ArgumentsA single string containing the arguments to pass to the target application.
TimeoutThe amount of time, in seconds, to wait for the associated process to exit. Set to 0 for no timeout and wait for the application to exit itself.
Redirect OutputSet to TRUE (checked) to redirect the textual output of the target application to the 'Output Data' Data Output of this Task.
Redirect Error OutputSet to TRUE (checked) to redirect the error output of the target application to the 'Error Data' Data Output of this Task.

Example

When this Task is added the properties are static. To be able to build rules on a static property see How To: Change A Static Property To A Dynamic Property.

Property NameRuleMeaning
Applicationpython3.exeWill run the python3.exe
Working DirectoryC:\Python\HelloWorldThe working directory the application is run from.
ArgumentsHelloWorld.pyThe arguments to pass into the application.
Timeout10DriveWorks will continue after 10 seconds unless the application has already exited.
Redirect OutputTrue (checked)DriveWorks will redirect the textual output of the target application to the 'Output Data' Data Output.
Redirect Error OutputTrue (checked)DriveWorks will redirect the error output of the target application to the 'Error Data' Data Output.

Using the Task in a Specification Macro

This task has different types of Outputs. For more information about Outputs see Specification Macros Task Node.

Outputs are only available within Specification Macros. Currently Outputs are not available for Specification Flow.

Data Outputs

The following Data Outputs are available to pass Data from the Task back into the Specification.

See Data Outputs for more information.

  • Output Data - The output stream.
  • Error Data - The error stream.
  • Timeout Aborted - A boolean representing whether the process was aborted due to hitting the timeout before it finished.

If the running of the Task is interrupted and does not complete the data will not be retrieved.

Status Outputs

This task supports Status Outputs. These can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.

The status output navigation is as follows:

Success

  • The application ran and finished within the timeout period.

Success with Warnings

  • N/A - should never be fulfilled.

Failed

  • Application failed to start (for example: the application is not installed).
  • Application did not finish within the timeout period and had to be terminated.