Friday, January 21, 2022

Updating parent BC depending on the status of child BC using configuration

Parent BC: Service Request

Child BC: Action

Requirement: When all the Actions corresponding to an SR are closed the SR status should be “Closed”

Solution: In this case we will take the count of child records on the parent BC. There will be two counts count of all child records and count of Closed child records. When this two counts are equal we will change the status of parent BC to closed.

1. Create a new link between Service Request and Action BC with Search Spec [Status]=LookupValue('EVENT_STATUS', 'Closed') in this case with name “Service Request/Action1”

clip_image002

2. Add this link in the MVL of Service Request BC in this case with MVL name “Action1”

clip_image004

3. Create two calculated fields to get number of records fetched by each link. When the count returned by both the links is equal, all the Activities are closed, and we can change the SR status to Closed.

clip_image006

4. For testing you can show these two fields in UI in applet.

5. On the Action BC create a new user property “On Field Update Invoke 1”. This user property will call the method “CheckClosed” from Service Request BC when the “Status” field from Action BC is updated.

clip_image008

6. On the Service Request BC add a new user property Named Method with the following value. When the method “CheckClosed” is called it will check if the count returned by both the links is equal, if yes it will set the Service Request Status to “Closed” else nothing.

"CheckClosed", "SET", "Status", "IIf ([Calc Activity Status] = [Calc Activity Status1],LookupValue('EVENT_STATUS', 'Closed'),[Status])"

clip_image010

7. Compile all the above items and check the configuration by creating new Activities and closing them.

8. You will observe that the parent BC is not getting refreshed properly and thus the configuration is not working as expected.

9. So add a new user property “Named Method” to the Service Request BC. Please note that this user property should be called before the Closing step 6. Named Method 2 will be called before Named Method 3 in this case.

The value for this user property is as below

"CheckClosed", "INVOKE", "Service Request", "RefreshBusComp"

When the method “CheckClosed” is called it will invoke the method “RefreshBusComp” on Service Request BC.

clip_image012

10. Compile the Service Request BC again and test the results, everything should work smoothly.

clip_image014

External Business Component (EBC)

In almost all the implementation of Siebel Application we come across the requirement as – “Bring the data from the external source and display” well for that in Siebel the solution is External Business Component (EBC) and Virtual Business Component (VBC). In this Blog the content is specific to EBC, so let me give the definition of EBC first then the process of creating it –Definition : EBC is a method used when there is a need to display data which is external to siebel. The external schema is imported into siebel tables using a wizard. Once the external schema is imported, to display this data in an applet, the configuration is going to be the sme as creating a BC, an Applet,a View etc.

Steps of Creating:

1. get the DDL file for your external table.

here is how a sample DDL file will look like:CREATE TABLE TPMS.EBC_VEC

(

demo11 VARCHAR2(20),

demo12 VARCHAR2(20),

demo13 NUMBER(10)

)


2. Use siebel object creation wizard to create this table.

File –> New Object –> External Table Schema Import3. The wizard will ask for following inputs:

i. Select Project this table will be part of from the list

ii. Select the database where external table resides – Enter the database, for this example it is Oracle Server Enterprise Edition

iii. Specify full path of the file where table definition resides

iv. Specify a 3 digit batch code for this import – example 001

v. Click on Next and then click on Finish4. This will create your External table. with a name like EX_001_0000001. The names of External tables begin with “EX_” the next 3 characters are batch codes and the rest is just a serial number.* The Type field will be “External” for this table.

* You will also have to map one of the table columns to the Siebel’s Id field. to do this: go to the desired table column and in the “System Field Mapping” column select “Id”


3. Changes to be made in cfg file now follow the below steps create an entry for a new datasource under [DataSources] sectionTPMS = TPMS add a new section [TPMS] to describe the datasource params:[TPMS]

Docked = TRUE

ConnectString = VECDEV

TableOwner = TPMS_INT

DLL = abc.dll

SqlStyle = OracleCBO

DSUserName = userdev

DSPassword = userdev

Now that you have defined the Datasource in cfg file, go back to siebel tools and add the datasource to your external table. Go to your external table, and go to the Data Source and add a new record:

Name = TPMSExternal table is now ready for use in a EBC. Use siebel object wizard to create a BC based on this table. Once the BC is created, change the Data Source property of the BC to “TPMS” .You are now ready to use this BC in a applet/view. In the above process the description is about an external data source called TPMS and we are fetching the  data from TPMS to Siebel. But what if we come across a bit more complex requirement. Suppose the data is in siebel but it should not be modified from the front end or from the back end (unless and until one has right to do so) just like an external data source schema. Or let me put it as can we make EBC on the same database we are working i.e. Siebel Database? The answer and solution is the same Yes we can create an EBC based on the same database but for that we need to create a different DSN and then follow the steps given above.

Wednesday, January 5, 2022

LOV Extract SQL Query

For Pulling out LOV Extract you can use below SQL Query:


SELECT 

10000+ROWNUM ROW_ID,

'FOR_IMPORT' IF_ROW_STAT,

CASE WHEN LOV.TYPE='LOV_TYPE' THEN 1000+ TRUNC((ROWNUM-1)/1000)

    WHEN PAR.TYPE IS NULL THEN 1010+ TRUNC((ROWNUM-1)/1000)

    ELSE 1020+ TRUNC((ROWNUM-1)/1000)

END IF_ROW_BATCH_NUM,

LOV.TYPE,

LOV.VAL,

LOV.NAME,

LOV.ACTIVE_FLG,

LOV.DFLT_LIC_FLG,

LOV.LANG_ID,

LOV.MLTORG_DISALW_FLG,

LOV.MULTI_LINGUAL_FLG,

LOV.REQD_LIC_FLG,

LOV.RPLCTN_LVL_CD,

LOV.SUB_TYPE,

BU.NAME,

LOV.HIGH,

LOV.LOW,

LOV.TARGET_HIGH,

LOV.TARGET_LOW,

LOV.ORDER_BY,

LOV.DESC_TEXT,

LOV.TRANSLATE_FLG,

BU.NAME,

PAR.TYPE,

PAR.VAL,

BU.NAME,

PAR.SUB_TYPE,

PAR.LANG_ID

FROM SIEBEL.S_LST_OF_VAL LOV

LEFT OUTER JOIN SIEBEL.S_BU BU ON LOV.BU_ID=BU.ROW_ID

LEFT OUTER JOIN SIEBEL.S_LST_OF_VAL PAR ON LOV.PAR_ROW_ID=PAR.ROW_ID

--WHERE LOV.TYPE='PROVIDE LOV TYPE';-- In case you need some specific LOV Extract then remove the comment -- and provide LOV TYPE

WHERE LOV.LAST_UPD>SYSDATE-30;


How to convert FDR to CSV

If there are any siebel application crashes, as part of investigating crash you need FDR(Flight Data Recorder) file. This file gets generated in the bin directory of siebel server for every hard crash.

Problem with FDR is that it is not in readable format and you need to convert it in csv first.

You can find a way to do that on many sites as below :

sarmanalyzer -o <output.csv> -x -f <fdr file>

But, with my own experience, most of you will end up with the below error :

sarmanalyzer: not found

So I am putting down all the steps which are required to perform sequentially to convert a FDR to CSV: 

(1) Go to bin directory of siebel server

(2) cd ..

(3) . ./siebenv.sh

(4) cd bin

(5) sarmanalyzer -o <output.csv> -x -f <fdr file>

Saturday, August 21, 2021

SSA Primary Field

The SSA Primary Field is a system field on a business component that can be used to identify which MVG record is the primary. So if you use script such as: 


SetFieldValue("SSA Primary Field", "Y"); 

This will set the current MVG record to be the primary (the primary flag will be checked). 
What happens in the database is when this field is set on an MVG record the parent business component of the MVG has a field which is the primary id field for the MVG. This field holds the ROW_ID of the MVG record that is flagged as primary. 

So when the SSA Primary Field is changed in the database in the background an update is made on the parent table on the Primary ID Field to change the value to be the ROW_ID of the MVG record set as primary. 

To find what the Primary ID Field go to the parent business component > Multi Value Links > Primary ID Field. 

Therefore the SSA Primary Field explicitly is not stored in the database. 

For calculated fields, these are not stored in the database. When a business component is instantiated and the calculated field is to be displayed in the background Siebel will simply do an additional query in real time to obtain the calculated value, this not stored. This is why it is important to keep performance in mind when creating calculated fields that will be readily queried or force active. 

So the calculated field values are calculated at the point they are required.

Friday, August 20, 2021

Siebel Desktop Issues Troubleshooting

a. Check Internet Explorer (IE) version. Should be latest compatible version.

b. Clear IE cache. Default set up is fine. Close all IE session. Check task manager to make sure no IE session running in background. 

c. Check Java version.  Make sure Java option is checked. 

 





d. Reset security setting. Hit reset on the below prompt. 

 




e. Check ActiveX at this location : C:\Windows\Downloaded Program Files

 


f. Delete all ActiveX starting with Siebel and reinstall by logging into application.

g. Check that no browser extensions, IE toolbars are enabled. 


Saturday, June 12, 2021

Running Siebel Open UI version in Vanilla Mode

In order to test or debug a version of Siebel that has custom configurations we need to switch the Siebel application to it's vanilla or out-of-the-box configuration. In earlier Siebel releases which was prior to Open UI, we had to switch the Siebel SRF File to an OOB (out of the box) SRF and restart the Siebel Services to be able to view the application in vanilla mode.

But with the introduction of the Open UI version, the system now has two object manager parameters that can be used to do this quickly. By default, the two 
parameters are set to “False” in the object manager component:

  • Manifest Safe Load – Default set to False, doesn’t run in Vanilla Mode
  • Enable Safe Load    – Default set to False, doesn’t run in Vanilla Mode

By setting these two parameters as "True" the application will run in the vanilla OOB configuration.

Updating parent BC depending on the status of child BC using configuration

Parent BC: Service Request Child BC: Action Requirement: When all the Actions corresponding to an SR are closed the SR status should be “Clo...