Siebel Integration

04Dec07

I have successfully integrated Siebel Tools 7.7 with TFS. It took a bit of fiddling but it works. The integration, however, is purely on a source control level. Currently I’m working on a way to associate work items through Siebel and it doesn’t look too difficult.

Siebel Tools has an option to enable source control (Visual Source Safe) and it checks code in and out via a batch file. It did not take too much customisation to get TFS working with Siebel Tools via the batch script. The hardest part was creating the workspace for the user and pointing it to the proper project branch.

Here’s what the script looks like:

PATH=c:\Program Files\Microsoft Visual Studio 8\Common7\IDE;%PATH%
SET LOG=C:\logpath\log.txt
set SOFTWARE=tf

set CHECKIN=%SOFTWARE% checkin
set CHECKOUT=%SOFTWARE% checkout
set ADD=%SOFTWARE% add
SET OPTIONS=-i
SET PROJECT=”$/MyProject/Development”
SET TFSSERVER=xxxxxxx

SET WORKSPACENAME=%COMPUTERNAME%_%USERNAME%

SET Action=%1
SET DIR=%2
SET Comments=%3
SET File=%4

ECHO CHANGING DIRECTORY TO %DIR%
CHDIR %DIR%

ECHO Executing %SOFTWARE% workspace /server:%TFSSERVER% /new %WORKSPACENAME% /noprompt >> %LOG%
%SOFTWARE% workspace /server:%TFSSERVER% /new %WORKSPACENAME% /noprompt >> %LOG%

ECHO %SOFTWARE% workfold %PROJECT% %DIR% >> %LOG%
%SOFTWARE% workfold %PROJECT% %DIR% >> %LOG%

if %ACTION%==checkout goto CHECK_OUT
if %ACTION%==checkin goto CHECK_IN

:CHECK_OUT
echo ============Check out file %FILE% from Source Control System============ >> %LOG%
if not exist %FILE% echo “New File” >> %FILE%
attrib -r %FILE%
echo Add %FILE% in case it doesn’t exist in Source Control System
%ADD% %FILE% “Added by System” %OPTIONS% 2>&1
echo Start checking out %FILE% from Source Control System >> %LOG%
%CHECKOUT% %FILE% %NON_COMMENT% %OPTIONS% >> %LOG% 2>&1
attrib -r %FILE%
goto END
:CHECK_IN
echo ============Check in file %FILE% into Source Control System============ >> %LOG%
echo Check in %FILE% into Source Control System
%CHECKIN% %FILE% %OPTIONS% >> %LOG% 2>&1
attrib -r %FILE%
goto END
:END
echo ===================End Of srcctrl.bat====================== >> %LOG%

Basically the script creates a workspace and maps the specified project to it. The rest is fairly straightforward. It performs a check-in and check-out a la VSS. One thing to note is that Siebel Tools executes this script for each file that is checked in and out. This means that you will potentially have a lot of records in the TFS data warehouse.

As stated before, the lack of work item association is a severe limitation with this script but it is easily resolved by writing some code to handle the work item selection and check-ins and check-outs. The prospect of writing a MSSCCI provider for Siebel Tools is an interesting challenge which I will take up, time permitting.

Technorati Tags: ,,,,

Advertisements


One Response to “Siebel Integration”

  1. 1 Brian

    Alvin,

    I am trying to use your script to intergrate Siebel 8.0 and TFS for source control but having no luck. Would like to chat with you about your success in this area.

    Thanks


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: