Execution Parameters

In addition to the createInputVariable method, the Request contains a number of methods that controls how the robot executes on RoboServer.

setMaxExecutionTime(int seconds) Controls the execution time of the robot. When this time has elapsed the robot will be stopped by RoboServer. The timer doesn't start until the robot begins to execute, so if the robot is queued on RoboServer this is not taken into account.
setStopOnConnectionLost(boolean) When true (default) the robot will stop if RoboServer discovers that the connection to the client application has been lost. You should have a very good reason for setting this value to false - if your code is not written to handle this, your application will not perform as expected.
setStopRobotOnApiException(boolean)

When true (default) the robot will be stopped by RoboServer after the first API exception is raised. By default most steps in a Robot will raise an API exception if the step fails to execute - this is configured on the steps error handling tab.

When set to false, the robot will continue to execute regardless of API exceptions, however unless your application is using the RequestExecutor streaming execution mode, an exception will still be thrown by execute(), so be extremely careful when setting this to false.

setUsername(String), setPassword(String) Sets the RoboServer credentials. RoboServer can be configured to require authentication. When this option is enabled, the client must provide credentials or RoboServer will reject the request.
setRobotLibrary(RobotLibrary) A robot library instructs RoboServer where to find the robot identified in the request. Later examples will explore the various robot library types and when/how to use them.
setExecutionId(String) Allows you to set the executionId for this request. If you don't provide one, RoboServer will generate one automatically. The execution ID is used for logging and also needed if your client needs to be able to stop the robot programmatically. The ID must be globally unique (over time). If two robots use the same execution ID, the logs will be inconsistent.
setProject(String)

This is used solely for logging purposes. The Management Console uses this field to link log messaged to project, so the log views can filter by project.

If your application is not using the RepositoryRobotLibrary you should probably set this value to inform the RoboServer logging system which project (if any) this robot belongs to.

Execution control methods on Request