Overriding scripts
You might want to label scripts for overriding if there are limits to how much you can modify default scripts. Scripts that can be overwritten are labeled with the overridable property.
NOTE: Only the default scripts that are supplied can be overriden. Custom scripts cannot be overridden because these are saved in a Custom scripts script class.
To override a script
-
In the Designer, select the script to override in Script Library > Overridable scripts.
-
Select the Copy script task.
-
In the Copy script dialog, edit the following information.
-
To create the copy, click OK.
-
In the Script Editor, replace the overridable property with overrides in the script header.
-
Modify the other script code accordingly to suit your requirements.
IMPORTANT: After creating and editing the script, you should test compiling the script. Compile the scripts in the script library for this script to take effect.
Syntax example
Public overridable Function My_Function() as Boolean
'script code of the original version
End Function
Public overrides Function My_Function() as Boolean
End Function
Permissions for running scripts
The basic permissions for running scripts are granted to the logged in user by the Common_StartScripts program function.
If a script is assigned a program function (QBMScriptHasFeature table), users can only run this script if they have the necessary permissions groups. An error occurs if the user does not own this program function and tries to run it.
Detailed information about managing permissions and running scripts through program functions can be found in the One Identity Manager Authorization and Authentication Guide.
Editing and testing script code with the System Debugger
The System Debugger gives you the opportunity to test scripts, templates, formatting rules, methods, and table scripts. Visual Studio debug and edit options are available to you.
The following software must be installed to use the System Debugger:
NOTE: To use the System Debugger with privileges without starting Visual Studio, you must install the One Identity Manager components in a local directory which is not controlled through user accounts.
Detailed information about this topic
Creating and loading the system library in the System Debugger
When the System Debugger starts up, it uses the SystemLibrary to create and load a Visual Studio SystemLibrary.sln file for editing and testing scripts.
The following projects are defined within the project solution.
Table 97: SystemLibrary project files
DlgMth |
DlgMth.vb |
Contains all task definitions. |
ProductScripts |
ProductScripts.vb |
Contains all predefined scripts. |
Scripts |
Scripts.vb |
Contains customized scripts. Add new scripts here.
This project is used as the initial project. |
Tables |
Tables.vb |
Contains all table scripts. |
Tmpl |
Tmpl.vb |
Contains all templates and formatting scripts. |
TypedWrappers |
TypedWrappers.vb |
Contains the type-safe classes from the table definitions and column definitions. |
WebServices |
WebServices.vb |
Contains the proxy code of the web service. |
To create a system library
-
Start the Launchpad and log in to the One Identity Manager database.
-
In the Tools > One Identity Manager section, select the System Debugger entry and click Run.
-
Confirm the prompt with Yes.
-
Select a directory the project solutions file.
-
In the System Debugger, in the Create System library files dialog, run the following steps.
-
(Optional) Enable the Export locked scripts option to load locked scripts from the script library in addition to the enabled scripts.
-
(Optional) Use the Create backups of existing files option to specify whether backups of existing files are created. (Default)
-
Click OK.
This generates the file. The script library files are filled with data from the database.
-
Confirm the prompt with OK.
This ends the System Debugger.
To load the system library
-
Run the SystemLibrary.sln file.
-
Check whether the Scripts project is entered in Visual Studio as the startup project.
-
Use F5 to start debug process in Visual Studio.
This compiles the generated sources and project solution.
-
Reconnect to the database.
Starts the System Debugger.
TIP: To pass the database connection data and the authentication data to the System Debugger, enter /Conn and /Auth parameters as arguments in the initial project properties. This means System Debugger does not prompt for the information each time it starts.