Interface ProcessRunHistoryQuery

All Superinterfaces:
PaginatedQueryBuilder<ProcessRunServiceLocal.ProcessRun>

public interface ProcessRunHistoryQuery extends PaginatedQueryBuilder<ProcessRunServiceLocal.ProcessRun>
Builds a process run history query for the authenticated project session bound to the current thread.

 var service = PlannerEngineServiceLocator.INSTANCE.getRunHistoryServiceLocal();
 var query = service.createRunHistoryQuery()
         .object(new ObjectReference(ObjectType.PUBLICATION, publicationId))
         .processDefinitionKey("renderPublication")
         .failedOnly(true)
         .limit(10);

 var firstPage = query.page();
 List<ProcessRun> runs = firstPage.items();

 if (firstPage.nextCursor() != null) {
     var nextPage = query.cursor(firstPage.nextCursor()).page();
 }
 

Reuse the same filters when passing a continuation cursor. Check the page outcome to distinguish a complete page from an incomplete read.

See Also: