Setting Up an SMD File

The following document describes the Service Manager's definitions file (UC4.SMD by default) which defines the services that should be created automatically.

The definitions file contains all start parameters for the Automation Engine services. Each service is represented in its own line and starts with the keyword DEFINE. The individual start parameters are separated by semicolons, and commenting lines start with an exclamation mark.

Note: This file is automatically adjusted when you make modifications in the ServiceManager dialog program. No manual intervention is required.

Syntax

DEFINE Service; Component INI file; Working directory [; -svc%port%] [; LOGON=(User name, Password, Domain )] [; Start1=() ; Start2=(); Start3=() etc.]

Syntax

Description/Format

Service

Service name.

Blanks.

Component

Path and file name of the Automation Engine program that should start.

You can use absolute or relative path specifications. "*OWN" means that the program must be listed in the directory of the calling ServiceManager.

Agents for SAP, JMX, databases and Rapid Automation require a Java call.
For example: java -jar ucxjr3x.jar

Java agents: Also specify the Java path because the ServiceManager under UNIX does not read all environment variables.
Example: /usr/java/latest/bin/java -jar ucxjsqlx.jar

 

Insert a blank between the parameters Component and INI file.

INI file

Name of the INI file that should be used.

You can also specify an absolute or relative path (relative refers to the program that should be started).

Working directory

Working directory for the program that should start.

If the program to be started is a Java-based agent (SAP, Databases, JMX, Rapid Automation), the working directory must be the path to the JAR file.

-svc%port%

Additional display option for server processes.

With this start parameter being specified, the ServiceManager dialog program displays the name of the server process and the number of connections in addition to the name of the service.

LOGON=

Login data for the Automation Engine program.

This parameter only applies for the ServiceManager on Windows.

Start1=
Start2=
etc.

Several start methods for a server process (WP).

Syntax
START1=( name , command )
START2=( name , command )
START3=( name , command )

Name = The name of the start mode that you can define using the Start Parameters - ServiceManager -sm.
Command = The complete start command of a WP (path and file name) including the start mode parameter(-parm).

To start the WP with a specific mode, you must append the following parameter:
-parm"StartMode=value;SystemStop=value"
The allowed values for StartMode= are "NORMAL" (regular start) and "COLD" (cold start).
The allowed values for SystemStop= are "NORMAL" (the client status remains the same) and "YES" (all clients are stopped).

For example:
The following is an extract from an SMD file that includes the definition of a service that you can use to start a WP with a different start mode.

VAR SRV_STARTPATH;*OWN\..\..\Server\bin

VAR WP_STARTCMD;*SRV_STARTPATH\UCsrvwp.exe *SRV_STARTPATH\ucsrv.ini -svc%port%

VAR WP_STARTCMD_COLD;*WP_STARTCMD -parm"StartMode=Cold"

VAR WP_STARTCMD_STOP;*WP_STARTCMD -parm"SystemStop=Yes"

VAR WP_STARTCMD_COLDSTOP;*WP_STARTCMD -parm"StartMode=Cold;SystemStop=Yes"

DEFINE WP2;*WP_STARTCMD;*SRV_STARTPATH;START1=(Coldstart,*WP_STARTCMD_COLD);START2=(Systemstop,*WP_STARTCMD_STOP);START3=(Coldstart with Systemstop,*WP_STARTCMD_COLDSTOP)

CONSOLE=

Set this parameter to 1 (CONSOLE=1) to start console based applications from the ServiceManager. Otherwise, the ServiceManager searches for a handle for the application window which is then used to end (Close) the application normally.

This parameter is particularly useful to start third-party applications from the ServiceManager. To close the application normally, the application uses Crtl+C signal handling, which is typically used for console applications.

This parameter only applies for the ServiceManager on Windows.

You can structure variables to increase their readability because the individual lines can be very long.

Example

VAR Name of the variable;value of the variable

The top part of the definitions file contains the variable definitions (for example, SRV_STARTPATH indicates the path where the Service Manager is located). Make sure that the variable paths comply with your installation destination.

The second part of the file lists the services that get added to the definitions file. These lines start with a DEFINE syntax followed by the destination, followed by the service. Keep in mind that the destination needs to match the destination defined in the INI file, for more information, see Service Manager Service.

Within a DEFINE line, you can insert a variable by specifying a "*" followed by the variable name.

Example

Note: Do not use the -Xrs parameter on UNIX systems as it can interfere with the shutdown process.

! Variables
VAR SRV_STARTPATH;*OWN\..\..\AutomationEngine\bin
VAR CP_STARTCMD;*SRV_STARTPATH\UCsrvcp.exe *SRV_STARTPATH\ucsrv.ini -svc%port%
VAR WP_STARTCMD;*SRV_STARTPATH\UCsrvwp.exe *SRV_STARTPATH\ucsrv.ini -svc%port%
VAR JWP_STARTCMD;java -Xrs -Xmx2G -jar ucsrvjp.jar -I*SRV_STARTPATH\ucsrv.ini -svc%port%
VAR JCP_STARTCMD;java -Xrs -Xmx2G -jar ucsrvjp.jar -I*SRV_STARTPATH\ucsrv.ini -svc%port% -cp
VAR REST_STARTCMD;java -Xrs -Xmx2G -jar ucsrvjp.jar -I*SRV_STARTPATH\ucsrv.ini -svc%port% -rest
VAR WP_STARTCMD_COLD;*WP_STARTCMD -parm"StartMode=Cold"
VAR WP_STARTCMD_STOP;*WP_STARTCMD -parm"SystemStop=Yes"
VAR WP_STARTCMD_COLDSTOP;*WP_STARTCMD -parm"StartMode=Cold;SystemStop=Yes"

! Services
DEFINE WP1;*WP_STARTCMD;*SRV_STARTPATH;START1=(Coldstart,*WP_STARTCMD_COLD);START2=(Systemstop,*WP_STARTCMD_STOP);START3=(Coldstart with Systemstop,*WP_STARTCMD_COLDSTOP)
DEFINE WP2;*WP_STARTCMD;*SRV_STARTPATH;START1=(Coldstart,*WP_STARTCMD_COLD);START2=(Systemstop,*WP_STARTCMD_STOP);START3=(Coldstart with Systemstop,*WP_STARTCMD_COLDSTOP)
DEFINE WP3;*WP_STARTCMD;*SRV_STARTPATH;START1=(Coldstart,*WP_STARTCMD_COLD);START2=(Systemstop,*WP_STARTCMD_STOP);START3=(Coldstart with Systemstop,*WP_STARTCMD_COLDSTOP)
DEFINE WP4;*WP_STARTCMD;*SRV_STARTPATH;START1=(Coldstart,*WP_STARTCMD_COLD);START2=(Systemstop,*WP_STARTCMD_STOP);START3=(Coldstart with Systemstop,*WP_STARTCMD_COLDSTOP)
DEFINE WP5;*WP_STARTCMD;*SRV_STARTPATH;START1=(Coldstart,*WP_STARTCMD_COLD);START2=(Systemstop,*WP_STARTCMD_STOP);START3=(Coldstart with Systemstop,*WP_STARTCMD_COLDSTOP)
DEFINE JWP;*JWP_STARTCMD;*SRV_STARTPATH
DEFINE JCP;*JCP_STARTCMD;*SRV_STARTPATH
DEFINE REST;*REST_STARTCMD;*SRV_STARTPATH
DEFINE CP1;*CP_STARTCMD;*SRV_STARTPATH
DEFINE CP2;*CP_STARTCMD;*SRV_STARTPATH

! Windows agents
DEFINE WIN01;*OWN\..\..\Agents\Windows\bin\UCXJWX6.exe;*OWN\..\..\Agents\Windows\bin\

! Database agents
DEFINE DATABASE-AGENT01;java -Xrs -Xmx1G -jar *OWN\..\..\Agents\sql\bin\ucxjsqlx.jar;*OWN\..\..\Agents\sql\bin
DEFINE DATABASE-SERVICE01;java -Xrs -Xmx1G -jar *OWN\..\..\Agents\sql_service\bin\ucxjsqlx.jar -service;*OWN\..\..\Agents\sql_service\bin\

! Third-part applications
DEFINE Java-App;java -jar app.jar;C:\Automic\3thparty\;CONSOLE=1

See also: