November 3rd, 2021 12:00 PM EDT
Automation for Field Services & DistributionNovember 3rd, 2021 12:00 PM EDT
Learn how creating a digital workforce can improve your supply chain processes!

Robot YAML configuration format

Robot YAML format

For a robot.yaml to be valid, it has only two mandatory parts:

  • At least one task defined, and that must have either command, shell or robotTaskName defined.
  • Artifacts output path must be defined.
  # You can define 1..n tasks to a robot.
  # Naming: Think of actions or verbs this robot can perform.
  # Task names given here are visible in Control Room.

  # The task supports three ways of defining the action performed:
  # `command`, `shell` or `robotTaskName`.
  # Below are examples for each.

  User specified task name:
    # 'command': Separates the arguments to a list
    #  that takes care of arguments with spaces.
      - python
      - -m
      - robot
      - --report
      - NONE
      - --outputdir
      - output
      - --logtitle
      - Task log
      - tasks.robot

  User specified task name 2:
    # 'shell': You have to quote items in the command with spaces using "
    shell: python -m robot --report NONE --outputdir output --logtitle "Task log" tasks.robot

  User specified task name 3:
    # 'robotTaskName': Assumes a task with the same name exists in a .robot file.
    robotTaskName: Calculate and log the result

  # A relative path to your environment config file.
  # Defining the conda.yaml file is optional.
  # E.g., if the running environment is preset and you don't need any setup.

  # A relative path to a folder where the artifacts are stored.
  # The contents of this folder will be sent to Control Room.

  # The paths listed here are added to the PATH environment variable
  # for the duration of the execution.
  - .
  # The paths listed here are added to the PYTHONPATH environment variable
  # for the duration of the execution.
  - .
  # A relative path to the .gitignore file that controls what is placed in the
  # robot zip file. This can be used to control what items are not packaged
  # when pushing the robot to Control Room. Defining this is optional.
  - .gitignore

Note that with the robot.yaml you can define:

  • A large robot with multiple Robot Framework tasks or tests and a complex environment.
  • A simple Python robot with some environment requirements.
  • Just a simple executor that runs a known script in a preset environment.

...and everything in between, examples below.


A simple single task robot example

An example where you only have a single Robot Framework file to execute with minimal folder structure and no optional fields:

  Read the Emails:
    shell: python -m robot --report NONE --outputdir output --logtitle "Task log" tasks.robot

condaConfigFile: conda.yaml
artifactsDir: output
  - .
  - .

Full example with multiple tasks

  Read Input Forms:
    robotTaskName: Read Inputs

  Create PDFs:
    robotTaskName: Generate PDF

  Email Customers:
    robotTaskName: Send Emails

condaConfigFile: conda.yaml

artifactsDir: output

  - .gitignore

  - .
  - bin

  - .
  - variables
  - libraries
  - resources

Minimal example

An example, where you only have scripts to execute, you don't need Robot Framework nor any environment setup. In this case, your robot can be just a robot.yaml file and nothing else.

  Trigger start script:
    shell: C:\\my-known-location\\my-trigger-script.bat
artifactsDir: output
  - .
June 28, 2021