Friday, June 4, 2010

Siebel User Usage Statistics

 


For any application user statistics is very important. Usage show how frequently system is used used. For long time we wanted something for Siebel which will give clarity about system usage . We worked with Siebel and there was nothing to use and raised enhancement request CR# 12-1Y63OAN (Doc Id: 1116263.1). And last week I saw posting about some methods which we can use to achieve (Siebel Usage Collection) which triggered my thought to build something on similar way.

What are our options ?

  • Use Runtime events and business server : Usage Tracking Service --> Oracle bookshelf reference
    This method is primarily used for capturing view activation hits and writes log into CSV or XML file which later can be analyzed.
  • Use Runtime events and customer business service and capture Application login event.
  • Wait for CR#12-1Y63OAN fix pack
Here I will explain on second option to achieve.

What we need ?
  • New runtime action event to capture Application Logon
  • Customer business service to capture details.
Business Service Details:
- SRF based
- Application business service (preferred)


Steps:

1. Login to Application and navigate to Site Map > Administration - Business Service and create new business service. Name it as per your naming stanard. For testing purpose I created TEST_BS



2. Create new method


3. Add logic to capture the details
For testing purpose I have captured few details and writting to log file. You can use custome logic as per your required. For example: store login instances against users, needs some tools configuration.


Code:
function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{

if(MethodName=="Test")
{
var strString:String;
var strString1:String;
var dtDate:Date;
dtDate = new Date();
strString1 = "" + dtDate.getMonth() + "," + + dtDate.getDay() + "," + + dtDate.getFullYear();
strString = 'Application Login Event,' + TheApplication().LoginName() + ',' + TheApplication().GetProfileAttr('ApplicationName') + ',' + strString1 + dtDate ;
TheApplication().TraceOn("\\\\sharedDrive\\usage_$p_$t.log", "Allocation", "All");
TheApplication().Trace(strString );
TheApplication().TraceOff();
return(CancelOperation);
}

return (ContinueOperation);
}



4. Time to test.








Open shared location as in business service.








Once you open log file you will output as below.








5. Associate Runtime Event with Business service.

Navigate to Site Map > Administration - Runtime Event > Action Set and create record as follows.















Navigate to Events and associated run time event with action set








Once all set up is done please do not forget to reload the personalization.

With this step you are all set and all the logins into system are getting captured.








Have fun.

No comments:

Post a Comment