Input and Return Types

Configure the Input parameters and Return Types in the Robot definition pane.

Input

Use the Input area in the Robot definition pane to define input parameters in Robots. See Edit Robot for navigation and context-menu options.

When a Robot is called from a Basic Engine Robot or a Management Console, it may be given a list of input values. To access these values, the Robot uses a matching list of input parameters defined in the Input area of the Robot definitions pane.

The number of input parameters must match the number of input values, and their types must match the types of the corresponding values. The input values are bound to the input parameters in order of their appearance.

Inside a Robot, use parameters in an expression.

  • They must be referred by their names, which is similar to using variables.

    Example: If you have the Age input parameter, you can use it as the Age variable.

  • An input parameter cannot be changed by the Robot, and you cannot use it in places where values are assigned to variables, such as in Variable in the Assign step.

Robots with simple type input cannot be run or scheduled to run and can only be called from a Basic Engine Robot.

Add an input

  1. If the Input area is not expanded, click the down arrow caret mark, which changes to an up arrow.

  2. If no definitions exist, click the Add Input button or right-click the context menu to select Add Input.

  3. If definitions exist, use one of the following methods:

    • To add after existing entries, click the green plus sign.

    • To add between existing entries, select the preceding input, then select Add Below to insert the new one.

    • To add at the top of an existing list, place the cursor at the top and select the Add Input option from the context menu.

  4. From the drop-down list, select the input Type.

  5. Name the input and press Enter.

  6. If the Robot is edited in standalone mode, click the Test value caret mark to complete the Test value parameters.

    See Input editors and validation. This field is visible only in standalone mode.

Delete an input

Use the Input area in the Robot definition pane to delete definitions. See Edit Robot for navigation and context-menu options.

To delete an input parameter, right-click the input parameter and click Delete.

Update record type

If you change a type and a robot uses that type for input, you must change the record type value for the input definition.

Use the Update Value context-menu option to update record type values.

The following describes the changes that require you to update a Record value and what the Update Value option does.

  • If you remove a field, the value for the field is removed.

  • If you add a field, the field is added to the record value and is given the default value for the field's type.

  • If you change a field's type, the field's value is changed to the default value for the new type.

Input editors and validation

Each input definition in the Input area of the Robot definitions pane has a Test value.

When you click the caret mark, an editor opens that correlates to the parameter type.

  • The types Integer and Number open a simple text-field editor.

  • Password is a text field, except that the text is obscured.

  • The Boolean value editor is a choice box with two values: True or False.

  • The Text value editor is a resizable text area.

  • The Binary value editor is a custom editor with buttons to copy, paste, clear, and load a value.

    • If the Binary value is recognized as being an image, this is shown in the editor.

    • The editor shows the size of the value and if possible, its MIME type.

  • The Date value editor is a field to enter a date or click the calendar icon to choose a date.

  • The Time value editor is a field to enter a time or click the time icon to set the time to the current time.

  • The DateTime value editor is a combination of the editors for both types Date and Time.

If you create an invalid definition, the editor outlines the incorrect entry in red and displays a red exclamation mark. Roll the pointer over the red exclamation mark to view pop-up text describing the error.

For types of Integer, Number, Date, and Time, if you enter an incorrect value, when you close the editor the value is automatically reverted to what it was before editing.

The remaining types do not produce an error if you enter an incorrect value, except for the special case when changing record type values. See Update record type.

Return Types

Use the Return Types area in the Robot definition pane to define the types of values returned by the robot. See Edit Robot for navigation and context-menu options.

When a Robot is running and the execution reaches a Return step, the Robot may return some values to the Basic Engine Robot that is calling it. Such values are called Return values of the Robot.

When a Robot is called in standalone mode, the return values are ignored.

All Return steps of the Robot must return a list of values that match the number and the type of definitions in the Return Types. Otherwise, errors are shown for the steps that violate this rule.

Add a return type

  1. If the Return Types area is not expanded, click the down arrow, which changes to an up arrow.

  2. If no definitions exist, click the Add Return Type button or right-click the context menu to select Add Return Type.

  3. If definitions exist, use one of the following methods:

    • To add after existing entries, click the green plus sign.

    • To add between existing entries, select the preceding return type, then select Add Below to insert the new one.

    • To add at the top of an existing list, place the pointer at the top and select the Add Return Type option from the context menu.

  4. From the drop-down list, select the return type.

Delete a return type

Use the Return Types area in the Robot definition pane to delete definitions. See Edit Robot for navigation and context-menu options.

In the Return Types area, right-click the Return Types parameter and click Delete.

When you remove a return type, you must also remove the corresponding output value from all Return steps.