Skip to content
PDF

Script Console installation guide

Installation procedure

Script Console can be configured to run in different modes. Common scenarios are:

  1. standalone interactive console, connected to OTCS: mainly used for batch processing and administration tasks
  2. standalone script interpreter, connected to OTCS: mainly used for scheduling administration tasks
  3. standalone lightweight webserver (based on embedded application server), connected or not connected to OTCS
  4. web application deployed on external application server, connected or not connected to OTCS

This guide covers the standard installation procedure of the Content Script Console (standalone based on embedded application server) which is compliant with the options 1, 2 and 3 of the above list.

For alternative deployment scenarios, including deployment on an external application server, please make reference to AnswerModules Support Team and guides available through Support Portal.

  • Run the Script Console Installer (WINDOWS), or extract the Script Console archive, and install the Script Console in your favourite location (this step should be executed by an user having local administrative privileges)

Environment variables

The Script Console requires an environment variable to be defined in order to work properly, for your convenience this variable is automatically defined on windows server by the Script Console installer:

  • AM_CONSOLE_DATA: the Script Console's root folder
Step-by-Step procedure

The following screens will guide you through the deployment of Script Console runtime.

  1. Welcome Screen: Select “Next” when ready to start the installation.

  2. EULA Screen: Acceptance of the end-user license agreement is mandatory for proceeding with the installation
    A copy of the agreement will be available, upon installation, in:
    %AM_CONSOLE_DATA%/license/EULA Select “Next” when ready.


  3. AM_CONSOLE_DATA selection: Choose the location where the Script Console components will be installed.
    E.g.
    E:\AM\SC_2_7_0\
  4. Script Console Application and Content Script Extension Packages: there are two different types of extensions that can be installed:

  5. Content Script Extensions are extensions for the embedded Content Script Engine.

  6. Script Console Applications

11. Installation completed: Select “Finish” and return to the installation checklist to finalize the module setup.

  • Copy Content Server's libraries to the Script Console runtime

Content Server libraries required

Some Content Script extension packages require additional Java libraries that are specific to the target Content Server environment, and are not distributed with the module. The required library files are:

  • csapi.jar
  • service-api-X.X.XX.jar

and can be found in the web app located in:

%OTCS\_HOME%\\webservices\\java\\webapps\\cws.war

  • classificationsservice-api-X.X.XX.jar

which can be found in the web app located in:

%OTCS\_HOME%\\webservices\\java\\webapps\\cs-services-classifications.war

  • physicalobjectsservice-api-X.X.XX.jar

which can be found in the web app located in:

%OTCS\_HOME%\\webservices\\java\\webapps\\cs-services-physicalobjects.war

  • recordsmanagementservice-api-X.X.XX.jar

which can be found in the web app located in:

%OTCS\_HOME%\\webservices\\java\\webapps\\cs-services-recordsmanagement.war

  • oml.jar

which can be found in: %OTCS\_HOME%\\ojlib

To retrieve the files:

  • copy the file named XXX.war to a temporary folder
  • rename the file XXX.war in XXX.zip
  • extract the zip archive contents locate the files in the WEB-INF/lib folder

Once the files have been located, copy them to the folder: %AM_CONSOLE_DATA%/runtime/amlib

Copy libraries form Content Script

All the libraries mentioned above but ** oml.jar ** are usually also found in the installation folder of the Content Script module: %OTCS_HOME/module/anscontentscript_X_Y_Z/amlib

  • Perform basic configuration of the Script Console. The main configuration file is located in: %AM_CONSOLE_DATA%/config/cs-console-systemConfiguration.xml
    Default configuration will be similar to the following:
    <?xml version="1.0" encoding="UTF-8" ?>
      <config>
          <systems>
              <system id="TEST">
                  <name>Content Server TEST Environment</name>
                  <serverHost>localhost</serverHost>
                  <serverPort>2099</serverPort>
                  <local-repository-home>TEST</local-repository-home>
                  <local-repository-encoding>UTF-8</local-repository-encoding>
                  <otcs-repository-encoding>UTF-8</otcs-repository-encoding>         
                  <systemVars>
                      <systemVar name="img">/</systemVar>
                      <systemVar name="url"></systemVar
                      <systemVar name="csModulePath">
                  </systemVars>
                  <serviceVars>
                      <serviceVar service="core" name="amcs.core.httpProxyHostname" ></serviceVar>
                      <serviceVar service="core" name="amcs.core.httpProxyPort">80</serviceVar>
                      <serviceVar service="core" name="amcs.core.httpProxyUsername"></serviceVar>
                      <serviceVar service="core" name="amcs.core.httpProxyPassword"></serviceVar>
                      <serviceVar service="core" name="amcs.core.httpMaxConnPerRoute">20</serviceVar>
                      <serviceVar service="core" name="amcs.core.httpMaxConnTotal">50</serviceVar>
                      <serviceVar service="core" name="amcs.core.httpOTCSSchema">http</serviceVar>
                      <serviceVar service="core" name="amcs.core.tempFilePath">/tmp/</serviceVar>
                  </serviceVars>
                  <users></users>
              </system>
          </systems>
      </config>
    
    The base configuration allows to specify one or more “system” objects which represent OTCS instances to which the console will be able to connect.

How to setup your base configuration

The base configuration can be edited manually, or, alternatively, configuration parameters can be downloaded from a target Content Server instance. This feature comes particularly handy for installations that include multiple Content Script Extension Packages, each with its own configuration settings.

  • Apply any available hotfix(es)

Hot to install a hotfix

Before you install any hotfix, please backup all essential files. To install the hotfix, download the hotfix from the Support portal and save it to a temporary location. Make sure Script Console services (or executable) are completely stopped. From the temporary location, extract the contents of the hotfix to the <Script_Console_home> directory and then restart it.
The directory (directories) and file(s) contained in the hotfix(es) you install will be copied to <Script_Console_home>

Please always make reference to the hotfix's description file:/hotfixes/hotFix_ANS_XXX_YYY_ZZZ.hfx for specific installation instructions or pre/post installation procedures

Configure Script Console

To perform configuration against an OTCS instance, run the Script Console in shell mode. To do so, open a Windows Commands Processor and move to the folder: %AM_CONSOLE_DATA%/runtime/bin which includes the Script Console's executables scripts

  • Run the app-windows.bat or app.sh script
  • The following prompt should appear:

"Windows"

Unix

"Unix"

  • The default TEST system is selected. To list all available systems, use the system command with the list flag (-l, --list). E.g. system -l:

Unix

"Unix"

  • To create a new system (for example, LOCAL) use the system command with the add flag
    (-a, --add) followed by the ID of the new system. E.g. system -a LOCAL

    The shell will prompt for the required base values, such as hostname and port number.

Unix

"Unix"

Upon creating a new system, the Script Console will require a restart and will automatically shutdown.

  • Switch the active system to LOCAL using the system command with the system flag (-s) followed by the ID of the target system. E.g. system -s LOCAL

Unix

"Unix"

The active system indicator in the command prompt should now indicate LOCAL.

  • Login to the LOCAL system using the login command

Unix

"Unix"

The active system indicator in the command prompt should now turn green to indicate that the system is ONLINE

  • Synchronize ModuleSuite configuration parameters from the LOCAL system using the loadConfig command with the mode flag (-m, --mode) followed by the ALL value, and the verbose flag (-v, --verbose). E.g. loadConfig -m ALL -v The LOCAL system base configuration will be transfered and stored in the Script Console configuration file

  • The configuration is complete. Try a simple ls command to test the connection

Unix

"Unix"