TBUI-Closing the task pane

Task Based UI was one of the most hyped feature of Siebel 8.0. It was one of the main reason for customers to move to Siebel 8.0 apart from the Fusion road map laid by Oracle. TBUI turned out to be the worst implemented feature of Siebel 8.0. Even a simple TBUI would land you into problem that would later be identified as product defects without any workarounds. Some of the common issues were pointed out in the comments section of my earlier post about TBUI

The scenario has improved a lot with Siebel 8.1 but still TBUI has a long way to go before you can think of implementing complex functionalities in TBUI proving its worth and hype. Recently we implemented moderately complex functionality using TBUI (regretting it later) and ended up in burning our fingers badly.

The worst problem that we faced (out of all other problems) was the performance issue. We implemented TBUI on Siebel 8.1.1.3 and got caught up in performance issues.

Problem:
After working a while (typically 15-20 minutes) in TBUI the users would start facing the performance issues in that particular session. The scrolling within a view would became slow, the navigation between views was impacted and eventually user had to end the session and login again in the application before they could start working normally. In case if user refreshed the session (using F5) it resulted in session crash and core dumps (fdr files) would get created.

After the initial investigation of trying to find out memory leaks (the symptoms pointed in that direction) the root cause was identified as Task Pane. Task Pane is kind of Sidebar from which you invoke Tasks and also acts and users guide in session highlighting the steps users is performing.

image

As soon as we closed the Task Pane the performance issue would go away. The initial thought was to ask users to just close the Task Pane as soon as it opened but that again proved to be challenge as Task Pane opened up repeatedly while navigating the task by clicking Previous and Next button. So, it would become pain for users to close it at every step.

Solution:
In the end it was decided to find a way to close the task pane programmatically (This is a feature that is listed in Oracle’s roadmap of future releases of Siebel) but it turned out that it is not as easy as it sounds. Impossible Siebel came to the rescue here and the code provided by Jason at Impossible Siebel became the base of our solution.

The only thing that we need to find out was, the right place to put this code in. After exploring the various options we ended up writing browser script code in Task Playbar Applets that house the Previous, Next, Finish and the Cancel Buttons and we had used “Task Playbar Applet – Top” in our Tasks.

image

The code we wrote to close Task Pane automatically in applet browser scripts was:

Applet PreInvoke Method:

function Applet_PreInvokeMethod (name, inputPropSet)
{
try
{
if(name == “NavigateNext” || name == “NavigatePrev” || name == “CancelTask” || name == “PauseTask”){
var taskPaneObj = top.SWEFindFrame(top,”SS_TaskUIPane”).TaskObj();
if(taskPaneObj != null) taskPaneObj.HandleClose();
}
}
catch(e){/* do nothing */}

return (“ContinueOperation”);
}

Applet Load Event

function Applet_Load ()
{
try
{
var taskPaneObj = top.SWEFindFrame(top,”SS_TaskUIPane”).TaskObj();
if(taskPaneObj != null) taskPaneObj.HandleClose();
}
catch(e){/* do nothing */}

}

I hope this information might be helpful for somebody in distress due to TBUI 🙂 and maybe somebody out there might be able to provide a better way to do it. Keep your feedback, comments and experience coming.

15 Responses to TBUI-Closing the task pane

  1. Our problem is not about perfomance issues but just about view space (too many fields and too little space to host an unuseful task pane applet). We tried to apply your solution and it worked fine for “Next” “Finish” and “Cancel” button, but the Applet_Load function gives an “undefined” error and it does not close the Task Pane Applet at the start of the task. At the moment our workaround is to delete the CCAppletTaskPane.swt file. Maybe it is a bit too drastic but it works without any pop-up error.
    Now we’d prefer to use your solution just in case in the future we’ll want to re-use the task pane applet in some other view like the standard task view. Did anybody have the same “undefined” error or know how to solve it?

    • Well this is tested and tried solution .. i am not sure why you are getting an undefined error. The only reason I can think of is syntax error as the conditions in the code don’t allow the code to fail if task pane is not open..

      Can you copy paste the applet load code so that we can take look at it ???

    • and also how does a user invokes his task if you delete your SWT all together???
      What happens when you click Task Icon or short cut CTRL+SHIFT + Y ??

      •  I have found a interesting shortcut to close,for this user have to open binocular search using CTRL+SHIFT+F then close the binocular search clicking (X) then bothe binocular searc and task pane will closes

        ha ha 🙂

      • actually our crm is just a prototype and we dont need to use the task view, we invoke the task by script under a button. In future even if we’ll still use invoking the task by script we’ll sure need to use the task view so the solution of deleting the swt is not good at all, that’s why i’d like to use yours.

  2. Hi Neel,

    We have similar case where I need to close task pane applet by clicking (x) mark on task pane applet or when user finishes or cancels the task to pass the UAT.

    I have found a document in Impossible siebel blog about this but the info is not fair enough to solve it.

    Can you describe the code given above,Do we need to add above script in play bar applet invoke method and playbar applet load ??

    or any one script is fine enough…Its bit confusing,please describe it.

     

  3. Hi Neel,

    We have similar case where I need to close task pane applet by clicking (x) mark on task pane applet or when user finishes or cancels the task to pass the UAT.

    I have found a document in Impossible siebel blog about this but the info is not fair enough to solve it.

    Can you describe the code given above,Do we need to add above script in play bar applet invoke method and playbar applet load ??

    or any one script is fine enough…Its bit confusing,please describe it.

     

  4. Hi Neel,

    We have similar case where I need to close task pane applet by clicking (x) mark on task pane applet or when user finishes or cancels the task to pass the UAT.

    I have found a document in Impossible siebel blog about this but the info is not fair enough to solve it.

    Can you describe the code given above,Do we need to add above script in play bar applet invoke method and playbar applet load ??

    or any one script is fine enough…Its bit confusing,please describe it.

     

    • Narendra,

      Applet_Load event code is only required if you want to close the task pane immediately after invoking task but you requirement is to close the task pane when user is done with the task.
      So you would not require the applet_load event code… just trap all the events that could lead to closing of the task such as
      Pause,Finish or Cancel.

    • Narendra,

      Applet_load event code is only required if you want to close the task pane as soon as you invoke the task.

      You can use just code I have mentioned in the Applet PreInvoke event…
      but you will need to remove the condition for Next and Previous buttons so your if condition will look like
      if(name == “CancelTask” || name == “PauseTask” || name == “FinishTask”)

      • Neel,

        Thanks for reply,
        I have written script in both browser script events but its not working,Is there any effect of browser version in this ? we are using IE8.

        we are developing POC and the task pane in main project is closing whenever user clicks (X) on task pane applet with out need of any scripting,

        This is really strange behavior and not sure about the root cause

        • Hi Narendra,

          Above code worked perfectly for me, use the code with last view name (active name) and use invoke method instead of preinvoke, if there is any validation logic written in the server side.

          function Applet_InvokeMethod (name, inputPropSet)

          {

          try

          {

          var sActiveView = theApplication().ActiveViewName();

          if((name == “NavigateNext” || name == “CancelTask”) && sActiveView == “Last Task View Name”)

          {

          var taskPaneObj = top.SWEFindFrame(top,”SS_TaskUIPane”).TaskObj();

          if(taskPaneObj != null) taskPaneObj.HandleClose();

          }

          }

          catch(e)

          {

          throw e;

          }

          }

  5. We had the task pane disabled in “Task UI Service (SWE)”:

    function Service_PreCanInvokeMethod (MethodName, &CanInvoke){ if (MethodName==”ToggleTaskPane”) {  CanInvoke = “FALSE”;  return (CancelOperation); } return (ContinueOperation);}

  6. If we are using multilingual application, and we need to change the header name of Current Task to a different language, how do we go about it?

  7. hi,

    the code that you used

    var taskPaneObj = top.SWEFindFrame(top,”SS_TaskUIPane”).TaskObj();
    if(taskPaneObj != null) taskPaneObj.HandleClose();

    closes task pane automatically.

    but if i use this code in openui,view tabs below the perticular applet is not displaying.can u help me,if i want to bypass this code?so that this features works fine in Openui

Leave a Reply

Contribute