Google
 
We have moved to a http://siebelunleased.com Please visit there for updated posts

Sunday, October 7, 2007

Siebel Profile Attributes - an Overview.

Profile Attributes I stumbled upon them in siebel when I was working on my first assignment involving Siebel EAI. Till that time I had only used and heard of Global Variables which you could use throught out your script.

But as the requirement said only if user clicked a button in View A and then performed some particular action in View B trigger a workflow.

As views involved had different BC's it was not possible to have done through global variables. Then my senior colluege introduced me to a new entity in siebel called 'Profile Attributes'. They are important because they have a unique property. They are available throughout the application. The best term that comes to my mind to describe them is 'Session Variables'. Those who have worked a little bit on development of Web Application will understand exactly what I am saying and for those who hasn't worked on them I will explain.

As you know from siebel 7 onwards it has Web Architecture. So, as soon as you login into siebel through your browser a session is started which last till time you log out or you close your browser window or according to the length set through session parameter at server level.

Now discussing in details that how server maintains this session and what goes on behind the scene is out of scope of this article
but what you need to know is that Siebel server recognises every unique user through session id that is given to you when you login to siebel and it remains valid until you session closes due to above mentioned reasons. So, Profile Attributes are variables that can hold any value during the session of the user. There are two methods available to in siebel escript that help you to work with Profile Attributes.

  • GetProfileAttr
  • SetProfileAttr

GetProfileAttr method is used to retrieve the value of a particular profile attribute. The syntax is

TheApplication().GetProfileAttr("ProfileAttrName")

SetProfileAttr method is used to set the value of Profile Attribute. If the Profile Attribute that you mention is not already existing it creates a new Profile Attribute. The syntax is

TheApplication().SetProfileAttr("ProfileAttrName",Value)

So, to accomplish the our requirement we Set a profile attribute when clicked the button on view A and then when he went to View B and did the particular action we wanted we retrieved the value of the profile attribute and if all the conditions were met we executed the workflow and everybody developed happily ever after :)

But, there is a twist in the story and it was not a happy ending after all which highlights the fragile nature of Profile Attributes. Now, in a particular situation this solution won't work. If user clicked button on View A and then logged off which meant profile attribute is destroyed hence the functionality failed. So, as you all must have guessed this solution was scrapped :(

So, the moral of the story is use Profile Attributes with caution and only if you are sure that if the session is destroyed you functionality wouldn't fail.

0 Comments:

You Might want to read following articles also.