added a comment - 28/Dec/11 12:50 PM - edited
It was introduced a new config bean isWorklistFilterAvailable in GrailsflowCoreGrailsPlugin.groovy file. The default value is true (boolean value), it means that query for all worklist items and their variables will be performed. It is possible to turn off filtering by setting isWorklistFilterAvailable bean value to false.
If you have configured worklist filtering to true, it is possible to assume a situation when you have a lot of processes (e.g. > 2000) and it is impossible to get all variables values for filter in one query (some SQL servers restrict the number of parameters for 'IN' clause). In this situation Grailsflow performs several queries (not more then 500 processes are used in one query) and concatenates the results. This concatenation costs time if we have a large number of iterations. There is a bean named maxRestrictedProcesses in GrailsflowCoreGrailsPlugin.groovy file with default value 2000. It means that Grailsflow will try to perform not more then 4 iterations (4 queries) for getting variables values for filter. If there are more restricted processes in system, then the filtering will be skipped.
Small example: currently if there are 10 000 processes restricted to the user (for example, with 10 000 worklist items) and isWorklistFilterAvailable was turned to false then loading for worklist takes 0,6 sec, if isWorklistFilterAvailable was set to true - about 6.5 min;