Thursday, September 25, 2014

Custom ADF application through BPM workspace - Null Pointer Exception - when performed action on the last worklist item in the workspace

Issue

   While working on a custom ADF application which is accessed through the BPM workspace whose taskflows are generated from human tasks encountered the issue as described below.
 
   Accessing the last item in the worklist and perform action which deletes the item from the worklist.
 
   If the action is performed as part of workspace inbox, everything works fine.
  
   Worklist throws a null pointer exception if the user double clicks and opens up worklist item in the separate window and submits any outcome.

   The popup window goes blank and throws up the NPE. Close the window and refresh the inbox, the worklist item is gone as expected but with the error. 

   Please find the error below.

Caused By: java.lang.NullPointerException
        at oracle.bpel.worklistapp.util.WorklistServiceUtil.isTaskFlow(WorklistServiceUtil.java:1152)
        at oracle.bpel.worklistapp.tasklist.beans.controller.TaskController.launchTaskDetails(TaskController.java:506)
        at oracle.bpel.worklistapp.tasklist.beans.controller.TaskController.launchExternalWindow(TaskController.java:745)
        at oracle.bpel.worklistapp.tasklist.beans.controller.TaskController.fetchNewTask(TaskController.java:767)

Solution

   Here I go thinking to solve the issue started looking at
    
      1. Method bindings - whether they are pointing to the correct method, iterator etc.,
      2. Anything unusual in Page Definition file.
   Nothing un usual in the JSPX, pagedef. So started looking at the human task itself from which the ADF taskflow is generated.    
      3. Suspected that there is no outcome of such which is being executed, but everything is fine :(
      
   Flushed out all the thoughts and started looking at ADF taskflow and found the issue with the control flows.

   So, here is the solution which is simple but took a while to figure out. 
          
    1. Go to the bounded taskflow and create control flow between jspx and taskFlowRefresh return activity.
    2. Make sure the outcome of the return activity is "done".
  

No comments:

Post a Comment