unable to retrieve data - batchSize

Certified Senior Developer


Hello,

we have a problem using the attached rule, note that the value for batchSize is 10.

The following error message appears:
Error evaluating expression [....] in rule [...] at function queryEntity [line 3]. An error occurred while retrieving data
 
The entity being queried is a VIEW in the SqlServer database, and this view contains about 68.000 rows

In the tomcat-stdOut.log  we found the following rows:

2021-05-05 13:12:52,416 [ajp-nio-8009-exec-9] ERROR org.hibernate.util.JDBCExceptionReporter - The query has timed out.
2021-05-05 13:14:20,013 [Timer-4] INFO  com.appiancorp.cache.sail.StatefulSailCacheImpl - Stateful SAIL db cache cleanup process executing...removing expired entries from                                                      db
2021-05-05 13:14:20,013 [Timer-4] INFO  com.appiancorp.cache.sail.StatefulSailCacheImpl - Stateful SAIL current memory cache entries=2 size=40214 bytes

Looking in the custom.properties file we found that the parameters are  configured this way:

conf.data.query.timeout=10
conf.data.query.memory.limit=1M

If we change the batchsize to 11 or also to 9  this rule works (I tried many times to change these values).
I can not understand why this change in batchSize is causing a total different result, by the way the aggregation in the rule can not return more than 10 items.

Could you please give me a direction or an hint for that?

Thank you in advance, best regards.

Paolo

 

a!queryEntity(
   entity:  cons!V_BOM_REQUEST_CDT,
   query: a!query(
     aggregation: a!queryAggregation(
       aggregationColumns: {
         a!queryAggregationColumn(
           field: "running_status_code",
           alias: "stato",
           isGrouping: true
         ),
        a!queryAggregationColumn(
           field: "running_status_code",
           alias: "totale",
           aggregationFunction: "COUNT"
         )
       }
     ),
     logicalexpression: a!queryLogicalExpression(
       operator: "AND",
       filters: {
         a!queryFilter(
           field: "running_status_code",
           operator: "not in",
           value: {cons!STATUS_PAUSE, cons!STATUS_DELETE, cons!STATUS_LOCK}
         ),
         a!queryFilter(
           field: "request_process_insert_time",
           operator: "between",
           value: {toDatetime(ri!startDate), toDatetime(ri!endDate)},
           applyWhen: and(not(isnull(ri!startDate)), not(isnull(ri!endDate)))
         ),
         a!queryFilter(
           field: "user_id",
           operator: "=",
           value: ri!user,
           applyWhen: not(isnull(ri!user))
         ),
         a!queryFilter(
           field: "psp_new",
           operator: "=",
           value: ri!psp_new,
           applyWhen: not(isnull(ri!psp_new))
         ),
         a!queryFilter(
           field: "psp_old",
           operator: "=",
           value: ri!psp_old,
           applyWhen: not(isnull(ri!psp_old))
         ),
         a!queryFilter(
           field: "istituto",
           operator: "=",
           value: ri!istituto,
           applyWhen: not(isnull(ri!istituto))
         ),
         a!queryFilter(
           field: "banca",
           operator: "=",
           value: ri!banca,
           applyWhen: not(isnull(ri!banca))
         ),
         a!queryFilter(
           field: "cod_filiale",
           operator: "=",
           value: ri!cod_filiale,
           applyWhen: not(isnull(ri!cod_filiale))
         ),
         a!queryFilter(
           field: "tipo_operazione",
           operator: "=",
           value: ri!tipo_oper,
           applyWhen: not(isnull(ri!tipo_oper))
         ),
       },
       ignoreFiltersWithEmptyValues: true
     ),
     pagingInfo: a!pagingInfo(
       startIndex: 1,
       batchSize: 10,
       sort: {
         a!sortInfo(
           field:"totale"
         )
       }
     )
   ),
   fetchTotalCount: false
)
 
 
 

  Discussion posts and replies are publicly visible