Open topic with navigation
        
        
        Admin Tool Scripts
        Introduction to Scripts in the Admin Tool
        Scripts are stored in the Scripts and Templates section of the Admin Tool. They are written in Groovy and should only be edited by experienced ConSol CM consultants and administrators.
        To work with scripts, open the navigation item Scripts and Templates in the navigation group System in the Admin Tool. The tab Scripts will be shown.
        
        
        Figure 326: ConSol CM Admin Tool - Scripts & Templates Administration
        On the left you see the list of all scripts. The list can be filtered using the drop-down menu where the script type can be selected. Two parameters have to be set for each script:
        
            - Name 
 This is the name by which the script will be referenced, e.g., from the workflow or from other objects like queues.
- Type 
 The script type. One of the following possible script types has to be selected:- Bulk data object action 
 This script type is part of the Action Framework, namely the Search Actions, and is described in section Action Framework - Search Actions.
- Bulk data object condition 
 This script type is part of the Action Framework, namely the Search Actions, and is described in section Action Framework - Search Actions.
- Bulk resource action 
 This script type is part of the Action Framework, namely the Search Actions, and is described in section Action Framework - Search Actions.
- Bulk resource condition 
 This script type is part of the Action Framework, namely the Search Actions, and is described in section Action Framework - Search Actions.
- Bulk ticket action 
 This script type is part of the Action Framework, namely the Search Actions, and is described in section Action Framework - Search Actions.
- Bulk ticket condition 
 This script type is part of the Action Framework, namely the Search Actions, and is described in section Action Framework - Search Actions.
- Calendar integration 
 Scripts of this type provide the connection information for the integration of Microsoft Exchange calendars. See section Microsoft Exchange Calendar Integration.
- Clone 
 Script which is executed when the Clone option is selected for a ticket. Has to be assigned to a queue. See section Scripts of Type Clone for details.
- Data object action 
 Script which is executed when a Customer Action has occurred, see section Action Framework - Customer Actions for details.
- Data object condition 
 Script which is executed to evaluate whether a Customer Action should be made available to the Web Client, see section Action Framework - Customer Actions for details.
- Default values 
 Scripts of this type are used to define default values, i.e., values that are (pre)set in data fields when a new ticket is to be created. Please see section Scripts of Type Default Values for details.
- Dependent enum 
 Scripts of this type are used to define dependent enums, structures which provide hierarchical lists. Please see section Scripts of Type Dependent Enum for details.
- E-mail 
 Scripts of this type are used to manage incoming and outgoing e-mails. Please see section Scripts of Type E-Mail for details.
- Page customization 
 Scripts of this type are referenced by page customization settings. Please see sections Page Customization for the Web Client Dashboard and CM.Resource Pool - The Resource Pool Dashboard for details.
- PostActivityExecutionScript (no specific type indicated) 
 An (optional) script which is executed after every manual workflow activity. See section PostActivityExecutionScript for details.
- Resource action 
 Script which is executed when a Resource Action has taken place, see section CM.Resource Pool - Resource Actions for details.
- Resource condition
 Script which is executed to evaluate whether a Resource Action should be made available to the Web Client. See section CM.Resource Pool - Resource Actions for details.
- Task 
 Scripts of this type are used by the TEF (Task Execution Framework), please see section The Task Execution Framework (TEF).
- Text Autocomplete
 This script type is used to implement scripted autocomplete lists. Please see section Scripted Autocomplete Lists for details.
- Workflow 
 Scripts of this type are referenced from the workflow. Please see section Scripts of Type Workflow for details.
 
The buttons below the list offer the standard Admin Tool functionalities:
        
            - Add a script
- Edit a script
- Delete a script
- Copy a script
On the right you see the Source Code Editor. The script which is selected in the list on the left is displayed. Here you can write/edit the script source code when using edit mode.
        The Source Code Editor
        The Source Code Editor provides an editing panel with syntax highlighting, but it does not perform any code validation. You have to check the code for correctness yourself.
        
        
        Figure 327: ConSol CM Admin Tool - Scripts: Source Code Editor
        The lower section of the Source Code Editor has the following buttons:
        
            - Edit 
 Click this button to switch to edit mode in the Source Code Editor. When you open the navigation item Scripts and Templates in the Admin Tool, all scripts are in read-only mode to prevent an administrator from accidentally changing something.
- Close edit mode and save changes  
 Save the script and quit edit mode, i.e., switch to read-only mode again.
- Close edit mode without saving changes 
 Switch to read-only mode, without saving any changes you might have made to the source code.
- Open script from file 
 This option opens a file browser. Two cases are possible:
 - The name of the selected file and the name of the script are identical.
 In this case, the code of the script (in the Source Code Editor) will be completely replaced.
- The name of the selected file and the name of the script differ. 
 In this case, a new script will be created with the name of the selected file. The new script will be displayed in edit mode in the Source Code Editor.
 
- Save script to file 
 Here you can save the text of the script as a plain text file in the file system of the machine the Admin Tool is running on.
- Update script from file 
 This option opens a file browser. The code in the Source Code Editor will be replaced by the text in the file, no matter if the names of the script and the file name are identical or not.
Script Types
        In the following section, the available script types are explained. Some examples are provided to give you an idea of potential uses for scripts.
        The following script types are explained here in this section. Please refer to the links provided in the list above for a complete overview of all script types with links to their respective documentation.