Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Developer’s Reference
Collection by
Amzad Baig
(Amzad.baig@yahooo.com)
Page 1 of 60
Siebel Requirements, References & Solutions
Table of Contents
Introduction.................................................................................................................................. 4
1.1.Overview................................................................................................................................ 4
1.2.Document purpose................................................................................................................ 4
2.Audience................................................................................................................................... 4
3.Send Email Every 2 Hours – Case Study ................................................................................4
3.1.Requirement.......................................................................................................................... 4
3.2.Assumption............................................................................................................................ 4
3.3.Solution.................................................................................................................................. 4
4.Repeating Component Request Jobs.......................................................................................5
4.1.Example 1.............................................................................................................................. 5
4.2.Requirement:......................................................................................................................... 5
4.3.Solution:................................................................................................................................. 5
4.4.Example 2.............................................................................................................................. 5
4.5.Requirement:......................................................................................................................... 5
4.6.Solution:................................................................................................................................. 5
4.7.Example 3.............................................................................................................................. 5
4.8.Requirement:......................................................................................................................... 5
4.9.Solution:................................................................................................................................. 5
5.How to create an RCR?............................................................................................................ 5
6.How to send mail in Siebel using Communication Outbound Manager?..................................7
7.Siebel Workflow Process – Introduction...................................................................................8
8.How to invoke a Workflow Process?......................................................................................... 9
8.1.Runtime Events..................................................................................................................... 9
8.2.Administration Runtime........................................................................................................ 10
8.3.Scripting............................................................................................................................... 10
8.4.User Property....................................................................................................................... 11
8.5.Workflow Policy................................................................................................................... 11
9.How to Track Workflow Execution?........................................................................................12
10.Siebel Logs - How Useful are they?......................................................................................13
11.How to call a Workflow Asynchronously?.............................................................................15
12.ADM – Introduction............................................................................................................... 18
12.1.How to implement ADM?................................................................................................... 19
12.2.Import/Export..................................................................................................................... 19
12.3.UI Session......................................................................................................................... 20
12.4.Batch Deployment............................................................................................................. 21
12.5.Faqs – ADM....................................................................................................................... 21
13.External Business Component – EBC..................................................................................23
13.1.Limitations.......................................................................................................................... 23
13.2.Advantages........................................................................................................................ 23
14.Siebel EBC VS VBC............................................................................................................. 23
14.1.Base Table......................................................................................................................... 23
14.2.Business Layer VS Database Layer..................................................................................24
14.3.Purpose............................................................................................................................. 24
14.4.Effort.................................................................................................................................. 24
15.How to Create an EBC......................................................................................................... 24
15.1.Getting a DDL File............................................................................................................. 25
15.2.Import DDL file in Siebel Tools..........................................................................................25
15.3.Create the Table................................................................................................................ 25
15.4.Configure the Table........................................................................................................... 26
15.5.Configuring BC and Data source.......................................................................................27
15.6.Creating Business Component.......................................................................................... 27
15.7.Configuring Business Component.....................................................................................27
Page 2 of 60
Siebel Requirements, References & Solutions
Page 3 of 60
Siebel Requirements, References & Solutions
Introduction
Overview
<<To be written>>.
Document purpose
<<To be written>>.
Audience
This document is intended for use by
Siebel Business Analysts.
Siebel Dev. Team.
Siebel Application Administrator Team.
Assumption
While giving the solution below I am assuming that initial status of Service
Request is Open and we need to send the mail until the status is not change from
Open to something else.
Solution
Create an RCR Job that will run every hour.
RCR will call a business service that will have following logic
Query for SR’s with status as Open
In loop process each SR and evaluate the following condition
While(isSRRecord)
{
CurDate = new Date();
CurTime = CurDate.getTime();
CreatedDate = SRBC.GetFieldValue(“Created”);
CreatedDate = new Date(CreatedDate);
CreatedTime = CreatedDate.getTime();
TotalAge = ( CurTime – CreatedTime) / (1000*60*60)
if (TotalAge > 2)
{
SendEmail to owner
}
} //don’t forget to declare all these variables outside the loop
Page 4 of 60
Siebel Requirements, References & Solutions
Example 1
Requirement:
Siebel needs to be integrated with external application via MQSeries. External
application will put an XML in the MQSeries queue and Siebel needs to poll
regularly to check if there is an XML file available in the MQ Channel and process it.
Solution:
Create a workflow that will process XML after picking it up from MQ Channel.
Create an RCR job that will be execute this workflow every 5 minutes to check for
an available XML in the queue.
Example 2
Requirement:
Siebel needs to run Fulcrum search functionality available in Siebel. Indexes of
the object on which Fulcrum is going to run are needs to be updated on daily basis.
Solution:
Create an RCR job to run the components on daily basis which will result in
updating of indexes.
Example 3
Requirement:
We need to check if an SR created 2 days from today has been updated or not
and if not then we need to send an email.,
Solution:
Create a workflow to fulfil the requirement and then create an RCR to run this
workflow on daily basis on time where the usage of the application is not very high.
Page 5 of 60
Siebel Requirements, References & Solutions
Click on New button in the Screen. Enter the value in the following fields.
Component/Job: Workflow Process Manager
Schedule Start: Date/Time when you want you job to start
The name of the workflow that you want to execute repeatedly. You can
give more than one workflows for the same job they will be executed one
after another)
Click on Start and refresh the applet, if the job status goes to Active that
means that you RCR have been successfully deployed.
Page 6 of 60
Siebel Requirements, References & Solutions
You can check the status of jobs that are executed after repeated interval in the
Repeating Instance Tab.
Page 7 of 60
Siebel Requirements, References & Solutions
Page 8 of 60
Siebel Requirements, References & Solutions
Long Running Workflows: Workflows that can last for hours, days or
months
Interactive Flow: Workflow that takes user across Siebel views.
Service Flow: Executes a set of operations upon even invocation. This
is the most common type of workflow process we created.
Runtime Events
In the Workflow Step Branch: window below provide the details at which
you want to this workflow to execute. For example If I want my workflow to be
invoked at write record of Action buscomp then I will enter the following detail
Page 9 of 60
Siebel Requirements, References & Solutions
Administration Runtime
For example: WriteRecord runtime event for object type BusComp will fire
before BusComp_WriteRecord event.
Even Spaces matter in Business Service Context value after there is a space
after comma and then workflow name. Now you can define the event according to
your requirement which will call this Action Set
Scripting
To call a workflow process from scripting you can use the code given below
Page 10 of 60
Siebel Requirements, References & Solutions
Here any property that you set in input property set will be assigned to
corresponding process property in the Workflow Process (WFP) as in the
above example
above line of code will result in process property called “Opportunity Id” in WFP to
assigned the value of variable vOppId.
User Property
Till Siebel 7.5 the only methods known to invoke workflows were:
Runtime Events in start step of workflow
Business Service
Business Component Script
Workflow Policies
From Siebel 7.7 onwards there is one more method by which we can invoke a
workflow. That way is Siebel business Component user property. You can “Named
Method n” user property in a BC which can invoke a workflow where n is increment
to the last named method user property defined on that BC.
Name: Named Method n
Value: [Event Name] , “INVOKESVC”, , “Workflow Process Manager”,
“RunProcess”, ‘ProcessName’,[Name of the Workflows] , ‘RowId’, [Row Id Value]
Example: The below mentioned will invoke a workflow named ‘Example Workflow’
when a new record is created in Example BC.
Name: Named Method 1
Value: “New Record”, “INVOKESVC”, “Example”, “Workflow Process Manager”,
“RunProcess”, “‘ProcessName’”, “Example Wrokflow”, “‘RowId’”, “[Id]”
Workflow Policy
Workflow Process can also be called from workflow policy. We can define a
workflow policy (WFP) in Administration – Business Process Policy.
After you have created a workflow policy record and specified appropriate
conditions, in the argument section choose:
Argument: Process Name
Value: Workflow Process Name
Page 11 of 60
Siebel Requirements, References & Solutions
Page 12 of 60
Siebel Requirements, References & Solutions
After you do that there are 2 tables those will contain the information about
that Workflow process.
WFA_DEFN_LOG
S_WFA_INST_LOG
You can query in these table to get various type of information such as
execution time, status after execution, the step at which got error out etc. Given
below is a sample query which you can use.
select b.row_id, a.NAME, b.STATUS_CD, a.busobj_name from
siebel.S_WFA_DEFN_LOG a, siebel.S_WFA_INST_LOG b where
b.definition_id = a.row_id and a.deploy_status_cd = 'ACTIVE'
If you want to track a particular workflow then you can modify the query to
the following:
select b.row_id,a.NAME,b.STATUS_CD,a.busobj_name from
siebel.S_WFA_DEFN_LOG a,siebel.S_WFA_INST_LOG b where
b.definition_id = a.row_id and a.deploy_status_cd = 'ACTIVE' and
a.Name = ‘Name of the workflow’
Another way of monitoring the workflows is increasing the monitoring level
in the UI. Go to Administrator Business Process Workflow Deployment and
query for the workflow which needs to be monitored and in the bottom applet of
the queried workflow, there is a column called “Monitoring Level” change it to max
4(debug). This captures the process as it goes thru ever step and makes our live
easy in fixing the issue.
Page 13 of 60
Siebel Requirements, References & Solutions
Here we discuss ways which can help us get logs from dedicated clients and
speed up our debugging and development time.
Dedicated Client: There are essentially two ways to get logs from dedicated
client.
Spool
Environmental Variable
Spool: It is a very basic and known technique to get the spool of all the SQL
Queries that are fired in the database level and we all come across it during our
initial Siebel development days. We can enable the spool for Siebel Client as well
as Siebel Tools. The steps to enable spool for both the Siebel tools and client there
is common process which is as following:
1. Right click the Siebel tools or Siebel Client Shortcut
2. Go to end of String which is in Target Text Field
3. Enter the Following string at the end: /s "c:\spool.txt"
/s switch here stands for Spool. Various other switches that can be used are as
following:
/u : username
/p : password
/d : database
With the following string you can automate login to your local or sample database
depending on the value you give in the switch. I am providing you examples of
both
/u sadmin /p sadmin /d sample: String to login to Sample database with
sadmin user id.
/u user /p pwd /d local: String to login to Local database with "user" user id.
Environmental Variable: This is more powerful and less known method of
generating logs for dedicated client. Siebel has provided couple of Environmental
Variables which are as following:
SIEBEL_LOG_EVENTS
SIEBEL_LOG_DIR
SIEBEL_LOG_EVENTS: This environmental variable can have two types of values
numeric or text. The numeric value is the log level which can be between 1-4. 1
being the lowest and 4 being the highest. The Text value can be ALL which means
Log Level of 4.
SIEBEL_LOG_DIR: This value of this variable is path where you want to create
the logs. Makes sure that the path you mention is valid otherwise the logs will be
created in the temp directory.
Examples of both the environmental variables are as following:
Page 14 of 60
Siebel Requirements, References & Solutions
SIEBEL_LOG_EVENTS: ALL
SIEBEL_LOG_DIR: C:\siebel_logs
The process to create these environmental variables is as following:
1. Right click on the My Computer Icon
2. Select Properties from context menu
3. Go to ==> Advanced Tab
4. Click ==> Environmental Variables
5. In User Environmental Variables Tab click New
6. Enter SIEBEL_LOG_EVENTS in Variable Name field
7. Enter ALL in Variable Value Field
8. Click New again and Enter the following details
9. Variable Name : SIEBEL_LOG_DIR ; Variable Value : "your Siebel
log path"
Remember that Variable Names are case Sensitive. After you have created
the variables when you start you dedicated client you will notice that in the path
that you have given a file named siebel.log is created for Dedicated Client and file
named siebel_dev is created for Siebel Tools.
Note: If you don't provide the SIEBEL_LOG_DIR environmental variable the logs
are created by default in Temp Directory.
how we can use them to our advantage . We all want the response time of our
Application to be as fast as it can and we do everything that we can to achieve
that. I am going to tell you about a way which can help you to reduce the response
time without actually reducing any functionality. Siebel can execute workflows in
two ways.
Synchronous
Asynchronous
Synchronous Execution: When workflows are executed synchronously then user
gets the control back only when the workflow has finished it execution.
Page 15 of 60
Siebel Requirements, References & Solutions
Workflow Policy
Runtime Event and Business Service (BS) Combination
Workflow Policy is pretty traditional method of executing a workflow process.
You create a policy. Enter the conditions. Specify the workflow to be executed.
Generate Triggers. I wouldn't go into details of creating a policy but I will tell you
some disadvantages of using Workflow Policy
1. Slow Execution
2. Difficult to setup
3. Not Reliable and Error Prone
But from Siebel 7.7 onwards we have another more robust, efficient and
quicker way to do that which is Runtime Events and Business Service.
The actual process of Setting up Runtime Event and Business Service assuming
you have working knowledge of both. Just one important thing that you should
know about runtime events is that they are executed even before the Business
Component Events. To explain it better I am taking an example where our
requirement is to execute a workflow when you click Submit Oppty button on
Opportunity Form Applet.
Page 16 of 60
Siebel Requirements, References & Solutions
Now Goto Events view and Follow the steps given below
Sequence = 1
Object Type = "Applet"
Object Name = "Opportnity Form Applet"
Event = "InvokeMethod"
Sub Event = "Submit Oppty"
Action Set = "TestRunTimeEvent"
Conditional Expression should be given if you want to restrict the
execution of this Runtime Event to certain conditions and Action Set Name
is always the name of the action set that we created.
Now we are through the Runtime Event parts. What we have done so far is
that when user clicks Submit Oppty button it is going to call BS named TestBS with
method as "TestMethod".
Now we are going to write the code in the business service which will
actually result in the execution of Workflow Process Asynchronously.
if(MethodName == "TestMethod")
{
var svc;
Page 17 of 60
Siebel Requirements, References & Solutions
var child;
var input;
var output;
var rowid;
var bo = TheApplication().ActiveBusObject();
var bc = bo.GetBusComp("Opportunity"); // Change the BusComp name with
the name of the BusComp you want to execute the workflow with
svc = TheApplication().GetService("Asynchronous Server Requests"); // Don't
change this - Actual BS that is responsible for submitting a job to WPM
input = TheApplication().NewPropertySet();
child = TheApplication().NewPropertySet();
output = TheApplication().NewPropertySet();
input.SetProperty("Component", "WfProcMgr");
rowid = bc.GetFieldValue("Id");
// We would like to pass the row id of the Current record on which the user is
working - You can pass more than one arguments
child.SetProperty("ProcessName", "Service Agreement - Agreement
Status"); // Workflow process you want to execute
child.SetProperty("RowId", rowid); // passing the values
input.AddChild(child);
svc.InvokeMethod("SubmitRequest", input, output); /// invoking the business
service method
svc = null; // nullfiying the objects
child = null;
output = null;
input = null;
return(CancelOperation);
}
ADM – Introduction.
Application Deployment Manager (ADM) functionality available in Siebel is quite
less known and used but very useful to reduce manual effort of moving various
entities between environments. This post is going to be an introduction about
Application Deployment Manager (ADM). We all (may be not all but most of us) has
been part of Siebel release at one time or the other. Dev2Prod utility provided by
Siebel can automate movement of Repository related data between environments
but it cannot move application related data.
Page 18 of 60
Siebel Requirements, References & Solutions
List of Values
View
Responsibilities
Business Services
Runtime Events
and many more things.
Note: ADM is only recommended if the amount of data that is to be moved is less
otherwise EIM is the preferred option.
There are only few entities that are available in vanilla ADM functionality
that we can move such as LOV, Views, State Model, Assignment Rules etc. but
ADM is not confined to that only we can add customized entities such as Business
services, Runtime Events. You can see ADM related views by going to Site Map
Application Deployment Manager
Import/Export
UI Session
Batch Deployment
Import/Export
Page 19 of 60
Siebel Requirements, References & Solutions
But it is easier said than done. So, here are some points that you need to keep in
mind.
UI Session
This process is very simple to execute but a bit tricky to implement. In this
process you
Page 20 of 60
Siebel Requirements, References & Solutions
Batch Deployment
This approach is least preferred and never explored into detail but just to
give you the overview. You can run an ADM job from command line.
Pre-requisites are that you need to modify couple of workflows and there
should a shared folder accessible to both source and target environments. If you
want more details about this method the please go through bookshelf.
Faqs – ADM
Question: What are the limitations of ADM? What it can move and what it can not?
Answer: Theoretically it can move any kind of entities but all the entities are not
available OOB (Out of Box). But you can create Integration Object for any entity
and use it for ADM.
Question: What is the interface? Can it run for all data types (Database type,
repository type & file type) via command prompt without any manual intervention?
What needs to be done additionally?
Answer: ADM can be run form Siebel Application and Command Prompt both. In
Siebel 8.0, ADM can be use to transfer Application Data, Repository Data and also
for SWT and SRF files but in Siebel 7.x File Type (SRF and SWT) can be transfered
through ADM.
To run it successfully from command prompt you need to modify some workflows
and need to activate some workflows in case you are going to run it from
Application. In addition to that there should EAI Object manager available on
Target System. Complete steps are available in bookshelf of running it through
application and command prompt.
Answer: I am not quite sure about this but It uses Integration object and EAI
Siebel Adapter “Upsert” method so if you know how it works then you have your
answer. If not then here is an overview. Upsert method never results in deletion of
Page 21 of 60
Siebel Requirements, References & Solutions
records it queries for record based on User key and update if record is found it
updates otherwise it inserts the record.
Question: What happens if DB goes down while ADM is running? Will it rollback or
it will maintain a state and restart after DB comes back?
Answer: Yes, it has a rollback option in Siebel 8.0 but I am not sure about Siebel
7.x but I think it uses EAI Siebel Adapter so ideally the transaction will be reverted
back if it doesn’t complete.
In Siebel 8.0 you need to mention if it should backup the data or not. If you choose
yes then it will take care of reverting back in case if an error occurs in between the
process.
Question: Can I stop ADM in between and start again? I have seen we can start it
again, but does it maintain the state? If yes, how does it maintain it?
Answer: No, I don’t think we can stop and start it at our will.
Question: I have read that it backs up the data in the target environment before
deploying & activating. How does it take the backup and what does it take the
backup?
Answer: Yes, it does backup in Siebel 8.0 if you specify and it takes backup in
form of XML files. The process is:
Answer: OOB of box ADM is just activating some workflows and follow steps given
in bookshelf. But if you want certain custom entities to be added then effort can
increase.
Answer: By size I assume that you are asking how much data can be transferred.
Well I don’t have an exact figure but I think I read somewhere that if exported
data should not exceed 4 MB. So to make sure that you are in limit you can export
the XML file and see it is adheres to 4 MB limit. But it will better to ask Siebel for
an exact figure.
Answer: I don’t think you need to write scripts to customize it. It is as simple as
creating an IO for your customized entity and use it.
Page 22 of 60
External Business Component – EBC
External Business Component (EBC) is another way of integrating
Siebel with External Applications. It is another tool available at your disposal to
achieve integration. EBC is an easy and robust way to integrate Siebel. Here is
how it works:
When you access that view, Siebel in real-time using that data source
connects to external table and displays you the data. You even have option to
update, insert and delete records from Siebel.
Limitations
1. If you import a database view instead of DDL then you cannot
update or insert records.
2. Joins to base tables in EBC usually don’t work.
3. External database must be accessible directly to Siebel.
4. Performance can be an issue if database connectivity is not
good.
Advantages
1. You can integrate with external application with minimal of effort.
2. Siebel BC can base joins on External table and display
information.
3. You can import tables from different databases such as DB2, MS
SQL, Siebel Analytics.
You can read more about EBC in Siebel Bookshelf.
Purpose
EBC: The purpose of an EBC is to view, update, insert and delete data
available in external database. It is always used to integrate with
external applications
VBC: The purpose of VBC is usually to view external data that we don’t
want to store in Siebel. It is not necessary to use VBC only for
integration. For example If I want to view Product Configurator
information in typical Siebel Applets and Views then I can use VBC to
achive this.
Effort
EBC: It is very easy to create and configure EBC. You just need to
import external tabe definition and after that you can use usual Siebel
Configuration techniques and create BC, Applets and Views based on
EBC without any difficulty
VBC: You have to write script for handling each and every event that
you want your VBC to support such as Query, Insert and Init etc. So, I
would say effort required is greater in VBC
After that you can use this BC just like any other Siebel BC with some
limitations.
Getting a DDL File
Table used in this example is oracle database table and you can get
DDL of oracle database using Toad or SQL Developer any tool provided by
oracle to interact with database.
Steps required for creating and configuring the table in Siebel Tools:
Create a new record in Data Sources List applet.
Provide the name of data source that you will use to connect to this
table.
Select the column object of this table and query for ROW_ID in Alias
Field.
In System Field Mapping select the Id value from dropdown (This is
the only mapping that is mandatory but you can map different
system fields also).
There are two important things that you will need to do this BC for it to
work.
Once you configure these details then you can use this BC in your
configuration just like any other BC. You can base your Applets on this BC and
create Views.
And the configuration in the Siebel tools is now over. There is just one more
thing that you need to do, to make all this work.
In the Component Definitions list applet, select your Application Object Manager
Component.
For example, select the Call Center Object Manager (ENU).
Choose Start Reconfiguration from the Menu drop-down list on the Component
Definitions list applet. The Definition State of the component will be set to
Reconfiguring. Reselect your application component after selecting the Start
Reconfiguring menu item.
In the Component Parameters list applet, query for OM - Named Data Source
name, and update the Value by adding the alias name of the data source specified
in the “To configure the data source definition” section. The format of the OM -
Named Data Source name parameter is a comma-delimited list of data
source aliases. It is recommended that you do not modify the default values, and
that you add their new data sources to the pre-existing list.
After the parameter values are reconfigured, commit the new configuration by
selecting Commit Reconfiguration from the Menu drop-down list on the Component
Definitions list applet.
The new parameter values are merged at the enterprise level.
To cancel the reconfiguration before it has been committed, select Cancel
Reconfiguration from the Menu drop-down list on the Component Definitions list
applet.
To configure the data source definition
Navigate to Administration - Server Configuration > Enterprises > Profile Configuration.
Copy an existing InfraDatasources named subsystem type.
Change the Profile and Alias properties to the Data Source name configured in Siebel Tools.
Update the profile parameters to correspond to the external RDBMS:
As we just want to see static site so will not provide any arguments.
Now our Symbolic URL is ready let us go to Siebel tools to do required
configuration to display it in GoogleSearch Screen.
Go to Business Component that you will base your applet upon. In
this example we use Account.
Create a new calculated field and provide the following detail:
Name: GoogleSearch
Calculated: True
Calculated Value: “GoogleSearch” [Name of the Symbolic URL we
just created and don’t forget to put quotes around it]
Now go to list column section of this field and provide following details
for a lone record that is available
Name: GoogleSearch
Field: GoogleSearch
Field Retrieval Type: Symbolic URL
Don’t forget to expose this field in Applet Web Layout and make
sure you expose it in base mode.
Now let’s create a view that will have our applet. Again here you can use
Wizard to create a new view or just copy existing Analytics View.
The Web Template of the new view should be “Analytics View”.
Copy an existing view “SSO Analytics Administration View” and provide
the following details:
Name: GoogleSearch
Business Object: Account
Visibility Applet: GoogleSearch
In View Web Template Item object give the following details:
Name: GoogleSearch
Applet: GoogleSearch
Applet Mode: Base
The final step is to create a Screen which will contain this view.
- Add that screen to your Application
- Register the view in Application.
Compile the View, BC, Application, Screen, Applet objects that you just created or
modified and the final result that you will get is shown below.
List of Values
List of Values (LOV) is assumed to pretty simple entity in Siebel and having
very limited use, of showing values in dropdown picklist. But, they can be used in
more than one ways. They can be a real life saver. One use of them is to avoid
hard coding. Yes, you can avoid hard coding of values and use LOV instead which
you can then change without SRF Release.
How to create a new LOV?
You can create an LOV from two places both have a different way of
creating LOV in Siebel CRM.
Administration – Data List of Values
Administration – Data LOV Explorer
Through List of Values to add a new LOV following steps have to be
followed. As an Example we will add a new LOV for Martial Status of a person.
1. Click New and choose LOV_TYPE in Type field.
2. Enter MARITAL_LOV in ‘Display Value’.
3. Enter ‘Marital Status’ in Language-Independent Code field.
4. Enter ‘English-American’ if you implementation language is English
otherwise it will be according to the language of your
implementation. Save the record.
5. Click New again and choose ‘MARITAL_LOV’ in Type field.
6. Enter ‘Married’ in Display Value and Language-Independent
Code field.
7. Enter ‘English-American’ if you implementation language is English
otherwise it will be according to the language of your
implementation. Save the record.
8. Follow steps 5 -7 for all values that you want to associate with this
LOV.
For example we will follow steps 5 - 7 and just change the value Married to
Single so that it can have two values ‘Married’ and ‘Single’.
Through LOV Explorer you have to perform the following steps.
1. Click New and enter ‘MARITAL_LOV’ in the Type field.
2. Click on the + sign in the left hand side of the LOV Explorer pane
for the type that you created.
3. Click on the Values folder.
4. In the Right hand side Applet click on New.
5. Enter ‘Married’ in the ‘Code’ and ‘Display Value’ field.
6. Enter ‘English-American’ if you implementation language is English
otherwise it will be according to the language of your
implementation. Save the record.
7. Repeat steps 4-6 for the all the values that you want to enter.
That’s it. You are done with creating the New LOV with new Values
To enter New Values in the existing Siebel LOV just perform the
following steps.
1. Query for the LOV Type that you want to add New values.
2. Copy the record Enter the Display Value and Language
Independent Code field.
3. Change the value in the Order Field to be the unique number and
save the record.
Here are some real scenarios where List of Values are used to accomplish
task which otherwise would have a real pain while moving stuff different
environments.
Scenario 1
Requirement
We were creating workflows that were going to integrate Siebel with some
other application with the help of MQ Series. Now, to accomplish that we had to
enter two parameters related to MQ Series in the first step of workflows, Queue
Manager and Physical Queue Name. If, we were to hardcode then it would be
difficult to move workflow between different environments such as QA and
production because they had different Physical Queue Name.
Solution:
There LOV’s came to our Rescue. We created two LOV’s with the values of
the Queue Manager and Queue Name and used LookupValue() method in
workflows to accomplish that. LookupValue() method accepts two arguments
‘LOV Type’ and Language Independent Code (’LIC’) and returns the display value of
that LOV Type. The syntax is as following:
LookupValue(”LOV Type”,”LIC”)
Example:
Create a new LOV Type (like MQ_PHY_QUEUE_NAME. It should be same
in all the environments where you want to deploy the workflow).
Enter the Display Value (actual value that you want to specify like
SIEDEV1 for dev environment and SIEBQA for QA environment).
Enter the LIC (can be anything descriptive like ‘Physical Queue Name’).
In the Input Arguments of workflow choose input argument type as
Expression and specify the value as follows:
LookupValue(”MQ_PHY_QUEUE_NAME”,”Physical Queue Name”)
Now, it is going to pick the value as ‘Display Value’ of the LOV specified.
Scenario 2
Requirement
Siebel Service Request module was to be implemented because of a new
implementation the business requirements were being changed all the time. One
Strange requirement was to make the Required Fields of a business component
dynamic. So that they can be changed without a release. Now, we all know one
way to make a field required is to set the Required Property of the field to true.
But that would mean that if I were to change that a new SRF deployment will be
required.
Solution:
LOV’s again were the life saver here. We created an LOV called
SRV_REQ_FIELD and in the Display value we provided the names of the fields that
we wanted as Required Fields. In the Business Component Pre_WriteRecord event
we queried for that particular LOV and traversed through the records that were
active. If the Field provided in the LOV did not contained a value then an error was
raise stating that the value for that particular required field was not supplied. Given
below the Pseudo Code for the script might look like
BOLOV = TheApplication().GetBusObject(”List Of Values”);
BCLOV = BOLOV.GetBusComp(”List Of Values”);
with (BCLOV)
{
Query for LOV Type as ‘SR_REQ_FIELD’ and Active Flag = ‘Y’
}
IsRecord = BCLOV.FirstRecord();
while( Last record is not reached)
{
this.ActivateField(BCLOV.GetFieldValue(”Name”));
if ( this.GetFieldValue(BCLOV.GetFieldValue(”Name”)) == “” )
Raise Errro Text (”Value not given”)
BCLOV.NextRecord();
}
This solution is not recommended if the number of fields that are
required is fairly large. But still can be really handy in many situations.
Usage:
It is a field level user property. Follow the steps given below to define
this property.
Open Siebel Tools and query for the BC which contains the field on
which you want to define the user property.
Query for the Field.
Click on the + sign on Field Object in Object Explorer.
Select Field User Property Object.
In the Field User Property List Applet create a New Record and provide
following detail:
Name: Use Literals For Like
Value: TRUE
And you are done. After you do that the query generated on backend will
not use bind variables for this particular column and your query will look like
(T11.LAST_NAME LIKE ‘SADMIN%’)
User Property – Text Length Override
Lot of time we have requirement which involves restricting user input to
certain length. Most common way to do that is to specify the Text Length
property of the field. I used to do that until recently when I came to know that
even after specifying field length user was able to enter more than the allowed
limit.
Going through the bookshelf I read a note which said
“Text Length property is usually ignored and the length is retrieved from the
underlying column definition”
So, that in effect means that whatever is the column length at the
database level is limit at the BC level too. But that is not what we wanted so
after further exploration we came across a user property that could help us to
limit length without modifying the column at database level.
Text Length Override and it can have a value as TRUE which means
enforce the Text Length field property or it can have a different value such as 10
or 20 which means that will become the new limit.
Here is a step by step procedure on how to use this user property.
Query for the BC in which the desired field is present.
Select the field on which you want to enforce the limit.
In object explorer click on the + sign against field and select User Property option
as shown below:
User Property: You can also use User Property called ‘Required’ to make a field
required on conditional basis.
There is only one limitation of this user property that the class of the BC should be
either CSSBCBase or inherited from CSSBCBase
Syntax: Required
Procedure:
Example:
We Assume that we want to make Field called Full Name to be required if Name Flag
Field is Y. So you user property will be like below.
Name Value
Required IIf ([Name] = “Y”, “Y”, “N”)
Deep Copy n
Deep Delete n
Deep Copy n:
Syntax:
Name : Deep Copy n
Value : Child Business Component Name
Normally when you click copy button of Quote only Quote is copied. None of its child
records are copied.Our requirement is to copy Quote item, quote attachment and
Order (Child BC of Quote) when we copy Quote record then we can make use Deep
Copy user property. Now to implement our requirement we will have to follow the
steps given below:
2. Add a multivalue link in the parent business component for each child business
component.
3. Create a multivalue field in the parent business component from each child business
component specifying the multivalue link to use.
4. Set the No Copy property of that multivalue link to TRUE
Deep Delete n
Syntax:
Name: Deep Delete n
Value: Child Business Component Name
If we continue with the above example then we would want to delete these children also
when we delete the quote record.
To accomplish that we would follow the following steps
Setting No Copy to TRUE will allow you copy child BC with Deep Copy user
property and setting No Delete to TRUE will allow to delete child BC with the help of
Deep delete User Property.
Set the Read only property on applet object to true for that field.
Set the Read Only property of that field to true. (But this property is rarely used and
doesn’t make any sense to create a field and then to make it read only… anybody any
pointers)
Field Read Only Field: fieldname user property is used to make the field read only
Syntax:
Property Name
Field Read Only Field: Status
Value
Status Flag
BC Read only Field user property is used to make the BC Record Read only.
Syntax:
Property Name
BC Read Only Field
Value
Status
Here value is the name of the field that will determine whether the Record will become
read only or not. If the value of the field specified is evaluated to true then Record will
be read only otherwise editatble.
Problem:
After changing the Quote status to ‘Priced’ when we tried to change the status of
Quote Item to ‘Priced’ we received an error
There was no Field Read Only Field: [fieldname] or BC Read Only Field which could
result in making that record or that field read only .
Reason:
After struggling for few hours we saw another user property called ‘Parent Read Only
Field’ which had a value something like this
IIF([status] = “Priced”,”Y”,”N”)
After going through bookshelf we found out that this user property will make the
child record read only based on the value in Parent Record.
Solution
To overcome this problem we changed the quote item status first and then the quote
status ( Pretty Simple Isn’t it)
Siebel Client
Siebel Tools
There is nothing different in the scripting that we do but there are differences in how
these business services are executed.
Client side is SRF independent and Tools is SRF dependent (Which means an SRF
change is required even if we want to make a slight change)
Siebel Client BS Compiled at Runtime and Siebel Tools BS is compiled when we
compile the SRF
When you have to make decision of writing a Business Service following factors can
affect your decision.
Flexibility: Client BS offers you ultimate flexibility as you can change the code
anytime you want to. So, if flexibility is more important to you then Client BS is for
you.
IDE: From developers perspective Tools BS provides you better IDE and better syntax
checking. Client Side BS has a crappy IDE and zilch syntax checking,just a field where
we write the code.(I have spent hours debugging Client Side BS just to find out that I
had misspelled a variable name )
But still I have not come across even a single solid point that can help us to determine
exactly when we should use Client Side BS or Tools Side BS. It mostly depends on
developer’s choice who is writing the BS. So, I am leaving this post as an open
question asking you all about your inputs which can help us to take right decision as
right time.
Implicit Join: - Implicit Join are those which are already define in Siebel and which
are internally use by the Siebel to pull the values from the other than base table.
example: - join between base table and extension table like S_OPTY and S_OPTY_X
and join between S_PARTY and S_ORG_EXT
Explicit Joints: - Explicit Joints are those which are define by the developer to create
the relationship between two tables.
Let’s take a real life example to understand the concept of Joins better.
We have one table of the Employee where Name, Employee Id and other information
about the employee is stored.
Another table stores a list of Cities.
Requirement is to know which user stays in which city. There are two ways to do it
Store city in the Employee table which will result in data redundancy.
Store Primary key of city table in the employee table and pull the values at the run time,
which is more efficient and makes more sense.
You have to follow the following five steps to have joined field on UI in Siebel
Suppose we want to have Opportunity Name on the Quote Applet. Here is a step by
step procedure with screen shots explaining how to do that.
To configure a Join, first of all we have to find out a column in the base table where we
can store primary key say (ROW_ID) of opportunity in quote which will become the
basis of join.
If there is no column vacant in the base table we can use extension table for that base
table e.g S_DOC_QUOTE_X for the S_DOC_QUOTE.
Note: Make sure that the column you choose is not being used by any other BC or
any other field of same BC.
2. Configure Field in Business Component
Note: The column which you have selected must have physical Type varchar.
Our Foreign key is now ready for use. Now we have to configure a joined Field which
will use this foreign key
3. Configure/Create a Join
Go to Object List Explorer (OBLE) on the left hand side and click + sign beside join
there will be two options Join Specification and Join Constraints
5. Configure the field (Opportunity Name) which you want to display on the User
Interface.
Don’t forget to map this field in Applet. Right Click on the corresponding Applet and
map it.
Now compile the entire project which you have made the changes and you will be able
to see this joined field in the Quote Applet as shown in the picture below.
When you see this field in User Interface it will be read only because when the data is
pull from the join table it is only read only, to make it editable you have configure Pick
Applet on this field.
Search Specification is criteria that we can apply on an Siebel object to restrict the
amount of data that reaches the user.
You can apply search specification on objects like BC, Applet, Picklists etc.
Search Specification becomes a part of where clause when the query is executed on the
database hence only those records are brought back those satisfy the criteria.
For quite a considerable time I thought Search Specification can only be static, meaning once
you give the criteria on a particular object then you need change SRF in order to make a
change in that. But I was wrong, we can have a dynamic search spec too but that can result in
performance impact.
We can use
LookupValue function
GetProfileAttr function
Above said two functions can help us to create a dynamic search spec.
We can also use * as wild character in our Search Specification for example
Requirement
Two fields having 2 Picklists
Country and State
Based on country selected in country Picklist, only state corresponding to that country
should be displayed in state Picklist
For example
Country = US then State Picklist should display only Ohio, Georgia, Texas
Country = India then State Picklist should display M.P, U.P, A.P, Delhi etc
This post assumes that you have already created two Picklists and configured them
properly. Coverage of Picklist configuration is not in scope of this post but if you need
let me know I will be more than happy to include in my next posts
Solution
Query for the BC in which you Picklist Field is created
2. Select the Field to which you have mapped your Picklist
Expand its child PickMap
There should already be one record with the values shown below that you created
during you configuration of Picklist
Field: State
Picklist Field: Value
Add another record in PickMap as shown below
Field: Country
Constraint: TRUE
Picklist Field: Description
Your configuration of constraint Picklist is not complete you should be able to state
values based on country field.
We can implement the same behavior in a list applet. Please follow the below steps:
1. Select a List applet (e.g., Activity List Applet) and its BC (e.g., Action).
2. In the business component, create a new calculated field.
3. In the calculated value (e.g., Status Indicator), frame the logic that returns any of the
status value as mentioned above(e.g., IIF([TimeDiff] >0, “Unavailable”, IIF(([TimeDiff] >
-24), “Offline”,”Online”))
4. Go to the List Applet. and create a new List Column “Status Indicator” and set the
following properties as below.
HTML Icon Map = Server Administration Icon
HTML Type = Label
HTML List Edit = FALSE
Run Time = TRUE
5. In the List Applet, add the control “Status Indicator”.
6. Compile the BC and Applet.
7. In the application, go to the list applet and observe that the column “Status Indicator” is
displayed as in server administrator screen.
To be honest, I was surprised at the simplicity of the workflow. It is a really nice example, how
the Siebel framework works.
is built as follows:
Note that the Siebel Operations have an output argument which is useful to get the
number of affected records.
Note #3: The fairly new Siebel Operation NextRecord (along with its
siblings PreviousRecord and QueryBiDirectional) has been
introduced in Siebel 8.0. It is the first version that allows us to loop
through a record set in a workflow without being outwitted by the
complexity of looping. The NextRecord operation has an output
argument of NoMoreRecords (true or false) which must be used in
a decision step to determine whether the loop has to end or not.
Hope you enjoyed this small workflow series. If you want more, drop
a comment ;-)
Note that you can use DefaultFocus_Edit for Base, Edit and EditList mode and
DefaultFocus_New for the New mode.
And voilá, click Query and you find the focus on the Account column. So you can speed up your
work by simply entering the search string and hitting the ENTER key.
There also was another requirement to have the focus on the Query button. However, using
DefaultFocus_Edit = NewQuery did not yield the desired result. The funny thing was that the
Query button only got focus after pressing ALT+ENTER (or invoking the ExecuteQuery
command). Maybe the answer to that problem is somewhere out there...
siebel.exe switches
...and siebdev.exe too ;-)
Extra switches
But there are some additional switches, used in conjunction with the
"classic" ones. They have been passed along from consultant mouth
to consultant ear for eons before they found their way into the
documentation.
/bv runs all validation rules for the entire repository, so take your
time
/batchimport automates the import of .sif files
/batchexport automates the export of objects to .sif files
/bc allows to run batch compilation
/tl language (typically used with /bc for multiple language
deployments)
/applybatchpatch is used for applying batch patches, or patches in
batches.
Click > Browse (Select the batch file you have created)
Click > Next and then select Daily Option and Click Next
Select the Time at which you want to start he full compile
Click Next and provide the password and confirm password for
username you use to login to Windows OS
Click > Next and then Click > Finish
This full compile will create SRF in Siebel Tools\Objects\ENU folder.
You will now see a scheduled task created in the control panel. In this way
your full compile will always start on time.
To automate on UNIX or Solaris systems you can create a Shell Script and
cron job.
Solution
One way to do was to open application get display names from application
and then go to Siebel Tools and query one by one to get the Data Type and also
query in Applet Section to get Runtime flag and other information
This code queries for the given applet name, get’s all the records that are
mapped in UI and then queries one by one in Business Component to extract their
datatype and also if they have any picklist associated with them or not.
This is not a very common requirement. You can use this code to
understand repository BC’s and their relationship.
Code:
function GetInfo ()
{
var AppletBO = TheApplication().GetBusObject("Repository Applet");
var AppletBC = AppletBO.GetBusComp("Repository Applet");
var WebTemplate = AppletBO.GetBusComp("Repository Applet Web Template");
var WebTemplateItem = AppletBO.GetBusComp("Repository Applet Web Template
Item");
var FinalStr = "";
var flagbreak = 0;
var listcolname = "";
var count = 0;
var isRecordBC = 0;
var appletfield= "";
var bcfield = "";
var controlname = "";
var picklist = "";
AppletBC.ClearToQuery();
AppletBC.SetViewMode(3);
AppletBC.ActivateField("Business Component");
AppletBC.SetSearchSpec("Repository Name","Siebel Repository");
AppletBC.SetSearchSpec("Name","Opportunity List Applet");
AppletBC.ExecuteQuery();
if(AppletBC.FirstRecord())
{
WebTemplate.SetSearchSpec("Name","Edit List");
WebTemplate.ExecuteQuery();
WebTemplateItem.ActivateField("Control");
WebTemplateItem.SetSearchSpec("Inactive","N");
WebTemplateItem.SetSearchSpec("Type","List Item");
WebTemplateItem.ExecuteQuery();
function ValidateEmail(emailid)
{
var pat = /(^[\w\.\+\-=]+@[\w\.\-]+\.[\w\-]+$)/g;
var valid = emailid.replace(pat,”Y”);
if(valid == “Y”)
return(1);
else
return(0);
}
Count (”MVL Link”) - reducing scripting
This article describes how to use Count Function in calculated field involving
MVL link to count number of child records for a BC and then base our conditions on
that to fullfill our requirement.
Very often we have scenarios where conditions have to be set based on the
count or number of records in child BC. This can be achieved using the function
Count(“MVL Link”) in a Calculated expression and setting conditions with help of
user properties. Let’s understand it with help or a Requirement.
Requirement
A field “Currency” in “Opportunity” BC should be read only based on the
number of records in child BC “Service Agreement“. If the agreement child
record count > 0 then Currency should be read only and it should be editable
if the child record count = 0.
Solution
Count (“MVL Link”) used as an expression in a calculated field returns the number of
records in child BC.
» For the “Opportunity” Business component, create the Multi Value Link record
“Service Agreement” and set the following property for the record: Destination Link =
” Opportunity/Service Agreement ”
This will make “Currency” Field editable only when Agreement record count = 0 and
read only if agreement count > 0.