Support Article
Problem in GetNextWork Listview content activity of Workbasket
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 -
- Query which is being genearted does not have the newly added condition
- Since the point (a), the result of the List View was not fetching the desired results.
List View: Assign-WorkBasket.GetNextWork.All
Activity : getContentForGetNextWorkError 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)
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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.