Time Logging inside Task Based UI

We implemented Task Based UI recently in our application. This task was to guide user through the business process while working on a service request. The main requirement to implement Task Based UI was to know time taken at each step of the process. This information was to be used to refine or redesign the business process in order gain maximum productivity.

In this post I am going to discuss the important things that we came across while implementing this requirement.

First Step:

The first thing that we had to uncover was how to find out when a task is launched. A bit of research and logs revealed name of the all important business service that plays vital role in Task Based UI functioning. Task UI Service (SWE) is the all important business service which controls various methods that are invoked during the Task.

Uncovering Methods:

The next thing was uncovering various methods that are triggered while clicking Pause, Next, Previous, Submit and Finish buttons to track the timings users spend on each step. To uncover these we used combination of starting TBUI in debug mode and setting up debug points in the Task UI Service (SWE). Below are the methods that are triggered while the user is in TBUI.

  1. StartTask – When the task is started
  2. ExplicitCancelTask – When user clicks cancel button in Task
  3. ExplicitPauseTask – When users clicks pause button in Task
  4. GetTaskandCurrStepDisplayNames – This method is invoked while navigating inside the view. This is method then helps us to find the current step name and

Final Logic:

Equipped with the above information all that was left to put in a logic in place to log time of each step and tie it to the service request for which the task was invoke. The code was written at two places

  1. Inside PreInvokeMethod and InvokeMethod of Task UI Service (SWE) to trap the events
  2. A seperate business service to actually log the events to database and create property set.

So the pseudo code for the final logic goes something like this

if(Method ==  “StartTask”)
{//  Create and activity record. Start logging the task in form of property set}
else
{
// this means some other step has been invoked during navigation
//extract the current name and log it in the property set
}

if(Method == “Pause task”)
{//log the property set in the database. }

if(Method == “Cancel Task”)
{ //log the property set in database }

As you can see we used property sets to actually gather data and log it only when task is completed,canceled or paused. You have to be very careful while designing the solution as anything inefficient is going to affect the functionality of the TBUI and can lead to performance issues.

I would like to thank Anshu Joshua for all his findings and helping me with this

6 Responses to Time Logging inside Task Based UI

  1. Hi Neel,

    Very Interesting post and I am working on TBUI now a days,If I understand this correctly the requirement is to find the time  user spent on each task view before he is going to the next task view by clicking on Next button on playbar applet.

    Can you please describe more on this..

    Thanks
    Narendra
    http://www.siebelexpress.co.cc

  2. Hi Neel,

    Very Interesting post and I am working on TBUI now a days,If I understand this correctly the requirement is to find the time  user spent on each task view before he is going to the next task view by clicking on Next button on playbar applet.

    Can you please describe more on this..

    Thanks
    Narendra
    http://www.siebelexpress.co.cc

  3. I am working on TBUI for first time and i am getting Task UI views only supported in HI mode.(SBL-UIF-00506) errro when i am using TBC to display in task view for regular BC its working fine.Please help.
    Regrads,
    KK.

Leave a Reply

Contribute