Abbreviations, used in the manual:
RDA - Reference Data Admin
RDAD - RDA Designer
FW - Form Wizard
This manual will guide you on how to create a Script of type "Command line".
Basically, this type of Script allows to interact with a computer or operating system by implementing commands into quilliup's UI, the same as opening a terminal in your computer.
This type of Script allows to implement almost all the CMD commands.
For example:
Command:
cmd /c echo "hello quilliup"
In order to create Script of type "Command line", follow the next steps:
1. In the RDAD module, in the left side menu, under specific Project, go to the “Scripts” component:
Click “Add Script” button:
2. Fill in all required fields:
- Name - Script`s name.
- Description - describe the Script purpose.
- Script Type - one of the predefined options can be chosen. In our case we'll choose "Command Line":
- Return type (*Optional) - chose "Success" or "Failure":
Success return type - if "Return type (*Optional)" is set to "Success" and the return value equals to the Script's result, a successful message will appear and will enable the Scriptable Button in FW.
If the return value is not equal to the Script's result, a failure message will appear and will disable the Scriptable Button in FW.
Failure return type - if "Return type (*Optional)" is set to "Failure" and the return value equals to the Script's result, a failure message will appear and will disable the Scriptable Button in FW.
- Success Message - this message will be returned in case of successful Script termination.
- Error Message - this message will be returned in case of the Script's failure.
-
Success Message & Error Message will be added to the returned value in case of using "Return Type" & "Return Value";
For example:
Refresh Main Grid On Execute - when set to be true => the FW's Main Grid will be refreshed after the Script's run.
Script code - insert your command.
Use Form Variable - when set to be true => the chosen variable name will be inserted to the end of the command line. When running such Script from FW, the chosen variable name and value(s) will be added automatically to the Script's command.
Kindly follow the next steps to run a script from a FW using a Variable that has been set up in QG:
1. Define variables in QG
2. Create a FW in RDA
3. Add a script in RDA, use form variables and use the defined variable as specified in the current manual.
4. Add a Scriptable button to the FW. Use the following manual for more info: Scriptable Buttons
For example: Selecting a first_name value from the column would run the script that is defined for the Scriptable Button 'VARIABLE string' as seen in the image below.
The chosen 'first_name' value will be inserted to the following script as the variable @AA_variable_string;, the script executes a test using the value that was chosen in the FW.
Send variable value as one string - allows to use multiple variable values as one string rather than a list of strings, when running the Script from FW.
- when check box is unmarked => script receives variable(s) in format 'val_1','val_2','val_3';
- when check box is marked => script receives variable(s) in format 'val_1,val_2,val_3';
Many values can be added when pressing the Scriptable Button in the FW, as seen in the image below:
In order to keep the right URL parameters in the different environments, it's possible to use quilliup System variables as shown in the next command example:
"C:\Program Files\quilliup\webapps\ROOT\utils\run_qp.exe" -u "@quilliupServerProtocol;://@quilliupServerIp;:@quilliupServerPort;" -a "YWRtaW5AUUE6YWRtaW4=" -t "2975079" -d
Available System Variables:
@quilliupServerProtocol; - quilliup server protocol set in config.properties file (http/https).
@quilliupServerIp; - quilliup server IP address set in config.properties file.
@quilliupServerPort; - quilliup server port value set in config.properties file.
In addition, the Command-Line script allows also to run "run_qp command".
For example:
please refer to the manual below, for more details about remotely triggering QG module entities (EFs, Tests, etc.).
Comments
0 comments
Please sign in to leave a comment.