Use the CompileInstanceScripts tool
In the Docker environment, to update and compile the constants, user scripts, and user library scripts for Communications Manager Core, use the CompileInstanceScripts tool. This tool does not operate on a Communications Manager Core instance directly. Instead, it uses a folder on the Docker container. This allows the synchronization between two locations using a pull operation and push operation. Between these operations, the folder on the Docker container can be manipulated.
The scripts folder must follow certain rules to be compiled and applied successfully. We recommend that you always start with a pull command to get this folder as it has the correct structure and contains the required exit points. In addition, this folder shows the Communications Manager Core services currently running on the instance, so that you can avoid pushing an incomplete set of scripts.
Pull scripts
You can use the CompileInstanceScripts tool to pull the complete set of the Communications Manager Core scripts and constants of the running instance container into the given folder. It will populate the folder with the following components:
-
The script specification file. This XML file contains the constant definitions as well as the Communications Manager Core service definitions.
-
The XSD file that the script specification file needs to adhere to.
-
The scripts that implement the Communications Manager Core services.
For more details about the Communications Manager Core scripting, see the Tungsten Communications Manager Core Scripting Language Developer's Guide.
Push scripts
You can use the CompileInstanceScripts tool to push the scripts and the specification file from the given folder into the running Docker instance container, which will compile the scripts.
Communications Manager Core will not use the newly pushed scripts until they are applied successfully. When pushing these scripts, set the Script!Apply parameter to true. The scripts will be applied if no compilation errors occur.
For more details, see the Tungsten Communications Manager Core Scripting Language Developer's Guide.
Parameters
The following table lists and describes the CompileInstanceScripts tool parameters.
| Parameter | Required / Optional | Description |
|---|---|---|
| Scripts!Direction | Optional. Defaults to Push. |
|
| Scripts!Folder | Required |
The folder containing the scripts to update. When pushing, the folder must contain the following components:
|
| Scripts!Apply=<true or false> | Optional |
When set to True, applies the results of the script compilation to Communications Manager Core. Only applicable when Scripts!Direction is set to push. The result is applied only if no compilation errors are reported. By default, is set to False. |
| Instance!Number | Required when not on Docker. | Indicates the instance for which scripts should be compiled.
On Docker, this parameter must be omitted. It is provided for future compatibility with non-Docker installations. |
Example
See the following example of the CompileInstanceScripts.xml specification file:
<?xml version="1.0" encoding="utf-8"?>
<Configuration Version="5.0" xmlns="urn:KCCMConfigExport5">
<Instance Version="5.5" >
<Environment key="WatermarkPdfConcept" value="watermarkconcept.pdf" />
<Environment key="AllowRepositoryModelRun" value="Y" />
<Environment key="_ValidateInput" value="N" />
...
<Environment key="MyConstant" value="myvalue>
<Service Name="RunMdl">
<Parameter Name="Model" Value="$1" />
<Parameter Name="Result" Value="$2" />
<Parameter Name="Keys" Value="$3" />
<Parameter Name="Extras" Value="$4" />
<Parameter Name="Environment" Value="$5" />
<Parameter Name="MetaData" Value="$6" />
<Parameter Name="DBB_XMLInput" Value="$7" />
<Parameter Name="DBB_XMLOutput" Value="$8" />
</Service>
<Service Name="RunDocumentPackTemplate">
<Parameter Name="DocumentPackTemplate" Value="$1" />
<Parameter Name="Result" Value="$2" />
<Parameter Name="Environment" Value="$3" />
<Parameter Name="DBB_XMLInput" Value="$4" />
</Service>
...
<Service Name="MyScripts">
<Parameter Name="MyParameter" Value="$1" />
</Service>
</Instance>
</Configuration>