Skip to content
PDF

Script Console installation guide

Installation procedure

JVM and Servlet API

Ensure that the Script Console runs on the same JVM version as the OpenText Content Server where the corresponding version of the Content Script Module is installed.

For instance:

  • If you're installing Script Console 3.0 and you have Content Script 3.0 on OpenText Content Server 20.2, use the identical JVM version that the OpenText Content Server environment utilizes.

When setting up the Script Console to run as a web application, note the following:

  • Script Console is designed for Servlet-API 3.X.
  • It is also compatible and can run on Servlet-API 4.x without issues.

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:
      <config>
          <systems>
              <system id="TEST">
                  <name>Content Server TEST Environment</name>
                  <serverHost>localhost</serverHost>
                  <serverPort>2099</serverPort> <!-- OTCS API port if operating as connected -->
                  <!-- <OTHome>/opt/am/sc/</OTHome>  Script Console Home folder. -->
                  <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">/csconsoleimg/</systemVar><!-- Base path for static contents (default: '/') -->
                      <systemVar name="url">/csconsole</systemVar><!-- Base path for scripts contents (default: '') -->
                      <systemVar name="csModulePath"></systemVar><!-- Base path for runtime contents (default: 'runtime installation path') -->
                      <systemVar name="clientIPAddress"></systemVar><!-- Actual IP Address to be used to generate  -->
                  </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>
                      <serviceVar service="dbx" name="amcs.dbx.activeProfiles">default</serviceVar>
                      <serviceVar service="dbx" name="amcs.dbx.cacheClients">false</serviceVar>
                      <serviceVar service="dbx" name="amcs.dbx.appKey.default"></serviceVar>
                      <serviceVar service="dbx" name="amcs.dbx.appSecret.default"></serviceVar>
                      <serviceVar service="dbx" name="amcs.dbx.authToken.default"></serviceVar>
                      <serviceVar name="ans.appbuilder.requestContext" service="appbuilder">/otcs/cs.exe</serviceVar>
                      <serviceVar name="ans.appbuilder.supportContext" service="appbuilder">/img/</serviceVar>
                      <serviceVar name="ans.appbuilder.httpOTCSSchema" service="appbuilder">http</serviceVar>
                  </serviceVars>
                  <users>
                      <user password="B594193ED65B934A5D11E5DE2323131E8C70" username="Admin"/>
                  </users>
              </system>
          </systems>
          <extensions id="forms">
              <repositories>
                  <repository commands="false" encoding="UTF-8" home="forms" root="scripts/ext" server="true"/>
              </repositories>
          </extensions>
      </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.

  • Synchronize ModuleSuite configuration parameters from the LOCAL system using the loadConfig command. To do this, you must first export the entire Module Suite configuration from the Content Server instance by following these steps:

    • Go to the Administration page of the Content Server and under Core System - Feature Configuration click on Import and Export Administration Settings
    • Open Export Administration Settings
    • In this page, add the Setting_AnswerModules_BaseConfiguration to the Selected Settings list, flag Lean Versions (as showed in the screenshot below) and click on Export to export the XML file containing the Module Suite configuration.

    • Copy eh file generated at the previous step on the server where Script Console is installed under the path %AM_CONSOLE_DATA%/runtime/bin
    • Run the command loadConfig specifying the file to be imported (-f, --file)

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

Connect to Content Server

Script Console does not require to be connected to a Content Server instance, in fact in most cases the two systems do not need to be connected. To execute actions and scripts against an active Content Server instance, you must log-in using valid user credentials.

Unix

"Unix"

  • 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