BPA Workflow - result set exceeds row limit for the Query Collection
I have a Workflow where I want to calculate Inventory Accuracy → in order to do this, I need to read all the lines in the CountResultsHandling → Reference_CountingReportLine for the current year.
When I inspect the WF, I get the below error:
The result set size exceeds either the row limit or the character limit for the Query Collection.
What’s the max rows allowed in the Query Collection? Any advice how I could workaround this limitation?
Of course, I could further filter the Colelction for a smaller time period, but my customer wants the WF to take into account the data for the full current year.
@kamnlk any suggestion will be appreciated.
Page 1 / 1
Hi,
You will encounter the specified error message if the read query exceeds the Row or Character limit. Here we configured query collection row limit as 10000 and query collection char limit as 2097152 (2GB).
Thanks @dinelka. I just checked and there are 4908 rows fetched in the Collection. So probably I’ll just use $select to specify just the columns I need for my calculation. Thanks a lot!
@dinelka it seems I hit another limitation. I can’t use Parameters and Filter at the same time.
I would need the filter so I don’t go above 10000 rows and I also need the $select Parameter to not go above the char limit as 2097152 (2GB).
Anyways, to me it seems strange that less than 5000 rows will have more than 2 GB and exceed the char limit. Isn’t it?
This is a validation from workflow side.
Option 1:
If possible, you can try with an option of breaking the “Get count Results” API task into multiple tasks using filters and then join the collection into a single collection inside the workflow using a script task
var ArrayList = Java.type('java.util.ArrayList'); var list = new ArrayList(); list .addAll(Reference_CountingReportLine_Set2); list .addAll(Reference_CountingReportLine_Set2); execution.setVariable("YearCountingReportLine", list )
as a downside you wont be able to use $select here due to the above validation
option 2:
Since you are interested with year of the data, you could try to create a custom attribute to the CountingReportLine entity where you extract the year from the LastCountDate attribute.
Then that attribute is available inside workflow as a new attribute. you can use that to use filtering of data and also use $select