Reference Guide
...
Privileged Task Automation Man...
Adding a New Script

Design Script Template

5min

The Design Template includes a GUI to design the script:

  1. Log in to the Single Connect Web GUI.
  2. Navigate to Script Designer > Script Builder.
  3. Open the Design Script Template tab.
  4. Fill in the required fields.
Script Builder
Script Builder
ο»Ώ

Screen Inputs

Vendor Type: End device vendor type. Script Name: Script template name. Script Group: Select a script group. Execution Block: Commands to execute. β€œ%” operand should be used to define variables (%command% etc.) Precheck Commands: Commands to execute for precheck. These commands should be added in the Command Template menu Postcheck Commands: Commands to execute for post check. These commands should be added in the Command Template menu

Screen Buttons

Clear: Clears all fields.

Next: Saves the template and moves to next step.

After filling out the required fields, the command is saved by pressing the Next button. When parameters are added to the execution block, the screen below should be edited according to the parameter type:

Script Builder
Script Builder
ο»Ώ

ο»Ώ

Parameter Name: Name of the input parameter Prefix: Name to add to the beginning of the parameter name Postfix: Name to add to the end of the parameter name Parameter Type: Select from:

  • String: Input values will be entered as string format.
  • Integer: Input values will be entered as integer format.
  • Static Combo: Input values will be selected from the pre-defined β€œList Values” field.
  • Dynamic Combo: Input values will be selected from the pre-defined Command field.
  • Boolean: Input values are true and false.

Min. Value: Optional min value Max Value: Optional max value Validate Regex: Optional field for String Validation. List Values: When the parameter type is selected as Static Combo, the desired values should be defined in this area like, β€œ0/1, 0/2, 0/3” Command: When the parameter type is selected as Dynamic Combo, the parameter values are picked from the command template defined as combo evaluation type (Utility>>Command Template)

The next screen is for script output and action formatting :

  1. Click the plus (+) button on the top to create a new output parameter (it will be used in the Workflow Designer).
  2. Click the Edit button on the parameter.
  3. Paste a sample into the Output text field.
  4. Select the desired format actions, then use the Add button to format the output text.
  5. When the actions are ready, use the Format Output button to test them.
  6. If the output is as expected, click Set Script to save the actions to the parameter
  7. Click the Save button to save the script.
Script Template Design
Script Template Design
ο»Ώ
Script Template Design
Script Template Design
ο»Ώ

ο»Ώ

For example, the script in the screen below has an input value. The input value must have been defined by using a β€œ%” operand, like β€œ%input%”. It has precheck commands.

To add a precheck command:

  1. Click the Add New Check button.
  2. Click the search button to list all check commands (Check commands can be created in the Command Template (Utility>Command Template)
  3. Click the Next button. The defined parameter β€œ%listoutput%” is included on the next screen (figure above). The parameter type should be selected on this screen. If Static Combo is selected, List values is a required field, and values must be split with a comma β€œ,”. If Dynamic Combo is selected, Command is a required field, and the commands will be listed wherever they are defined as combo in the command template.
Script Builder
Script Builder
ο»Ώ

The next screen is the output definition screen. To get an output value after the script is run, define it in this screen:

Script Builder
Script Builder
ο»Ώ
  1. Add the output parameter.
  2. The parameter name can be changed.
  3. Click the edit button.
  4. Paste the example output.
  5. Select Format Action and click Add.
  6. Click the Format Output button to control the output value (The actions application is similar to a logical ^(and) operation)
  7. If the value of the actions is correct, click the Set Script button.
  8. Click the Save button.

ο»Ώ