IBM Support

Automating service/node selection when running wsadmin script

Technote (troubleshooting)


User creates a wsadmin batch job to complete a scheduled task; however, the wsadmin script is not responsive enough to pre-select which service/node the wsadmin should connect to.


    If user would like to synchronize all user data to the Profiles application on a scheduled basis to ensure user data remains synchronized and propagates to the other applications, the admin can use a wsadmin script for the Profiles application and their task scheduler complete this process.

However, in a clustered environment when invoking the command to access the Profiles configuration files:

the admin will be prompted to specify a service/node to connect to in which will require them to type a number to pick the designated node in the list.

Since the created wsadmin batch script will be a local file, the node where the created wsadmin batch script file is stored must be selected.

The goal is to pre-select the node in order to prevent the need for intervention every time the script is scheduled to run.


Wsadmin batch job prompts admin to specify a service/node to connect to.

The wsadmin batch job can not run autonomously without human intervention to select designated service/node.


Each application's Jython script interpreter (used to initialize that application's administration services), i.e., contains a variable called batchMode that by default is set to the conditional value of 0 which then executes code to prompt the admin to specify which service/node to connect to.


IC5.0, IC5.5

Diagnosing the problem

1. Write wsadmin script used to manage user data using Profiles administrative commands:

ProfilesService.activateUserByUserId(String user_external_id, updated_properties_list)

2. Set file to run as a scheduled task using Task Scheduler (Windows)


Crontab (Linux)

3. On every iteration the task runs, the admin will be required to intervene by selecting a service/node to connect to.

Resolving the problem

Set the value of the batchMode variable to "batchMode=1" to connect to the first node in the list or set the value to whichever node in list is needed.

Do this by inserting the following declarations into your custom wsadmin script ensuring it is set prior to the initializing the application's administrative services:


batchMode = 1
except NameError:
batchMode = 0
ProfilesService.activateUserByUserId(String user_external_id, updated_properties_list)

Document information

More support for: IBM Connections

Software version: 5.0, 5.5

Operating system(s): AIX, Linux, Windows

Software edition: All Editions

Reference #: 1996342

Modified date: 27 April 2017

Translate this page: