Start Subroutine

Verb: beginSub

Starts a subroutine that should be executed during a script.

The purpose of a subroutine is to perform a specific task using a sequence of commands at any time during script execution.


beginSub --name(String)


Script Designer Required AcceptedTypes Description
--name Name Required Text Name that is given to the subroutine.


The Start Subroutine command is used to start a subroutine that is executed twice with the Run Subroutine command.

goSub --label Subroutine
goSub --label Subroutine
// Starts a subroutine that runs twice.
beginSub --name Subroutine
   logMessage --message "Running the subroutine" --type "Info"


Every sub-routine starting with Start Subroutine must end with End subroutine.

To use Start Subroutine in IBM RPA Studio "Designer" mode, you need to press the "New Routine" button located on the routine manager.

All subroutines of a script must be defined at the end of the script in "Script" mode. There should not be comments or other commands after End subroutine, just other subroutines.