You are here

Siebel

To Avoid Duplicate Field Values In A Field Of Business Component

Most of us must have come across the requirement in Siebel to avoid Duplicates in a Business Component for a particular field. Every time when we get such requirement, without thinking on configuration we go for Scripting in Pre_Write Record of Business component. Here is an approach using configuration and it really helps.
 
Scenario: There is a BC as a child of an Account Profile BC; child BC contains a field - Stop Type. This field is having LOV with 4 values, it should not allow duplicate Stop Type. Without any solution the data looks like –
 
Before going for the actual solution, let’s see what all possible solutions do we have:    
 
1.       Scripting: The easiest and most commonly followed solution is to write Script in an event to create a new instance of current BC. Search for records by giving using ‘active’ Stop Type. Use count Records and then throw Error via Raise Error. Hence cancelling operation.
2.       Index: Even this is commonly followed i.e. to create an Index on table level but if you have multiple BCs based on same table you might screw up other BC as well. As in my case the table is S_ORG_EXT_XM which is used by many other Business components. Also sometimes the requirement is to have unique values in multiple fields. It becomes a tough choice. Moreover, the Error which will be thrown on UI would be from Database hence losing control over Error String
3.       Use an Out of Box User Key Column like ‘Name’ which allows only unique values. But again you can’t have enough columns.
4.       The Best Solution is to use below simple configuration in Child BC :-
Go to Child BC and create a Calculated Field with below Value.
 
Step 1:  BCHasRows("Account", "SNI Account Service Profile","[SNI Profile Id]='"+[SNI Profile    Id]+"'"+" AND [SNI Stop Type]='"+[SNI Stop Type]+"'","All")
 
As we know that BCHasRows returns Y or N whether records exist in BC or NOT based on Search Spec.
Syntax:  BCHasRows(BO,BC,searchspec,Visibility)
 
Here are the details:
i.                     Account is BO
ii.                   SNI Account Service Profile is BC in which I want to search. It’s the current BC as well
iii.                  Explanation of Search Spec (This is the trickiest part)
SNI Profile Id is the Field in Child which contains Id of Parent. This field is always in the link as Destination Field
SNI Stop Type is the field which I want to avoid duplicates
The search spec says search in SNI Account Service Profile BC on field SNI Profile Id which matches current record’s profile Id and field SNI Stop Type which matches current record’s Stop Type.
iv.                 All is the visibility used for search
v.                   On Stop Type field add below validation and validation Message
NOTE: Calculated Field will contain ‘Y’ when a Stop Type just added already exists in BC.The field on which you want to avoid duplicates. Add NOT of calculated field created in step 1. Because Validation Message will fire only when its value becomes False. If BC has existing records then Calculated Field will be Y. At that Time validation will go N and Message will pop.

Drill down from a control in Form Applet

Scenario:
Drill down from the control IDC in Account Entry Applet and navigate to a View Named Account Detail - Contacts View
 
Configuration:
In Tools, navigate to Account business component
 
1.      Create new field
 

Field Name 

IDC

Join

S_ORG_EXT_X

Column  

ATTRIB_09 (take any column for this)

 
2.      In Account Entry Applet in OBLE; go to Control and create a new record
 

Name

IDC

Method Invoked

Drilldown

HTML Type

Link

Caption – String Override

IDC

Field

IDC

 
3. Go to Control User Props and create a new record
 

Name

Drilldown

Value

TRUE

 
4. Go to Drilldown Object and create a new record
 

Name

IDC

Hyperlink Field

IDC

View 

Account Detail - Contacts View

 
5. Click on OBLE in Account Entry Applet Navigate to Edit Web layout and drag & drop the IDC field in the editor.
 
6. Compile the Project or Account BC and Account Entry Applet

Drill down from a control in Form Applet

Scenario:
Drill down from the control IDC in Account Entry Applet and navigate to a View Named Account Detail - Contacts View
 
Configuration:
In Tools, navigate to Account business component
 
1.      Create new field
 

Field Name 

IDC

Join

S_ORG_EXT_X

Column  

ATTRIB_09 (take any column for this)

 
2.      In Account Entry Applet in OBLE; go to Control and create a new record
 

Name

IDC

Method Invoked

Drilldown

HTML Type

Link

Caption – String Override

IDC

Field

IDC

 
3. Go to Control User Props and create a new record
 

Name

Drilldown

Value

TRUE

 
4. Go to Drilldown Object and create a new record
 

Name

IDC

Hyperlink Field

IDC

View 

Account Detail - Contacts View

 
5. Click on OBLE in Account Entry Applet Navigate to Edit Web layout and drag & drop the IDC field in the editor.
 
6. Compile the Project or Account BC and Account Entry Applet

EIM Tuning to improve performance

Through EIM process we load bulk amount of data from an external system to Siebel base tables. The performance of these EIM  
 jobs has to be maintained at optimum levels in order to reduce the load on the Siebel application and database servers. The
 following tips will help you in improving the EIM performance. Do a round of validation in development environment before running  
 the EIM jobs on Production systems
 
·         Compute statistics (DBSTATS) and analyze index on the tables periodically. Frequent insert or delete operations on interface tables can cause fragmentation in the table.
·         Analyze and figure out the optimal records that can be accommodated in a single batch as per the database capacity
·         Avoid hard coding of column values using DEFAULT/FIXED COLUMN IFB parameters
·         Set the logging level to minimal values and switch off Siebel transaction logging as per the load type (Initial / Mobile client)
·         Run independent EIM jobs in parallel.
·         Limit tables and columns to be processed using ONLY BASE TABLES/COLUMNS configuration parameters
·         Segregate INSERT and UPDATE records in different batches which in turn will improve the Turn Around Time of the EIM job
·         Enable database Optimizer hints and set the USING SYNONYMS parameter as per the account data load type
·         During bulk load Drop Index/Constraints on the table which are not mandatory and recreate them after the data load
·         After the completion EIM Process, purge the data in the EIM Interface tables
·         As a last option set SQLPROFILE parameter in IFB to analyze the long running query and tweak it to optimal values
Example SQLPROFILE = c:\EIM\eimsql.sql
Note  : Though no two Siebel projects can be exactly similar so every project has to be tuned according to the business needs and Infrastructure available

Disable the button to prevent the double click in Siebel

Requirement:  We have scenario like where we have payment interface which has been triggered by Payment button on Payment applet. Now customer want to make sure this button would be pressed only once till the request is not get processed successfully.
Workaround: This can be achieved by two options. First one is browser script and another is very siebel and also applicable for eService as well

  • Go To Applet Control:
  • Select Payment Control and Go to HTML attribute of this control.
  • Copy below value in HTML Attribute:
    • onclick="function fn1(){disabled=true;}setTimeout(fn1, 100);"
  • Note: Here 100 is timeout interval in ms.
How to display Confirmation Popup Message without Scripting in Siebel

Here is the solution to implement the Confirmation popup applet (OK/Cancel) without Script in Siebel. This solution is applicable for both type of application (Standard and High Interactive application)

  1. Select Applet Object
  2. Create new mini button "Confirmation" under control child object
  3. Add below value in HTML Attribute of the newly created control
    • onclick="if(confirm('Are you sure you want to delete this facility record along with all child details?')){}else{return false;}"

For displaying and invoking this custom button follow the basic configuration steps. After implementing this solution onbutton click system would popup 'Are you sure you want to delete this facility record along with all child details?' message with OK and Cancel option.

Using XSLT and Siebel builting methods to remove the null tag from Siebel Message

A lot has been said and written about removing null tags in xml messages. Any integration ace will always suggest to go for XSLT to transform XML while an siebel eScript enthusiast will defend stating business service will be ideal way to achieve this. But a laggard like me is always in search of solution which is easier to implement and flexible enough to handle frequent changes. After peppering siebel forums one of my friend came up with devilicious idea of using the data mappers itself to remove the null tags.

As per siebel booskshelf:

"The Integration Component Fields list displays the list of fields for that component. Note the system fields Conflict Id, Created, Id, Mod Id, Updated, operation, and searchspec in the list. This setting prevents the EAI Siebel Adapter Query and QueryPage method from outputting these fields."

It says that system fields are not the part of output XML. Any integration field of type "System" is not included in the ouput siebel message of EAI Siebel Adapter. So key here is, if the tag is null we can replace it in datamapper with any system field.

Consider a scenario if description is blank in Service Request then we don't want Description Tag send to external system in the outbound message. In order to remove the null tag we can use following expression in the DataMap:

IIF([Description] IS NULL,[Created],[Description])

In this Description and Created are integration fields of IC. Created is of type System, so if description is coming as null then we are passing Created. Here as Created is system field it will not come up in the ouput message after conversion. Now one may say how to remove entire instance if all the tags are null. Siebel also has solution to that. Try out Source Search Expression for this scenario.

Other Approach:

XSLT to remove the null tag from Siebel Message

<!--

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="@*|node()">
    <xsl:if test=". != '' or ./@* != ''">
      <xsl:copy>
        <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
    </xsl:if>
  </xsl:template>
</xsl:stylesheet>

-->

Browser Scripting in Standard Interactivity

I have never been fan of SI applications because of the unpredicatble limitations it offers. But however recently one of my friend cum life saver,Vinay Jain aka Vivacious,asked me a trivia and i was forced to jump into the ocean. Browser scripting incapabilities in SI mode is wastly documented but it is not mentioned how a well written server side code can compensate for the browser scripting.The reason that the browser script code doesn't run in standard interactivity client is because of unavailability of Siebel objects and methods.However Siebel is generous enough to provide some DOM events which could be effectively used to carry out desired task.Sometimes it is necessary to fetch field values in the browser code or to click button that navigate user to different link. Lets try to explore these scenarios in this post.

Problem Statement: Need to open a url on click of button on SR detail applet which requires SR number to be appended as argument.

Solution: The very first challenge here is to get the value of SR#. As the buscomp methods are not supported we have to go to traditional java script to fetch the value of SR#. For this we need to find the HTML attribute id of the control SR# displayed on the applet. This could be accomplished in two ways:

1 - Populate the HTML Attribute property in the Control to "id=SRNumber" in the form applet for the Control SR#.

2 - Right click the applet and View Source. Determine the SR# control and check out for Siebel generated html attribute. This will somewhat look like "span id='s_5_1_23_0'".

Now next step is to open the Browser Script for the "CUT Service Request Detail Applet (eService)" and navigate to the On click event of the button "VJ". Add following piece of code. Compile and confirm.

function Edit__0__Control__VJ__onclick (applet, id)
{
//Either of sTest or sSR could be used.
//var sTest = document.getElementById("s_5_1_23_0").value;
var sSR = document.getElementById("SRNumber").value;
window.open("http://www.customersystem.com/index.php?id="+sSR);
// This will pop up the url with SR # appended
 
}

So far so good. But the words "Luck" and "Siebel eService" have not always sat comfortably together for me. Trouble starts when the field under equation is not displayed on the applet or is read only. In either of scenarios it is not possible to fetch the value by using getElementById function. Another fascinating approach as suggested by support web is to generate HTML on the server side only for the control. In this approach we can get value from any field or any profile attribute.

1 - Write a dummy code on the On click event

function Edit__0__Control__VJ__onclick (applet, id)
{
//Either of sTest or sSR could be used.
 
}

2 - Open the server side script and go to "WebApplet_ShowControl" event. The main idea here is to re-generate the HTML for the button.
function WebApplet_ShowControl (ControlName, Property, Mode, &HTML)
{

if ((ControlName == "VJ") && (Property == "FormattedHtml"))
{

var a = HTML.indexOf("onclick");
var b = HTML.indexOf("'",a+1);
var c = HTML.indexOf("'",b+1);
if ((a > -1) && (b > -1) && (c > -1))
{
var sr = this.BusComp().GetFieldValue("SR Number");
//Defining function on click
var t = "onclick='window.open(\"http://www.customersystem.com/index.php?id=" + sr +"\")'";
var HTML2 = HTML.substr(0,a) + t + HTML.substr(c+1);
HTML = HTML2; // Re-Generating HTML
}
}
}
 
This function will overwrite the HTML generated by the SWE engine in SI and will include the code defined in the Showcontrol event. The best part here is we can execute application and buscomp methods to get the value which is required to pass in the url. With blend of Java and HTML one can really do wonders with the application.

Happy Scripting!!

Activate Multiple Workflows with Search String in Siebel

Sometime during Siebel deployment from one environment to another environment or for vanilla functionality like Siebel Order management we need to activate set of workflows one by one. This process might take huge time and could bring human errors like Admin people might forget to activate one or more workflow unknowingly.

 
To avoid such possibilities and activating the multiple workflows using single workflow with the specific search criteria, we have created one automated flow process with the idea of my two colleagues(Rahul Jain and Vivek Mishra). Below is the flow diagram for the process.

 

 

 
Workflow Description. This workflow does the following:

  1. Activate the multiple workflow with given search string
    • i.e we want to activate the Order quote related vanilla workflow. Just give the search string 'ISS' and this process automatically activate all the ISS workflows (24 by vanilla)
  2.  Activate all newly and revised completed workflow in the SIT or UAT deployment.
  3. Provide detail total no of activated workflow and name as output property set
  4. Provide detail error workflow and its respective massage
  5. Input Process Property: 
    • ProcessName: Activate All Non-Active Workflow (Mandatory)
    • WFSearchString: (Optional, by default is * and activate all non active workflows) 
  6. Output Process Property "ActivatedWorkflow" will show all the workflow name which are activated in the process
  7. Output Process Property "NoOfWorkflowActivated" will show total no of workflow activated in this process
  8. Output Process Property "NoOfErrorWorkflow" will show total no of workflow error out  during activation process
  9. Output Process Property "ErrorWorkflow" will show all the error workflows which are error out during activation process with error details

How to Use:  

  1. Go to the business simulator: Administration- Business Service>Simulator View
  2. Create New Record 'Service Name' as 'Workflow Process Manager" and Method name as "RunProcess"
  3. Create another record in Child applet and open Property Name Mvg with the below paramenters
    • ProcessName: Activate All Non-Active Workflow (Mandatory)
    • WFSearchString: (Optional, by default is * and activate all non active workflows) 
  4. Press "Run on one Input" button
  5. verify the activated workflows using output arguments
Pre-Deploying ActiveX Controls for Secure Environments

Pre-Deploying ActiveX Controls for Secure Environments
 
If Windows 2000/XP end users cannot obtain write access to the Downloaded Program Files directory, the ActiveX controls used for Siebel applications must be pre-deployed. This task must be performed with the proper administrative privileges to install software on the machine, usually Power User or above.
 
Pre-deployment must be performed for every patch that is implemented within the Siebel environment. The Siebel HI framework allows side by side use, so that when upgraded controls are installed, older versions can co-exist with newer implementations (assuming there are separate web servers for each implementation. Other controls are backward compatible and are overwritten on upgrade. If the pre-deployment is performed via web page, the html script will need to be edited with the correct control names and class ID's as described in the section below. For the Command line script, the script remains identical for each patch. The cab file location may however change and is a command line argument to the script.
 
To pre-deploy ActiveX controls, there are two mechanisms available:
 
Option 1: Pre-deployment Script
 
A pre-deployment script is available that allows download of all Siebel ActiveX controls. It should be noted that this script will deploy all controls within the applets directory unless configured for only certain controls. It should also be noted that the applets directory for the correct build should be shared out to all clients that require download of the controls via the script mechanism. To run the script a command line argument of the source location on the network has to be given. For example:
 
Predeploy.cmd \\myserver\applets\
 
This script will register all s*.exe, s*.dll, ieop*.dll and s*.ocx files in the Windows\downloaded program files folder and should be tested prior to rollout to ensure that there will be no end user UI actions generated by running the script. Some other third party controls may be re-registered by this filter. To narrow the criteria down, the exact *.exe, *.dll, and *.ocx names may be substituted into the script.
 
The following text should be placed in a file named predeploy.cmd:
 
cls
 
FOR /F "delims=" %%i IN ('cd') DO SET CurrDir=%%i
REM @echo %CurrDir%
 
expand %1*.cab "%windir%\Downloaded Program Files"
 
del "%windir%\Downloaded Program Files"\*.class
 
cd %systemdrive%
cd "%windir%\Downloaded Program Files\"
 
@echo "to register dll's ocx's run regsvr32 <Full path of .ocx file>"
 
for  %%f  in  (s*.dll) do regsvr32 /s "%windir%\Downloaded Program Files\%%f"
for  %%g  in  (s*.ocx) do regsvr32 /s "%windir%\Downloaded Program Files\%%g"
for  %%i  in  (ieop*.dll) do regsvr32 /s "%windir%\Downloaded Program Files\%%i"
 
@echo " to register the com server executables, run "
 for  %%h  in  (s*.exe) do "%windir%\Downloaded Program Files\%%h" /RegServer
 
@echo
 
cd %CurrDir%
 
Option 2: Predeployment Web Page
 
A web page can be used to download each desired ActiveX control. When the Object tag for an ActiveX control is called from the web page, the control that is contained within the *.cab file will be downloaded in compressed form from a web server that is hosting the controls and expanded once downloaded onto the system into the Downloaded Program Files folder. The web page can be called from a SMS script using the following syntax:
 
Iexplore.exe http://mywebserver/predeploy.htm
 
The management/SMS script will need to stay at that page for a long enough time to allow download of the required ActiveX controls. A time period of 5 minutes should suffice for most networks. For large deployments it is recommended that this script is run in staggered timeslots as the traffic generated can cause network bandwidth issues.
 
To Predeploy ActiveX controls
 
Starting in Siebel version 7.7 customers can find the predeploy.htm already created:
 

  1. Navigate to the directory containing the predeploy.htm file. You can use any version of the file, which is installed in multiple locations:

 

    • On the Siebel Web Server Extension (SWSE) machine, predeploy.htm is located in the directory SWEAPP_ROOT\public\LANGUAGE directory, where SWEAPP_ROOT is the SWSE installation directory and LANGUAGE represents the language you are using (such as ENU).

 

    • On the Siebel Server machine, predeploy.htm is located in the directory SIEBSRVR_ROOT\webmaster, where SIEBSRVR_ROOT is the Siebel Server installation directory.

 

    • On Siebel Mobile Web Client machines, predeploy.htm is located in the directory SIEBEL_CLIENT_ROOT\public\LANGUAGE, where SIEBEL_CLIENT_ROOT is the Siebel client installation directory, and LANGUAGE represents the language you are using (such as ENU).

 

  1. Edit predeploy.htm to suit your requirements—that is, so it can be used to predeploy the ActiveX controls your users require. Then save the file. The file predeploy.htm contains comments about each file, to supplement the information in Table 12 on page 49. Use this information to help you determine what controls to predeploy.  

NOTE: You should have one object tag entry for each ActiveX control you are predeploying. Delete or comment out lines for any object tags you do not need (that is, those representing controls you are not predeploying). Text in the HTML file can be commented out using this notation: <!--CONTENT TO BE COMMENTED OUT-->.
 

  1. Remotely log into each client machine, and then open the HTML file in a supported version of Microsoft Internet Explorer. Wait until the message indicates that all the files have been downloaded, then close the browser and log off of the client machine.

 

  1. Repeat Step 3 for each applicable user

Pages

Subscribe to Siebel