Class WorkflowInstanceHistoryPoller

  • All Implemented Interfaces:
    Callable<Boolean>

    public class WorkflowInstanceHistoryPoller
    extends org.apache.sling.testing.clients.util.poller.Polling
    A Utility Poller to wait until the worflow history contains any matching condition to be present For example you can check if the workflow history contains the process called "End" and that the status is "Completed" As usually as a poller it need that you provide the polling interval and max number of attempts before it abort the polling
    • Constructor Detail

      • WorkflowInstanceHistoryPoller

        public WorkflowInstanceHistoryPoller​(WorkflowClient client,
                                             String workflowInstancePath)
    • Method Detail

      • call

        public Boolean call()
                     throws org.apache.sling.testing.clients.ClientException
        Specified by:
        call in interface Callable<Boolean>
        Overrides:
        call in class org.apache.sling.testing.clients.util.poller.Polling
        Throws:
        org.apache.sling.testing.clients.ClientException
      • setCondition

        public void setCondition​(String expectedProcess,
                                 String expectedStatus)
        Set the condition that will define the polling
        Parameters:
        expectedProcess - the process title that is expected to be found in the history items
        expectedStatus - the status of that history item (i.e completed, active etc..)