Using Siebel Tools > Checking Out and Checking In Projects and Objects > Setting Options for Check Out and Check In >

Configuring Third-Party Code Control


You can integrate the check in feature in Siebel Tools with a code control system from a third party. You can use any third-party control system that Siebel CRM can start and control from a batch file. Some example third-party control systems include Borland Star Team, ClearCase, CVS Open Source, Microsoft Visual SourceSafe, Serena, and PVCS.

If you use third-party code control, then Siebel Tools creates an archive each time you check a project into the server repository. It also checks the project into the code control system. The archive includes all the objects in the project. The code control system can include successive versions of this project. You can use third-party code control only to check in items. You cannot use it to check out items. For more information, see Archiving Objects.

To configure third-party code control

  1. In Siebel Tools, choose the View menu, and then click Options.
  2. In the Development Tools Options dialog box, click the Check In/Out tab.
  3. Set the options in the Source Control Integration section.

    For more information, see Elements of the Check In Dialog Box.

  4. Click OK.
  5. Modify the batch file.

    For more information, see Configuring the Predefined Batch File.

Using Check In with Third-Party Code Control

After you configure Siebel Tools to use third-party code control, you can use Siebel Tools to check in projects just like you typically do. In this example, assume that Project A and Project B are currently checked out. You must check in these projects to the server repository and the code control system. Version 5 is the latest version of the ProjectA.sif file in the code control system. Version 6 is the latest version of the ProjectB.sif file.

To use check in with third-party code control

  • In Siebel Tools, choose the Tools Menu, and then click Check In.

    Siebel Tools does the following:

    • Checks Project A and Project B into the server repository.
    • Starts the srcctrl.bat file from the following directory:

    SIEBEL_TOOLS_ROOT\BIN\

    This batch file does the following:

    1. Checks out ProjectA.sif and ProjectB.sif. It locks these projects in the code control system.
    2. Exports ProjectA to the ProjectA.sif file in the SIEBEL_TOOLS_ROOT\TEMP\projects\ directory.
    3. Exports ProjectB to the ProjectB.sif file in the SIEBEL_TOOLS_ROOT\TEMP\projects\ directory.
    4. Checks the ProjectA.sif file and the ProjectB.sif file into the code control system.
    5. Sets the latest version of the ProjectA.sif file in the code control system to version 6.
    6. Sets the latest version of the ProjectAB.sif file in the code control system to version 7.

Reverting to a Prior Version

In this example, you revert version 5 of Project A that you checked into the server repository. You revert this version to version 4.

To revert to a prior version

  1. Check out version 4 of the ProjectA.sif file from the code control system into the following directory:

    SIEBEL_TOOLS_ROOT\TEMP

  2. Check out ProjectA from the server repository.
  3. Import the ProjectA.sif file into the local repository. Use the Overwrite option to resolve object definition conflicts.

    This step replaces the existing version of ProjectA with the archived version.

  4. Check ProjectA into the server repository.

    Siebel Tools checks the ProjectA.sif file into the code control system as version 6.

Configuring the Predefined Batch File

The srcctrl.bat batch file includes the commands that the code control software uses to check the archived projects into the code control system. You must modify this file, and then distribute it to your developers. The following command runs this batch file:

SRCCTRL action dir comment_file project_file

where:

  • action is check in. You cannot use check out.
  • dir is the directory that includes the items.
  • comment_file is a file that includes comment text that Siebel Tools sends to the code control system with the project file.
  • project_file is the name of the archive file for one project, enclosed in double quotes. For more information about archive files, see Overview of Archiving Objects.

You cannot modify this command. You cannot modify the parameters that it sends.

After check in finishes, Siebel Tools runs the srcctrl.bat file one time for each project. It checks the archive file for the project into or out of the code control system.

For information, see Code of the Predefined Batch File and About Predefined Objects.

Support for Using the Predefined Batch File

Oracle can help you troubleshoot source integration but modifying the srcctrl.bat batch file is your responsibility. To get support on third-party commands that you place in this batch file, you must contact the vendor who provides the third-party source control system.

Code of the Predefined Batch File

The following srcctrl.bat file comes predefined with Siebel CRM. You must modify this batch file so that it uses the path in your environment:

set PATH=C:\Program Files\DevStudio\Vss\win32\;%PATH%
set SOFTWARE=ss
set CHECKIN=%SOFTWARE% checkin
set CHECKOUT=%SOFTWARE% checkout
set ADD=%SOFTWARE% add
set SETPROJ=%SOFTWARE% cp
set PROJECT=$/PROJPOOL
set SRC_USR=
set SRC_PSWD=
set OPTIONS=-i-y -y%SRC_USR%,%SRC_PSWD%
set COMMENT=-c@
set NON_COMMENT=-c-
set FILE=
set LOGFILE=C:\Temp\xml.log
echo =======================srcctrl.bat========================== >> %LOGFILE%
set ACTION=%1
shift
set DIR=%1
shift
set COMMENT=%COMMENT%%1
shift
set FILE=%1
echo Change local directory to %DIR% >> %LOGFILE%
chdir %DIR% >> %LOGFILE% 2>&1
echo Set %PROJECT% as the working directory at Code Control System >> %LOGFILE%
%SETPROJ% %PROJECT% >> %LOGFILE% 2>&1
if errorlevel 100 goto END
if %ACTION%==checkout goto CHECK_OUT
if %ACTION%==checkin goto CHECK_IN
:CHECK_OUT
echo ============Check out file %FILE% from Code Control System============
if not exist %FILE% echo "New File" >> %FILE%
attrib +r %FILE%
echo Add %FILE% if it doesn't exist in Code Control System >> %LOGFILE%
%ADD% %FILE% %NON_COMMENT% %OPTIONS% >> %LOGFILE% 2>&1
echo Start checking out %FILE% from Code Control System >> %LOGFILE%
%CHECKOUT% %FILE% %NON_COMMENT% %OPTIONS% >> %LOGFILE% 2>&1
goto END
:CHECK_IN
echo ============Check in file %FILE% into Code Control System============
echo Check in %FILE% into Code Control System >> %LOGFILE%
%CHECKIN% %FILE% %COMMENT% %OPTIONS% >> %LOGFILE% 2>&1
attrib -r %FILE%
goto END
:END
echo ===================End Of srcctrl.bat====================== >> %LOGFILE%

Parameters That the Batch File Uses

Table 8 describes the parameters that the srcctrl.bat batch file uses.

Table 8. Parameters That the Batch File Uses for the Code Control Software
Parameter
Description

PATH

Identifies the directory where you install the code control software. You must modify this parameter so that it identifies this directory.

SOFTWARE

Name of the command-line utility that the code control system uses. For example, Microsoft Visual SourceSafe uses the ss command-line utility.

CHECKIN

Requests check-in into the code control system.

CHECKOUT

Requests check-out from the code control system.

ADD

Requests to add files in the code control system.

SETPROJ

Sets the working directory in the code control system.

PROJECT

Identifies the working directory in the code control system that includes the items that this system checks in and checks out.

COMMENT

Text of the Comments clause that runs in the command line for each file that the code control system checks in or checks out.

OPTIONS

Text of the Options clause that runs in the command line.

SRC_USR

User name that the Options clause includes in the command line. This user name is the logon name for the code control system. It is not the user for a Siebel Business Application.

SRC_PSWD

User password that the Options clause includes in the command line. This password is the password for the code control system.

FILE

File name of the archive file. The parameter list of the batch file includes this file name. You must check in or check out this file.

LOGFILE

Path and file name of the log file that the batch file creates.

Running Simultaneous Siebel Tools Sessions After You Modify the ODBC Data Source

If you exit Siebel Tools after you modify the ODBC data source, then Siebel Tools writes these modifications to Siebel Preference Files (SPF) in the following directory:

SIEBEL_TOOLS_ROOT\BIN

It caches these preferences. The next time you Log in to Siebel Tools, it does not read the ODBC settings in the tools.cfg file, and you cannot use a single user Id to run simultaneous Siebel Tools sessions. You can open only one local data source at a time. For more information, see Specifying the Data Source That Siebel Tools Uses and About the Configuration Files.

Using Siebel Tools Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.