Wednesday, July 31, 2013

BC User Prop and Attr which can affect Performance

I was going through the web support randomly and got a very useful document.
Now we know how Siebel vanilla features like user properties and BC level properties help in avoiding custom configuration, but sometimes they could act as a double edged sword. Here in this post i will list out short description about some commonly used BS user properties and other attributes which could hamper performance significantly. If you want to go in details, please refer Doc Id[475224.1] in oracle web support.
First lets take Business Component User Properties :

All Mode Sort :
The following values can be set to this business component user property:

Values Description
Normal When setting it to Normal, the business component-defined sort specification is used. This setting also allows the user to run a PDQ (that incorporates a SORT).
TRUE When setting it to TRUE, the business component sort specification is overridden and instead the U1 index is used. If the standard user key is defined on the primary extension table, especially for S_PARTY-based business components, the behavior reverts to Normal.
FALSE If this is set to FALSE, all the sorting is removed.

This user property affects views with visibility other than Personal or Sales Rep visibility, including Manager, All, Organization, Sub-Organization, Group, and Catalog views. If you set up the default sort order so that it sorts on one of these views, be aware that this might expose large quantities of data that in general should be sorted only by user keys.

Deep Copy and Deep Delete :
These features allows multiple levels to be copied/deleted like a cascade copy/delete. Each business component in the Deep Copy/Deep Delete chain takes care of its own children.
If you are facing bad performance behavior when copying/deleting some records, be aware that these user property can be responsible for this behavior.

PreFetch Size and Maximum Cursor Size :
These properties work together to control how many records are requested while the business component is being accessed. These properties if set they will overwrite the value of MaxCursorSize and MaxCursorSize in the configuration file. If the value is set to -1, then records are retrieved until the EOF is reached. Make sure you have you performance testing done in case you changed these values.

Force Active :
This property makes ALL the business component fields to be force activated and due to this all the business component fields are retrieved.
Depending on the number of records being retrieved from the business component, this can lead to severe performance behavior.

And just quickly see what are the properties at field level which affect performance : 

Force Active :
This property makes the field to be force activated and due to this it is retrieved from the table that exposes this field.
Depending on the number of fields in a business component with this property set to True and depending on number of records being retrieved from the business component this can lead to severe performance behavior.

Immediate Post Changes :
This property is used to trigger server-side processing, for example, hierarchical picklists.
When this is set to TRUE, the changes are posted to Server resulting in network round trip.

Depending on how you configure this use, it can lead to bad performance behavior.

I hope this information will be helpful. Keep Exploring !!!

Accessing Hidden Fields in Applet Browser Script

Now we are aware that In version 7.x/8.x[Technote 386], the only fields that are available to browser script are:
· Id
· Fields whose values appear in the UI

But what if you want to access a field which is not exposed in UI ? In Siebel 7 and later, only fields existing on the UI are available to the GetFieldValue and SetFieldValue business component methods in browser script, regardless of the Force Active property value set for those fields.
Moreover, the ActivateField() method is not available for browser script.

Now there are 2 indirect ways through which you can access these non-exposed fields. 1 will only be applicable for form applets and other can be used in both form and list applet :

1) To make a field available through browser script, you can add a hidden control to a form applet.
The control must have the HTML Type property set to Hidden and must point to the desired field using the Field property. Keep a note that this is not applicable for List Applet because when a column is added to the list it is visible to the end user regardless of the HTML Type defined.

2) Create a control mapped to the field and set the HTML Type to Hidden and Add the control to the         button bar of the applet.
This solution can be used in form applets as well as list applets. It has a slight advantage over Option 1 because you will avoid having empty spaces on the applet where the hidden controls are added.

Again, I have found this on Oracle support web and if you want detailed information you can check Doc ID [477229.1]. Hoping this information will increase your insight in power of configurations.
Happy Exploring !!!

Sunday, July 28, 2013

Multiple Hierarchy Datatype WF Process prop Issue

Recently i have been debugging an issue. To sum that issue up in 2 points, it was intermittent and issue was happening when the siebel message is not having specific required values under it.
Now i know among developers, word 'intermittent' does not have friendly relationship. I have gone through the logs and it took a while to find out the RCA for this. Problem and Reason is stated below.
We know that Workflow is capable of sending only 1 Hierarchy as its Output. Now in our implementation, 1 of the parent WF is invoking a sub-process. In this sub-process, there are 2 WF process properties whose Datatype was set as Hierarchy with In/Out. And in the parent process we are taking an output as SiebelMessage. Now because there are 2 hierarchy type process properties in the child WF defined as In/Out. This child workflow is sending one of the hierarchy to the parent WF intermittently.
                Process Property                In/Out                      DataType
                Siebel Message                     In/Out                        Hierarchy
                OrdIt1Message                    In/Out (*In)               Hierarchy

Lesson learnt is that, in case you have multiple process property in a WF having datatype as Hiearchy and this WF is being used as subprocess for some other WFs, make sure to have only 1 process property as In/Out and put others as In. Hope this help, Happy Exploring !!!

Saturday, July 27, 2013

Troubleshooting Runtime Event Driven WFs

Runtime Events are quite useful feature provided in Siebel. You can minimize the level of scripting if you know how to use these runtime events effectively.
For a particular event you can invoke a WF and hence perform a set of operation. Like for eg, if you want to do certain set of operation on change of a field value, you can define a runtime event which can be given in a Start, Wait or User Interact step. These runtime events are created automatically when you activate such WFs.

I will list out some of the common issues which we encounter w.r.t. runtime events :

1) Ideally when you activate a runtime driven WF, related runtime events get created/updated(in case its already present) under Administration – Runtime Events screen > Events view with the corresponding Action Set. This being done, make sure that you manually do Reload Runtime Events from the menu 2-3 times to refresh the event cache.

2) Make sure the BO of the Workflow and BC for the Field on which you want to create a Runtime Event are same.

3) Make sure the mode of the Runtime Driven WF is Interactive Flow.

4) There could be a possibility that for a particular runtime event, there are multiple action sets. So in case there is a multiple action sets, they will get executed in order of increasing sequence and if the sequence is not defined, the action set which is created first will execute first.

5) In case you want to access these Runtime driven Workflow in a mobile client, make sure that the property value Replication is set as All under activated WF list.

6) Make sure that you have given correct values for 'Event Object Type' and 'Event Object' when you are defining a runtime event in a workflow.

7) Make sure the Workflow Process Manager component is up and running.

In case you want more details about debugging Runtime Event driven Workflows, there is a very elaborate and useful document on Oracle Support web with [id] = 473851.1

Hope the above information will save your debugging hours, Happy Exploring !!!

Thursday, July 18, 2013

NULL check in Search Expression

The ocean is made up of tiny drops of water. With the same analogy, if you have debugged many siebel issues, you must understand the importance of elementary things which are primarily the reason why code does not work.
Here i will mention one of those elementary things which need to be taken care of, and is very important.

Often we use the Search Specification. Here, take for example, using search expression in IC Map Search Specification of a Datamap, we only want field to be mapped if the value of [Attr] in hierarchy is not equal to say Value1 or Value2, so we will the write the expression like :
[Attr] <> "Value1" AND [Attr] <> "Value2"

So far so good, but what will happen in case value of [Attr] in siebelmessage which we are passing to this datamap is not present or not having the value ? Will this expression hold true even in that case ?
Answer is this expression will not be true even though Blank/NULL value is neither Value1 nor Value2.
So in case if you want to have the IF mapping for blank or null values, explicitly define a check for null values :
([Attr] IS NULL OR [Attr] ="") AND [Attr] <> "Value1" AND [Attr] <> "Value2"

So please make sure to handle NULL/blank check in search specification explicitly.

I hope this small piece of information will help you handle more probable scenarios in your project. Happy Exploring !!!