Siebel - 5.3 - Onboarding with CAST Imaging Console

Note that CAST Console automates a large part of the configuration process for analyzing Siebel technologies, as such, if you have previously been using the legacy CAST Management Studio to run your analyses, you will find that some of the steps required for CAST Management Studio are not mentioned in the instructions below. This is not an omission, it is simply because these steps are now automated and do not require manual intervention.

Prerequisites

AIP Core ≥ 8.3.39
AIP Console ≥ 1.27.0-funcrel
Extension

≥ 5.3.0 (this will be installed automatically by CAST Console).

Note however, that a batch file (Siebel-Extract-CLI.bat) is required to perform the repository extraction (see below) and this file is provided in the extension itself. Therefore if you are onboarding a new application, the Siebel extension will not yet be available on the AIP Node: if this is the case, you can download the extension (https://extend.castsoftware.com/#/extension?id=com.castsoftware.siebel&version=latest) and extract (using 7Zip or similar) to find the batch file.
Application creation

Two applications should be created in AIP Console, for the Vanilla and Project repositories. See Add a new Application for more information about this. These applications should be named as follows:

  • "Siebel_Project"
  • "Siebel Vanilla"

Here are some indicative Application schema sizes for a large Siebel analysis (3.4 GB of source code):

Schema

Data

Index

Total

Management schema

0.163 GB

-

0.163 GB

Dashboard schema

1.5 GB

1.5 GB

3 GB

Project Analysis schema

7 GB

7 GB

14 GB

Vanilla Analysis schema

5 GB

6 GB

11 GB

Repository extraction AIP Console only accepts .castextraction files generated by the CAST Database Extractor, in other words, the Vanilla and Project repository extraction must be actioned outside of AIP Console (see below for more information). Note that for the Project repository extraction, this file must be named with the exact same prefix as used for the .SiebelProject file, for example if you name the file SiebelExtract_Project.castextraction, the .SiebelProject file must be named SiebelExtract_Project.SiebelProject.
.SiebelProject file for Project repository A .SiebelProject text file must be configured and delivered with the .castextraction file for the Project repository. This file configures rule parameters and other data ((see below for more information). Note that this file must be named with the exact same prefix as used for the Project repository .castextraction file, for example if you name the file SiebelExtract_Project.SiebelProject, the .castextraction file must be named SiebelExtract_Project.castextraction.

Step 1 - Repository extraction

The Vanilla and Project repositories must be extracted to .castextraction files using the CAST Database Extractor (which can be downloaded from https://extend.castsoftware.com/#/extension?id=com.castsoftware.aip.extractor.sqldatabase&version=latest)external link. A tailor made batch file provided in the Siebel extension is available for running the offline extraction with the CAST Database Extractor - this should be used and can be found in the following location in the extension:

com.castsoftware.siebel.<version>\TOOLS\OfflineExtraction\Siebel-Extract-CLI.bat

This batch file will need modification BEFORE you run it - this is so that it can be tailored to the RDBMS on which your Siebel repositories are hosted and which you want to extract - see the sections below.

Note that if you need to run the extraction in a Linux server, you can re-use this script file (it is not provided in the extension): Siebel-Extract-CLI.sh - this will need configuring as explained below.

Configure Siebel-Extract-CLI.bat

Find the following sections in the batch file and modify them to match your environment:

RDBMS access parameters

Find the section rem Database parameters = Access to the database hosting the Siebel repository:

rem for Oracle : oracle
rem for SQL Server : mssql
rem for DB2 : db2
SET DBTYPE=<PARAM>

You must set this option to match the target RDBMS. For example for a Microsoft SQL Server:

SET DBTYPE=mssql

rem either a host or an IP
SET SERVER_NAME=<PARAM>
SET PORTNUMBER=<PARAM>
SET DATABASE_NAME=<PARAM>

Enter the three fields, for example, for a Microsoft SQL Server:

SET SERVER_NAME=MY_HOST
SET PORTNUMBER=1433
SET DATABASE_NAME=MY_DB

Hints:

  • SET SERVER_NAME - enter an IP address or host name
  • SET PORTNUMBER:
    • DB2 = 50000
    • Oracle = 1521 (as per the Tnsname.ora file)
    • Microsoft SQL Server = 1433
  • SET DATABASE_NAME:
    • DB2 = The DB2 database name
    • Oracle =  Either the Service name as per the Tnsname.ora file, or the SID (System ID) as per the Tnsname.ora file
    • Microsoft SQL Server = The instance name
rem <CHOOSE> %JDBC_URL_ORACLE_SID% or %JDBC_URL_ORACLE_SERVICE%
SET JDBC_URL_ORACLE=%JDBC_URL_ORACLE_SID%

When targeting an Oracle Server, you must choose one parameter or the other. E.g. if you define a Service name in SET DATABASE_NAME, you should change the line to:

SET JDBC_URL_ORACLE=%JDBC_URL_ORACLE_SERVICE%

rem <CHOOSE> %JDBC_URL_SQLSERVER_DEFAULT% or %JDBC_URL_SQLSERVER_INSTANCE%
SET JDBC_URL_SQLSERVER=%JDBC_URL_SQLSERVER_DEFAULT%

When targeting an Microsoft SQL Server, you must choose one parameter or the other. E.g:

  • if your server only requires a port number for access, you should choose: %JDBC_URL_SQLSERVER_DEFAULT%
  • if your server requires and instance name and port number, you should choose: %JDBC_URL_SQLSERVER_INSTANCE%
rem user used for the SQL connection
rem SET /p DBUSER="CONNECTION USER: "
SET DBUSER=<PARAM>
rem SET /p DBPWD="CONNECTION PASSWORD: "
SET DBPWD=<PARAM>

For Microsoft SQL Server only, this option determines the credentials that should be used to access the RDBMS. For example:

rem user used for the SQL connection
rem SET /p DBUSER="CONNECTION USER: "
SET DBUSER=sa
rem SET /p DBPWD="CONNECTION PASSWORD: "
SET DBPWD=some_password

Siebel repository access parameters

Find the section rem Siebel parameters = Access to the Siebel repository:

rem user that contains the tables
SET SCHEMA=<PARAM>
Schema/database in which the Siebel tables are stored:
  • Oracle USER name
  • DB2 schema name
  • Microsoft database name

For example:

SET SCHEMA=MY_DB

rem Repository type = Vanilla or Project
SET PROJECT_NAME=<PARAM>

Choose Vanilla when you specify the "Vanilla" repository ID (see below). Choose Project when you specify the "Project" repository ID (see below):

SET PROJECT_NAME=Project

rem Repository ID
SET REPOSITORY_ID=<PARAM>

Target Repository ID you want to extract. Must be in synch with item Repository Type above:

SET REPOSITORY_ID=Project

  • For Project, this value may change from one version to another.
  • In ≥ 5.2.3, the extraction process will detect if the Project or Vanilla's Repository ID has been used for both Vanilla and Project extractions (using the same repository ID for both Vanilla and Project must be avoided). An error message will be added to the log file if this is the case (see below). 
SIEBEL-105 VANILLA and PROJECT Repository Id should not be same. Refer to the documentation.
rem Repository version. Either 7.5, 7.6, 7.7, 7.8, 8.0, 8.1
SET REPOSITORY_VERSION=<PARAM>

Choose the Siebel version in your target repositories:

SET REPOSITORY_VERSION=8.1

rem List of application names separated by a comma
SET APPLICATION_LIST=<PARAM>

Define a comma separated list of applications involved in the Siebel repository that you want to extract. For example:

SET APPLICATION_LIST=Siebel Sales Enterprise,Siebel Power Communications

Run the batch file

When you run the batch file on each Siebel repository, the resulting output should be one .castextraction file for each repository, for example:

  • SiebelExtract_Vanilla.castextraction
  • SiebelExtract_Project.castextraction

These files need to be delivered to AIP Console - see below.

Batch file logging

The batch file will generate logs inside the folder defined in the parameter “ROOT_FOLDER”, as follows:

  • a sub-folder “01_Results” that contains the extraction file (SiebelExtract_Project.castextraction or SiebelExtract_Vanilla.castextraction)
  • a sub-folder “log” that contains the extraction log file (ExtractorLog_Project.log or ExtractorLog_Vanilla.log) and the execution file (Project.log or Vanilla.log)

The execution log file gives you the status of the execution:

Situation Message What should you do?
When the execution is successful. Extraction was successful ! Nothing.
When an error is identified, the return code of the extraction is interpreted and a functional message ERROR_MESSAGE is displayed.

Error while extracting Siebel Project : %ERROR_MESSAGE%

  • 1000: Missing configuration file %CONFIG_FILE%.
  • 1001: Check the log file %EXECUTION_LOG_FILE%.
  • 2000: Unable to establish a connection. Check the log file %EXECUTION_LOG_FILE%.
  • 2001: Error during the extraction. Check the log file %EXECUTION_LOG_FILE%.
  • Other: Java error. Contact CAST Support.
  • Validation error #-5: Repository ID <ID> contains multiple workspaces in the schema <schema>: Displayed when you attempt to run an extraction on a repository with the Workspace option enabled. If the Workspace option is enabled and you wish to perform an extraction, then you must apply the flattening process before you run the extraction, as per the following third-party documentation: https://docs.oracle.com/cd/E88140_01/books/UsingTools/using_workspaces39.html#wp1013245.
  • Please checks the logs, fix the configuration and retry the extraction.
  • If the issue is not a configuration issue, please contact the CAST Support.

Step 2 - .SiebelProject file configuration

Note that this file must be named with the exact same prefix as used for the Project repository .castextraction file, for example if you name the file SiebelExtract_Project.SiebelProject, the .castextraction file must be named SiebelExtract_Project.castextraction.

The Project repository requires a .SiebelProject configuration file that defines specific information required during the analysis:

  • The name of the Vanilla application or Analysis schema
  • Definition of Siebel specific rule contextual parameters

Below is a template .SiebelProject file - items in square brackets need to be manually defined:

<SiebelProjectConfig vanillaApplication="[application_name_or_analysis_schema_name]">
    <SiebelApplication name="[siebel_app_name]" vanillaName="[app_name_in_vanilla]"/>
    <QualityRule id="[rule_id]">
        <Parameter name="[parameter_name]" value="[parameter_value]"/>
    </QualityRule>
    <QualityRuleGroup name="companyPrefix" active="[true_or_false]">
        <QualityRule id="[rule_id]" active="[true_or_false]">
            <Parameter name="[parameter_name]" value="[parameter_value]"/>
        </QualityRule>
    </QualityRuleGroup>
</SiebelProjectConfig>

<SiebelProjectConfig>

This opening tag is required and defines the name of the Vanilla application defined in AIP Console. You can define either the Application name, or the corresponding Analysis schema name. Both are highlighted below and can be found in the AIP Console Admin Center (see Administration Center - Applications - Application Detailsexternal link):

In the above example, this would give the following when using the Application Name:

<SiebelProjectConfig vanillaApplication="Siebel_Project">

</SiebelProjectConfig>

<SiebelApplication> - optional

This line is optional and should only be used when the Siebel application name in the Project repository is not identical to the name used in the Vanilla repository. This can sometimes occur when the Siebel application name has been renamed manually in the Project repository. In the following example, the name in the Project repository is “Siebel eService” and the name in the Vanilla repository is “Siebel eService Default”:

<SiebelApplication name="Siebel eService" vanillaName="Siebel eService Default"/>

<QualityRule> and <Parameter>

This section allows you to define the contextual parameters for specific Siebel rules that will be triggered during the analysis, specifically to adapt them to your own environment. Use the tables below to create the entries you need. Note that if you DO NOT define an entry for a rule in the .SiebelProject file, then the rule WILL be triggered during the analysis, but will use the default parameter values provided in the Assessment Model.

Multiple values, char: as they are related to naming convention, they must be adapted to the project:

MetricID
(external ID)

Rule name

Parameter name

Default value

Project value

1520380

Siebel: Applet's name should contain the type

Siebel: Suffix Applet - Association List

Assoc Applet




Siebel: Suffix Applet - Detail

Detail Applet or Popup Applet




Siebel: Suffix Applet - MVG

Mvg Applet

MVG Applet



Siebel: Suffix Applet - Pick List

PickList Applet

Pick Applet



Siebel: Suffix Applet - Playbar

Playbar Applet




Siebel: Suffix Applet - Standard

Standard Applet




Siebel: Suffix Applet - Task

Task Applet

Form Applet

1521700

Siebel: Table's name should have a designated prefix like XX_LABEL

Siebel: Prefix Table

CX_


1521702

Siebel: Business Component's name should begin with Company prefix

Siebel: Prefix Business Component

AM_

ACME_

1521704

Siebel: Applet's name should begin with Company prefix

Siebel: Prefix Applet

AM_

ACME_

1521706

Siebel: View's name should begin with Company prefix

Siebel: Prefix View

AM_

ACME_

1521708

Siebel: Screen's name should begin with Company prefix

Siebel: Prefix Screen

AM_

ACME_

1521710

Siebel: Business Object's name should begin with Company prefix

Siebel: Prefix Business Object

AM_

ACME_

1521712

Siebel: Business Service's name should begin with Company prefix

Siebel: Prefix Business Service

AM_

ACME_

Single value, numerical: As a first approach, you can stick to the default values:

MetricID
(external ID)

Rule name

Parameter name

Default value

Project Value

1520180

Siebel eScript: Avoid Functions with High Cyclomatic Complexity

Siebel: Max CC

15


1520442

Siebel eScript: Avoid Functions with a low comment/code ratio

Siebel: Min comment ratio

5


1520494

Siebel eScript: Avoid complex PreGetFieldValue Functions

Siebel: Max LoC for PreGetFieldValue

50


1520540

Siebel: Avoid too many MVG on list applet

Siebel: Max MVG Applet

5


1520726

Siebel eScript: Avoid putting all code in the Applet_PreInvokeMethod event

Siebel: Max LoC for Service_PreInvokeMethod

20


1520728

Siebel eScript: Avoid putting all code in the Service_PreInvokeMethod event

Siebel: Max LoC for Service_PreInvokeMethod

20


1520730

Siebel eScript: Prefer SWITCH over nested IF-THEN-ELSE in Functions

Siebel: Max Nested IF

5


1520734

Siebel eScript: Avoid using multiple conditions in IF constructions in Functions

Siebel: Max Condition in IF

5


1520860

Siebel: Avoid Business Objects referencing too many Business Components

Siebel: Max Buscomp

50


1520862

Siebel: Avoid Business Components referencing more than X tables

Siebel: Max Table

40


1520864

SiebelReview: Too Many Applets on a View

Siebel: Max Applet

10


1520866

SiebelReview: Excessive Number of List Columns in a List Applet

Siebel: Max number of columns

50


1520868

Siebel eScript: Avoid Functions with more than X variables

Siebel: Max Variables

15


1520880

Siebel eScript: Avoid Functions with more than X Lines of Code

Siebel: Max LoC

50


In the following example, we have changed two contextual parameters for the rule 1520380 (Siebel: Applet’s name should contain the type), and one parameter value for the rule 1521702 (Siebel: Business Component’s name should begin with Company prefix):

<QualityRule id="1520380">
    <Parameter name="Siebel: Suffix Applet - MVG" value="MVG Applet"/>
    <Parameter name="Siebel: Suffix Applet - Pick List" value="Pick Applet"/>
</QualityRule>
<QualityRule id="1521702">
    <Parameter name="Siebel: Prefix Business Component" value="ACME_"/>
</QualityRule>

Step 3 - configure source code

You now need to configure the source code to deliver in AIP Console. There are two ways to deliver the source code, either in a ZIP file, or via a Source Folder Location:

Vanilla repository

Place the SiebelExtract_Vanilla.castextraction file (resulting from the extraction process in Step 1) in a folder called Vanilla. If you want to:

  • deliver via ZIP file, zip the folder called Vanilla to create a zip file called Vanilla.zip.
  • deliver via a Source Folder Location, copy the Vanilla folder to your defined Source Folder Location
Project repository

Place the following files in a folder called Project - note that the prefix of each file must be identical the other:

  • SiebelExtract_Project.castextraction file (resulting from the extraction process in Step 1)
  • SiebelExtract_Project.SiebelProject file (resulting from the configuration process in Step 2)

If you want to:

  • deliver via ZIP file, zip the folder called Project to create a zip file called Project.zip.
  • deliver via a Source Folder Location, copy the Project folder to your defined Source Folder Location

Step 4 - create Version, deliver source code and run analysis/snapshot

For each Application (Vanilla and Project) that you have created in Console, you need to now deliver the source code configured in Step 3 and run the analysis/snapshot. In Console, the process can be done in small steps, or in one go.

It is very important that you run the analysis and snapshot for the Vanilla application BEFORE you run the analysis and snapshot for the Project application.

Step 5 - check results

When the snapshot has been completed for both repositories, CAST highly recommends that you check the results.

All Siebel applications will have critical and non-critical violations. This is inherent to this development environment. So even with low customization ratios, the number of critical and non-critical violations will be 100s or 1000s.