Managing Scripts: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Managing Scripts ==
Manage Scripts dialog shows all scripts accessible to the user based on context selections defined by the '''Context''', '''Selected User''', '''Selected Project''' and '''Selected Model''' dropdown menu.
'''Manage Scripts''' dialog is used for managing scripts. Scripts are tied to specific contexts, and the Manage Scripts dialog shows all the scripts accessible to the user based on context selections defined by the '''Context''', '''Selected User''', '''Selected Project''' and '''Selected Model''' dropdown menus. The list of scripts accessible via the '''Run''' button on the ribbon will show the scripts for the context that was last selected in the Manage Scripts dialog.
 
== Scripts List==
The scripts list is accessible via the '''Run''' button on the ribbon will show the scripts for the context that was last selected in the Manage Scripts dialog.


By default, the following information is displayed for each script:
By default, the following information is displayed for each script:
Line 13: Line 15:
*'''Help''': the URL of the defined help page for the script.
*'''Help''': the URL of the defined help page for the script.


In addition, the following columns are hidden by default:
In addition, the following columns are available but hidden by default:
*'''Id''': the id of the script in the database.
*'''Id''': the id of the script in the database.
*'''Model Id''': the id of the model to which the script is linked.
*'''Model Id''': the id of the model to which the script is linked.
Line 21: Line 23:
*'''Script GUID''': the globally unique id of the script.
*'''Script GUID''': the globally unique id of the script.
*'''User Id''': the id of the user to which the script is linked.
*'''User Id''': the id of the user to which the script is linked.
To unhide a column:
#Right click a column title and select '''Column Chooser''' from the popup.
#Drag the column to be shown to the desired position.


You can get the same information related to scripts as listed above if you run a script with the --#GetAnalysis command in the Manage Scripts dialog using Script Report (24) as the analysis type. For more information, see [[Data Extraction, Transformation, and Loading]].
To unhide a column, right click a column title, select '''Column Chooser''' from the popup and drag the column to be shown to the desired position.


=== Viewing or Editing Script Properties ===
== Script Properties ==
To view or edit the script properties of a script, select the script from the list and click '''Properties'''
The '''Script Properties''' dialog is used to view and edit a script properties:
* '''Name''': name of the script.
* '''Script GUID''': globally unique id of the script.
* '''Support Link''': URL of a help page for the script.
* '''Group''': name of the script group.
* '''Tags''': text tags added to the script.
* '''Description''': description of the script.
* '''Script Code''': the actual [[Data Extraction, Transformation, and Loading|program code]] of the script that is to be executed. If the script code starts with the word '''ENCRYPTED''', the script contents is visible in an encrypted format only. For more information, see [[QPR ProcessAnalyzer Script Encryption|Script Encryption]].
* '''Show in Script Gallery''': When selected, the script will be shown in the menu that opens by clicking the '''Run''' button in the ribbon.
* '''Hide Script Details''': When selected, only users who have rights to modify the script can see the script code and other details. When unselected, all users who have view permissions can see the script code and other details.


=== Running a Script ===
==Managing Scripts==
To run a script, select it from the list and click '''Run'''. Alternatively, you can run a script by clicking '''Run''' on the ribbon and selecting the script to be run from the menu that opens.
* To view or edit the script properties of a script, select the script from the list and click '''Properties'''.
* To run a script, select it from the list and click '''Run'''. Alternatively, you can run a script by clicking '''Run''' on the ribbon and selecting the script to be run from the menu that opens.
* To create a new script, click '''New''' and define properties for the new script.
* To delete a script, select it in the list and click '''Delete'''. You can also delete several scripts at the same time by selecting them all.
* After making changes to the script properties, click '''Save''' to save the changes. You can also press '''Ctrl + S''' to save the changes.
* To discard changes done since the script was last saved, click '''Cancel Edit'''.


=== Creating a New Script ===
==Script Run Log==
To create a new script, click '''New''' and define the [[#Script Properties|Script Properties]].
When a script is run, a log about the script run progress is written to a '''Script Log'''. The Script Log also contains information about the previous script runs. For example, the log contains the output of the '''[[QPR_ProcessAnalyzer_Scripting_Commands#--.23WriteLog|WriteLog]]''' and '''Print''' commands used in the script, as well as details about possible errors. After a script execution has finished, the Script Log can be seen when clicking the '''Show Details''' button in script run dialog.


=== Copying Scripts to Another Context ===
[[File:Script_log.png]]
#Select the script(s) you want to copy from the list by left-clicking a script. To select multiple scripts hold down either the Shift key or the Ctrl key.
#Click '''Copy to Clipboard'''.
#From the Context and the Selected User/Selected Project/Selected Model drop-down menus, select the context to which you want to copy the script(s).
#Click '''Create from Clipboard'''.
Note that there cannot be duplicated global ID's (= the identifier in the '''Script GUID''' field) in the same context. If there are multiple scripts with the same global ID, you will receive an error message and the script is not copied.
 
=== Deleting Scripts ===
To delete script(s), select them from the list and click '''Delete'''.
 
== Script Properties ==
The Script Properties dialog is used to view and edit the script properties:
*'''Name''': the name of the script.
*'''Script GUID''': the globally unique id of the script.
*'''Support Link''': the URL of the help page for the script.
*'''Group''': the name of the script group.
*'''Tags''': the tags added to the script.
*'''Description''': the description of the script.
*'''Script Code''': the actual [[Data Extraction, Transformation, and Loading|script]] that is to be run. If the script code starts with the text "ENCRYPTED", the script contents are visible in an encrypted format only. For more information, see [[Script Encryption]].
*'''Show in Script Gallery''': when this is selected, the script will be shown in the menu that opens by clicking the Run button in the ribbon.
*'''Hide Script Details''': when this is selected, only users who have the right to modify the script can see the script details, when unselected, all users who have view permissions can see the script details.


=== Saving or Discarding Changes ===
[[Category: QPR ProcessAnalyzer]]
*After making changes to the script properties, click '''Save''' to save the changes. You can also press '''Ctrl + S''' to save the changes.
*To discard changes done since the script was last saved, click '''Cancel Edit'''.

Revision as of 20:38, 11 January 2021

Manage Scripts dialog shows all scripts accessible to the user based on context selections defined by the Context, Selected User, Selected Project and Selected Model dropdown menu.

Scripts List

The scripts list is accessible via the Run button on the ribbon will show the scripts for the context that was last selected in the Manage Scripts dialog.

By default, the following information is displayed for each script:

  • Context Type: the context to which the script is tied.
  • Name: the name of the script.
  • Group: the name of the script group.
  • Tags: the tags added to the script.
  • Created On: the date and time when the script was created.
  • Created By: the user who created the script.
  • Last Modified On: the date and time when the script was last modified.
  • Last Modified By: the user who last modified the script.
  • Help: the URL of the defined help page for the script.

In addition, the following columns are available but hidden by default:

  • Id: the id of the script in the database.
  • Model Id: the id of the model to which the script is linked.
  • Model Name: the name of the model to which the script is linked.
  • Project Id: the id of the project to which the script is linked.
  • Project Name: the name of the project to which the script is linked.
  • Script GUID: the globally unique id of the script.
  • User Id: the id of the user to which the script is linked.

To unhide a column, right click a column title, select Column Chooser from the popup and drag the column to be shown to the desired position.

Script Properties

The Script Properties dialog is used to view and edit a script properties:

  • Name: name of the script.
  • Script GUID: globally unique id of the script.
  • Support Link: URL of a help page for the script.
  • Group: name of the script group.
  • Tags: text tags added to the script.
  • Description: description of the script.
  • Script Code: the actual program code of the script that is to be executed. If the script code starts with the word ENCRYPTED, the script contents is visible in an encrypted format only. For more information, see Script Encryption.
  • Show in Script Gallery: When selected, the script will be shown in the menu that opens by clicking the Run button in the ribbon.
  • Hide Script Details: When selected, only users who have rights to modify the script can see the script code and other details. When unselected, all users who have view permissions can see the script code and other details.

Managing Scripts

  • To view or edit the script properties of a script, select the script from the list and click Properties.
  • To run a script, select it from the list and click Run. Alternatively, you can run a script by clicking Run on the ribbon and selecting the script to be run from the menu that opens.
  • To create a new script, click New and define properties for the new script.
  • To delete a script, select it in the list and click Delete. You can also delete several scripts at the same time by selecting them all.
  • After making changes to the script properties, click Save to save the changes. You can also press Ctrl + S to save the changes.
  • To discard changes done since the script was last saved, click Cancel Edit.

Script Run Log

When a script is run, a log about the script run progress is written to a Script Log. The Script Log also contains information about the previous script runs. For example, the log contains the output of the WriteLog and Print commands used in the script, as well as details about possible errors. After a script execution has finished, the Script Log can be seen when clicking the Show Details button in script run dialog.

File:Script log.png