Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Problem in GetNextWork Listview content activity of Workbasket

SA-5847

Summary


 

User has modified the out-of-the-box List View (Assign-WorkBasket.GetNextWork.All) and added another condition. With these chanes, they have expereinced following issues -

  1. Query which is being genearted does not have the newly added condition
  2. Since the point (a), the result of the List View was not fetching the desired results.
 

List View:  Assign-WorkBasket.GetNextWork.All
Activity : getContentForGetNextWork


Error Messages






Steps to Reproduce



Modify out-of-the-box List View rule Assign-WorkBasket.GetNextWork.All and add some more filtering conditions.

Root Cause


 

It was seen that, when we run out-of-the-box List View Assign-WorkBasket.GetNextWork.All, it fails with an error message on the screen. This has been identified as an issue and root cause was due to an issue in the Java step-3 of the activity - Embed-ListParams.getContentForGetNextWorkactivity. This is highlighted as below -

 

sql.append(")");

sql.append("AND wb0.pyErrorAssignment IS NULL AND ");

sql.append(workBasketWhereClause);

if (tools.getParamValue("workPool").length() > 0)

{

     pyPreparedValues.add(tools.getParamValue("workPool")+"%");

     sql.append(" AND wb0.pxRefObjectClass LIKE {" + pageName + ".pyPreparedValues(" + pyPreparedValues.size() + ")}");

}


After checking-out of the activity and removing the AND clause, the List View works fine.

However, the repoted issue was after adding new condition in the List view was neglected during the run and desired results were not shown. Also, it is observed that the query which being generated was not having the newly added condition in the WHERE clause of the SQL.

 


Resolution



Following local change has been suggested to user for getting desired results -

a) Removed the AND clause from the Java code in Step-3 of the
Embed-ListParams.getContentForGetNextWorkactivity.

b) Created an activity (Embed-ListParams.getContentForNextWork3) and called modified activity (getContentForGetNextWork) and added a Java step like shown below:

 



Following is the Java code added: (in this case, user has included additional filtering having the Status as New)
  
ClipboardProperty results = myStepPage.getProperty("pxResults");
 
for(int i=1; i<=results .size() ;i++){                             
            ClipboardPage page= results .getPageValue(i);
            String fullPath = page.getReference()+".pxPages(ps)";
            ClipboardPage refPage = tools.findPage(fullPath);
//         if(refPage!=null && refPage.getString("pyStatusWork").equalsIgnoreCase("Resolved-Completed"))
            if(refPage!=null && refPage.getString("pyStatusWork").equalsIgnoreCase("New"))
 
            {
                        results.remove(i);
                        i--;
            }
}
 
     Depending on the requirement, conditions can be added in the above Java code.

c)  In the List View (GetNextWork), make a call this new activity (getContentForGetNextWork3). 

 

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us