Jython sample scripts are supplied with the Management Console. These scripts output the existing objects of the corresponding type together with their properties. It is also possible to create, modify or delete new test objects. The names of the test objects begin with "test" or "TEST". Actions (status query, start, stop) are started depending on the configuration.
When the Management Console has been installed, the following scripts are available in the subdirectory cli-sample
of the Management Console installation directory:
startBcAdmin.cmd
(for Windows platforms) orstartBcAdmin.sh
(for Solaris/Linux platforms) – start script.startBcAdmin.cmd
orstartBcAdmin.sh
calls the scriptsampleMccliStart.py
.sampleMccliStart.py
– Start Jython script from which the required sample scripts are called depending on the specified options.sampleAdminCommService.py
– Jython script with functions for the moduleBcAdminCommunicationService
.sampleAdminEisPartner.py
– Jython script with functions for the moduleBcAdminEisPartner
.sampleAdminInbound.py
– Jython script with functions for the modulesBcAdminInboundUser
,BcAdminInboundService
,BcAdminInboundMsgEndpoint
.sampleAdminLu62Gateway.py
– Jython script with functions for the moduleBcAdminLu62Gateway
.sampleAdminMain.py
– Jython script with functions for the modulesBcAdminMain
andBcAdminTodo
.sampleAdminProxy.py
– Jython script with functions for the moduleBcAdminProxy
.sampleAdminProxyCluster.py
– Jython script with functions for the moduleBcAdminProxyCluster
.sampleAdminRa.py
– Jython script with functions for the moduleBcAdminRA
.sampleAdminOutbound.py
– Jython script with functions for the modulesBcAdminOutboundService
,BcAdminOutboundCommEndpoint
.sampleInitConfig.template.py
– Template for adapting the configuration data and the required scope of the samples.
Using the Jython sample scripts
Perform the sequence of steps described below:
In the start script
startBcAdmin.cmd
orstartBcAdmin.sh
, set the environment variable JYTHONPATH.Create an overwritable copy of
sampleInitConfig.template.py
with the namesampleInitConfig.py
. This file must always be located in the directory containing the scripts (default after installation:cli-sample
). It is used by all the Jython sample scripts.Adapt the configuration file
sampleInitConfig.py
, see section " Editing the configuration file".Call the start script
StartBcAdmin.cmd/sh
, see section " Calling the start script". When you do this, use the call options to specify which scripts and functions are to be executed.
You can also start any of the Jython sample scripts as a main program. However, if you do this you must manually specify the parameters that are supplied in the start script. It is therefore recommended to start the scripts via the central start script with the corresponding options.
Editing the configuration file
The configuration file sampleInitConfig.py
contains specifications relating to the objects that are to be read by the sample scripts. Runtime parameters are also defined in this file.
Proceed as follows:
In
sampleInitConfig.py
, replace the "****" placeholders in the individual object parameters for the proxy, EIS partner, resource adapter etc. with the actual values. The following object parameters apply to all scripts:console_home
Installation directory of the Management Console. Alternatively, the information can also be read via the environment variable BEANCONNECT_USERCONS.
proxy_name
Name of the proxy for which the functions are to be executed (not necessary in the case of
sampleAdminMain.py
).admin_pw
Password of the proxy for which the functions are to be executed (not necessary in the case of
sampleAdminMain.py
).For details of the other parameters, see the inline description in
sampleInitConfig.py
.In
sampleInitConfig.py
, change the predefined runtime parameters (create, modify, save, delete, start/stop proxy) if you wish. There are the following runtime parameters:bCreDelObjs=True/False
Generate and remove test objects (the object names start with "test" or "TEST")bModObjs=True/False
Modify test objects.bSaveMod=True/False
Save changes to configuration.Other script-specific switches (see also the comments in
sampleInitConfig.py
).
In most cases,
bCreDelObjs=bModObjs=bSaveMod=True
creates and modifies a test object in a first pass through the scripts. This object is then removed in a second pass. The sequence of the functions is usually controlled by the value of the propertydesc
("created"
->"modified"
->remove object
):If a test object does not exist then it is created with
desc="created"
.If a test object exists and
desc="created"
, then the object is modified (desc="modified
").If a test object exists and
desc="modified"
, then the object is removed from the configuration.
Calling the start script
Open the Windows prompt or a Solaris or Linux shell and enter the following command in the directory cli-sample:
startBcAdmin.cmd [options]
(Windows systems)
startBcAdmin.sh [options]
(Solaris and Linux systems)
You control the function scope using options
. The following values are possible:
-help | Help function. Simply outputs the possible parameters together with an explanation. |
-all | Starts all the sample scripts |
-cs | Starts |
-ei | Starts |
-gw | Starts |
-in | Starts |
-main | Starts |
-out | Starts |
-proxy | Starts |
-proxy-cl | Starts |
-ra | Starts |
-log | Logging function, i.e. detailed output of the information that is read |