Quantcast
Channel: Siebel Unleashed
Viewing all 68 articles
Browse latest View live

Enter Key on home page search IP-2013

$
0
0

This article has been contributed by Gururaj Basavaraj a reader of Siebel Unleashed.


If you are in IP2013 you might be having problem search on home page by pressing enter key instead of

Go click. For that below is the PR code, associate this to all home page search applets.

if(typeof(SiebelAppFacade.EnterKeySearch) === "undefined"){
       SiebelJS.Namespace("SiebelAppFacade.EnterKeySearch");
       define("siebel/custom/EnterKeySearch", ["siebel/phyrenderer"], function(){
          SiebelAppFacade.EnterKeySearch = (function(){
          function EnterKeySearch(pm){
             SiebelAppFacade.EnterKeySearch.superclass.constructor.call(this,pm);
          }
       SiebelJS.Extend(EnterKeySearch, SiebelAppFacade.PhysicalRenderer);
       EnterKeySearch.prototype.BindEvents = function(){
           SiebelAppFacade.EnterKeySearch.superclass.BindEvents.call(this);
           Search.call(this);
      };
 
     function Search() {
         var oPM = this.GetPM();
         var sAppletId = "#S_A"+oPM.Get("GetId");
         $(sAppletId).delegate("input","keydown",function(){
         });
     }
  return EnterKeySearch;
}());
return "SiebelAppFacade.EnterKeySearch";
});
}

Siebel EAI and Performance of Child Object updates

$
0
0

This post has been submitted by Sachin V Rao reader of Siebel Unleashed.


I would like to share a learning which I have had on a performance topic in Siebel EAI. We all would have worked on scenarios of updating Object hierarchy that is parent child relationship using EAI Siebel Adapter in our projects. Most of the time the number of records in child is in the range of 10-50 or 100 – 1000. But in my experience I came across scenario where we used to get updates for 1-2 records for a child component, where parent could have the record count in the range of 100k to 500k. This is very true for retail industry, which can have large assortments of products and they all are grouped under 1 price list.

When IO was designed it was developed with Price list as parent and Price list item as child as per the Vanilla IO and BO structure.

But when interface ran with the data as mentioned above it took considerable time to update just 1 price list item in a price list. On further investigation and thorough reading of bookshelf, following statement was found in the bookshelf EAI guide. This content has been added in to Siebel 8.1 bookshelf. But the behavior can be seen in version  7.7 as well.

NOTE: For performance reasons, user keys for child integration components are not included in the WHERE clause of the SQL generated to query for child component records in the Siebel database. If you must query the child component to find matching records, then consider redesigning your integration objects, such as creating a new integration object where the child component becomes the parent. For example, if Account is the parent and Asset the child, and you to query for specific assets, then create a new integration object where Asset is the parent and Account is the child.

Since for child components Siebel EAI Adapter picks users key based on the first instance, so this approach makes sense from performance stand point, but this is also based on the assumption that child entities would not have too many records.

Basically what Siebel does is, it queries all child records based on the where clause from the parent child Link spec. And then identifies the user key to be used and evaluates the operation to be performed that is Insert/Update on child object by applying the user key on cached data in memory. This gives performance benefits when the number of child records are less.

But this is not true always as was the case in Price List Item update scenario.

Solution:

Considering above the IO needs to be redesigned to have price list Item as primary Integration Component, so that for each record user key is part of where clause, and post this change one would see significant improvement in performance.

Big Data for beginners

$
0
0

I am pretty sure almost everybody connected to IT in anyway must have heard the term Big Data. Now, before you close the article thinking it doesn’t have to do anything with Siebel, STOP. What I have realized in my new stint is that technology is changing too fast. If you confine yourself with just one skill, you will soon become dinosaur of the IT world and that means that you well on your way to become extinct. Even if you are not proficient you should keep yourself knowledgeable with what is happening in IT world.

BigData is the buzz word today just like cloud was a few years ago. So, this post is intended to introduce you the basics of Big Data and what role it plays in the CRM world. So, let’s get started:

What is Big Data?
You can find a lot of mumbo jumbo and complicated definitions online if you try to search but what I understand is that a large amount of datasets both structured and unstructured is known as Big Data. So, you might ask why just not use the term Data?

I agree, it can just be called data but then it wouldn’t catch your eye, will it? So, some marketing wizard devised this term just like somebody came up with term Cloud. Now that we know the Big Data is just plain old data in massive volume then that brings up the next question.

Why there is so much hype around Big Data?
The hype is because the volume of digital data increased so drastically due to which the traditional methods to crunch and analyzed this data failed miserably. Traditional data warehousing tools and techniques analyze this data were too expensive and slow to be of any use. This gave birth to new set of tools that were created specifically to solve these problems. The aim was to crunch massive amount of data (Think petabytes) in least amount of time and with least cost.

These tools promised to provide businesses to find out meaning out of this vast amount of meaning less data in jiffy. The message that got conveyed was that big data can transform your business and solve all your business problems. No wonder everybody thought they have found the ultimate business intelligence tool and it became so popular.

What is Hadoop?

Hadoop is some time used as a synonym to Big Data but it is not true. As I pointed above Big Data is just a concept a marketing term created to draw attention. Data was always there but now the quantity has become massive and sources or formats have become diverse. So, simply put Hadoop is a java based tool to implement Big Data concepts to crunch data. It can use your cluster of commodity hardware to store and analyze this data. It has a programming component Map Reduce to write algorithms and analyze this data.

Is Hadoop the only tool available?

No, Hadoop is not the only tool available to implement Big Data concepts but it is by far the most popular tool. In a practical environment you will always use a bunch of tools in addition to big data to solve your business problems.

What kind of jobs are out there for Big Data?

Jobs in Big Data can be classified broadly into following categories.

Programmers: People who actually write MapReduce algorithms using Java or other programming languages.
Administrator: People who setup big data tools and perform administrative (very similar to Siebel Administrators) tasks such as starting/stopping services etc.
Architects: People who are responsible for creating a road map and identifying different Big Data tools that are needed based on business problems that needs solving.

What is the future of Big Data?

The amount of data is just going to increase as is the complexity and nature of data. There would always be need of new tools to explore this data. So, I would say that Big Data has just started and has a long road ahead. Big Data is still in conceptual stage and most of the projects undertaken have not been able to justify the investments made but things are changing. Tools are becoming sophisticated, easy to implement. Hadoop 2.0 is completely different from original Hadoop and there are many more such as Hortonworks, MapR, Spark that are making waves.

 

These were some of the questions I thought to get you guys started with Big Data. In case if you are interested to know more let me know your specific queries or questions. Do Let me know your thoughts via comments.

Understanding the basics of Big Data ecosystem – Part 1

$
0
0

Debugger to the rescue for global js files – IP2015

$
0
0

Guess what, I am working on OpenUI again and it feels really good. I recently, got an opportunity to work on IP 2015 and developing some really cool functionalities (Favorites, Broadcast Message Bar etc) as part of project.

A lot of things have changed as compared to 8.1.1.11, PM’s & PR’s have become more structured. Themes have moved in to manifest but with all the good things comes the complexity. We all know that we can have our custom js file included at the application level by copying the “PLATFORM INDEPENDENT” manifest entry and linking our custom js file. This comes in really handy when you are trying to work functionalities that are global in nature (Application level tooltips, anyone ??).

Let me clarify, I know this is not a new feature but when you did that in earlier versions you would see your file included in the sources tab of the browser

sources_1

This comes in really handy to debug and verify your changes have taken effect, change and test code on the fly. Also in case there were errors in your code it would show in console what the error is and what is causing that error.

But, it seems that in IP2015 (may be IP2014 also) due to core framework changes the global level JS inclusions just don’t show up in Sources tabs (it took me several hours to find this out).  To make matters worse in case if your code has errors then all you get is error shown below

sources

Error in downloading file require:null

It seems that Siebel OpenUI framework handles even the syntax errors of all the global files and then shows a generic message. This means the only way to debug is to either use alert or log (SiebelJS.Log or console.log) statements at each at every line to find out where the problem is.

Don’t fret, there is an easy way out and that is the debugger statement. Just write the “debugger” statement in your code where you would like to set a break point and open browser console and clear the cache.

debugger

This debugger statement acts as debug point but the difference is that it is only takes effect when browser console is open. So, instead of using sources tab of browser to set break point you can do it right from your code.debugger_in_effect

This is what happens as soon as debugger statement is encountered. I hope this tip helps somebody save hours worth of effort.

I know I have been pretty inactive but time to get active again. Lot more in store keep reading.

Web Notifications – Making Siebel Notifications better

$
0
0

Web Notifications is little known feature that allows websites to display desktop style notification based on user permissions. Now it is extensively used by websites such as New Sites, What’s app web to display desktop style notifications. When I came across this feature the thought that immediately that came to my mind was can this be used for Siebel OpenUI notifications that have replace black message broadcast bar in HI.

The implementation is fairly simple and follows this approach

  • Check for Notification object
  • If Found ask for user permission
  • If allowed display notifications

When Web Notification framework was introduced it allows HTML styling that allowed truly beautiful and feature rich notification but now it only allows for text notification, I believe might be due to security concerns but nevertheless it still allows us to build pretty useful functionalities.

So, I researched on OpenUI Notification framework and found a place that allows for easy integration of Notification. Before we start time for a statuary warning, “This is not a supported customization and I do not recommend you using this in production. Consider this as a Proof of Concept Solution”. The intention is to just showcase a possibility and hope that somebody from oracle can have a look at it and may be make it a part of framework itself :) .

Siebel OpenUI Notification framework is based on PM/PR model just like other OpenUI functionalities. The two JS files that house the code are

  • msgbrdcstpm.js – Presentation Model responsible for interacting with proxy and get the required data for Notifications
  • msgbrdcstpr.js – Physical renderer responsible for actually creating the UI elements of Notification framework.

These files reside in SIEBEL_BUILD/siebel directory. Here is what we are trying to do with these files

Problem Statement:

When a new message is created for broadcast Siebel makes Notification UI element blink which is not sufficient to draw attention of the users to have a look at it.

Solution:

We will use Web Notification framework to display a desktop style notification that is displayed when a new message created for broadcast.

We are going to touch the PR (msgbrdscst.pr) file. In order to do that you will have to beautify/expand the code. In the PR we will modify UpdateMsgBar function add our custom code to display Web Notification when a new message is broadcasted.

/* code to show desktop Notification*/
var iCounter = 0; //counter to check number of new notifications
if(Notification){ //check for Notification object

   for(var msg in msgArray){ //access individual messages from Array
       if(typeof(msgArray[msg]) === "object"){ //we do get function object
           var iMsg = msgArray[msg];
           //status is blank when new unread notification is added
           if(iMsg.status === "")iCounter++; //new notification found increase counter
        }//end of if
    }//end of for

    if(iCounter > 0){ //if new notification found
        //ask for permission - only need to happen once
        //once user provides permission choice is recorded by browser
       if (Notification.permission !== "granted")
            Notification.requestPermission();
       else {
             //create new Notification
             var notification = new Notification('Message Broadcast', {
                 icon: "./images/favicon_touch.png",
                 body: "There are " + iCounter + " new messages. Please check!",
              });
              iCounter = 0;//reset the counter for next time
       }//end of else
   }//end of if iCounter
}
/*Notification code ends here*/

Once you have this code you UpdateMsgBar function should look something like this.

notifications_code

Save the file, clear the cache and reload the page. It is going to take couple of minutes but you should get a prompt asking for permission as shown below

notifications_permission

Click on Allow, then sit back and watch a small little smart notification popup every few minutes when you have unread messages. Cool, isn’t it!!!

notifications

The best part is that you don’t need to have active Siebel Window to view these notification they will act like outlook notifications.

Closing Notes:

The message array has several other properties such as urgency, message text that you can use for example you want to show notifications only for Urgent messages or use different icons based on type of messages. It is also possible to attach click handlers to the notifications. Web Notifications are not supported by IE yet (surprised ???)

Unfortunately it is an unsupported customization as of today which is not recommended but hopefully it will become of the actual framework at some point in time. The way I envision this to work as part of actual framework is that an “User Preference” will be used to enable/disable desktop notifications.

siebelhub JavaScript library – reworked solution

$
0
0

Downloaded siebelhub library published by @lex and had a look at the code. It is fantastic piece of coding with modularized code and well-structured functions. It also helps in understanding basic JavaScript concepts required for Siebel OpenUI development.

The best part was the way to dynamically attach custom functions with PM events such as Field Change or Record Change.  This concept can help us develop truly global functionalities without needing the use of individual PM & PR’s for applets or views.  I used to this to develop a really useful functionality of favorite records. I will share the use case and implementations where this will be useful in future posts but this post is about siebelhub.js. I would recommend everyone to go and download the library and study it as a reference for Siebel OpenUI development.

The only thing that I didn’t like about it is the way the siebelhub object has been made global. Many of you might already know that if in JavaScript we declare a variable without the keyword “var” it becomes part of global namespace and can be accessed by any script that is part of that page.This is very similar to concept of Profile Attributes in Siebel, once you have set a profile attribute you can access its value from anywhere in application. Using this concept @lex has created siebelhub object and attached all the library function to this object. This choice has been made probably because @lex has published this library for educational purpose.

I started looking for other ways by which we can make this library part of Siebel OpenUI framework. I studied few oracle provided js files that have defined similar objects that we use in our custom PM & PR code. My reworked solution is to define siebelhub object as part of “SiebelApp.S_App” Namespace rather than pollute the global namespace and define the library function using prototype object.

The basic structure of library would look like this:

if (typeof(SiebelApp.S_App.siebelHub) === "undefined") {

    SiebelJS.Namespace("SiebelApp.S_App.siebelHub");
    SiebelApp.S_App.siebelHub = (function(){

      function sHub(){
          //you can define private properties here
      };//end of sHub function
      //define all your library functions like this
      sHub.prototype.GoToTheHub = function(){
          window.open("http://www.siebelhub.com");
      };
      sHub.prototype.GoToSiebelUnleashed = function(){
          window.open("http://siebelunleashed.com");
      };
return sHub; //return the object 
}())//end of function as object 
};//end of if 

All the functions of the library would be attached to this function object as shown above. The way to instantiate this library would also change and would be done like this

var sHub = new SiebelApp.S_App.siebelHub(this);
sHub.GetAppletType(appletmap[applet])
sHub.GetFieldValue("Id",pm);

Here is the link to reworked version of SiebelHub Library. I have not included each an every function defined in the original library and it doesn’t have the server side part also. I am not sure if this is best way to do things but I believe that it will certainly make it more compatible with Siebel OpenUI framework. Looking forward to you feeedback/comments and making contributions to make this library better.

Elastic List Applets @ IP 2015

$
0
0

Before you start wondering, I have not accidentally written 2016 as 2015 in the title. If you are following the Siebel Updates then you would by now know that as part of IP 2016 Oracle is introducing a feature called Elastic List Applets. So, for people who haven’t heard about it here is some background.

Traditionally Siebel List Applets have some blank space allocated to their structure even if there are no records are present in the applet (screenshot). This space doesn’t serve any functional purpose except for hoarding screen real estate.

list-applet-with-space

With IP 2016 they have made List Applets flexible so that it occupies only the required space depending on the number of records that are present.

ip16-elastic-list-applet-1

Now, this may not seem like much but believe me it is a big deal for customers and quite a nice feature to have and probably might have been demanded by customers from Oracle.

I have good news for all those who cannot go to IP 2016 but still would like to have this feature. Although I have tested this in IP 2015 Custom & Aurora theme but it should work with IP 2014 and earlier versions also (minor modifications might be required). Eager to know about Solution??? Let’s get started.

Essentially all you have to do is introduce just one CSS rule in your application. If you have existing custom theme open up custom CSS file you have created for your theme . For those who don’t have custom theme only option is create and include a custom CSS files with the required rule through manifest entries.

Add the following CSS rule in your custom CSS file

.ui-jqgrid-bdiv{max-height:340px !important; height:auto !important;}

That’s it!!!!

I know you were expecting several complicated and lengthy instructions to make this happen but it is as simple as that. As soon as this rule takes effect List Applets become elastic

ip15-elastic-list-applet-2

ip15-elastic-list-applet-3

ip15-elastic-list-applet-1

Yes, you are welcome and can use comments section to express your gratitude 😉 .


Viewing all 68 articles
Browse latest View live