4.7 Make a single command line script form an AssemblyLine 
|
|
Previous
In previous sections, we showed how to run AssemblyLines from Tivoli Directory Integrator Configuration Editor. Here we create a command line script from an AssemblyLine and schedule this script to run nightly to automatically synchronize data between the source system and the Profiles database.
- Copy the configuration file from the project, containing Assembly Lines you want to use as a script, to the Tivoli Directory Integrator Solution directory. The name of the configuration file is <project_name>.xml and it should be in <workspace_root>/<project_name>/Runtime-<project_name>/.
For example, copy
C:\TDIProject\15082011\workspace\DB2toProfiles\Runtime-DB2toProfiles\DB2toProfiles.xml
to
C:\TDIProject\15082011\TDISOL\TDI
- Create a .bat (.sh, if you use Linux) file with the following code:
@echo off
SETLOCAL
CD %~dp0
REM call common script to set Tivoli Directory Integrator paths
CALL .\TDIENV.bat
REM Start Network Store server if not started already
CALL .\netstore ping >NUL 2>NUL
IF NOT ERRORLEVEL 1 GOTO STOREOK
CALL .\netstore start
:STOREOK
CALL "%TDIPATH%\ibmdisrv" -s . -c <project_name>.xml -r <assembly_line_name>
:FINISH
ECHO "Script finished"
ENDLOCAL
EXIT /B 0
For example, for this project DB2toProfiles and AssemblyLine populateProfilesDB, the CALL directive should look similar to this:
CALL "%TDIPATH%\ibmdisrv" -s . -c DB2toProfiles.xml -r populateProfilesDB
Note: You might need to change the values of the environment variables in the tdienv.dat (.sh) script according to your environment.
Now you can run this script from the command line inside your Tivoli Directory Integrator Solution directory, or schedule it to run in appropriate time frame using your operating system tools like Task Scheduler in Microsoft Windows or cron in Linux.
Parent topic: 4.0 Tivoli Directory Integrator
|
|
|
|
| Version 1 |
November 21, 2011 |
12:32:23 PM |
by Amanda J Bauman  |
|
|