You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defVar --name methodNames --type List --innertype String --parameter
3
+
defVar --name workingDirectory --type String
4
+
//************************************
5
+
//Template for packages
6
+
//- Create routines and this template exposes them as methods.
7
+
//- To understand how to create packages using this template, read https://ibm.github.io/ibm-rpa-cli/#/guide/creating-packages
8
+
//************************************
9
+
//Set the working directory where all local .wal files are located. Always use 'workingDirectory' variable in the 'executeScript' to reference the scripts.
10
+
//- The build process will ignore 'executeScripts' that do not reference local .wal files using 'workingDirectory'.
11
+
//- DO NOT publish or use published scripts in the 'executeScript'. The build process will buil ONE script with all the local referenced dependencies.
12
+
//- Also, this will ensure your dev team only has to change one variable (workingDirectory) to run the project.
13
+
//- If you call an 'executeScript', always pass the 'workingDirectory' variable as a parameter, so you do not need to set in every script.
14
+
//- To store the source code .wal files, use GIT. Do not use the Control Center to store the .wal files.
15
+
setVarIf --variablename "${workingDirectory}" --value "@{workingDirectory}" --left "${workingDirectory}" --operator "Is_Null_Or_Empty" --comment "The build process will inject the correct value for \'workingDirectory\' at runtime."
16
+
#region validating
17
+
case --switches "CaseSwitchesAll"
18
+
when --left "${methodName}" --operator "Is_Null_Or_Empty"
19
+
when --left "${methodNames}" --operator "Is_Empty"
20
+
then
21
+
failTest --message "The parameter \'methodName\' or \'methodNames\' is required and was not specified"
22
+
endCase
23
+
#endregion
24
+
25
+
if --left "${methodName}" --operator "Is_Null_Or_Empty" --negate
assert --message "The method \'${methodName}\' is not defined in ${rpa:scriptName} version ${rpa:scriptVersion}" --left "${rpa:scriptMetadata.Routines}" --operator "Contains" --right "${methodName}"
0 commit comments