public class ProcessInstanceQueryScript implements SelectRulesScript {
Pagination pagination = Context.getProcessEngineConfiguration().getDbConfig().getPagination();
public Object execute(Object parameter, SqlCommand sqlCommand, ProcessEngineConfigurationImpl processEngineConfiguration) {
ListQueryParameterObject listQueryParameterObject = (ListQueryParameterObject) parameter;
ProcessInstanceQueryImpl processInstanceQueryImpl = (ProcessInstanceQueryImpl) listQueryParameterObject.getParameter();
Page page = listQueryParameterObject.getPage();
return selectProcessInstanceByQueryCriteria(processInstanceQueryImpl,page,sqlCommand);
}