Class ProcessInstanceAssert

    • Method Detail

      • isWaitingAt

        public ProcessInstanceAssert isWaitingAt​(String... activityIds)
        Verifies the expectation that the ProcessInstance is currently waiting at one or more specified activities.
        Parameters:
        activityIds - the id's of the activities the process instance is Expecting to be waiting at
        Returns:
        this ProcessInstanceAssert
      • isNotWaitingAt

        public ProcessInstanceAssert isNotWaitingAt​(String... activityIds)
        Verifies the expectation that the ProcessInstance is currently NOT waiting at one or more specified activities.
        Parameters:
        activityIds - the id's of the activities the process instance is expected not to be waiting at
        Returns:
        this ProcessInstanceAssert
      • isWaitingAtExactly

        public ProcessInstanceAssert isWaitingAtExactly​(String... activityIds)
        Verifies the expectation that the ProcessInstance is currently waiting at exactly one or more specified activities.
        Parameters:
        activityIds - the id's of the activities the process instance is Expecting to be waiting at
        Returns:
        this ProcessInstanceAssert
      • isWaitingFor

        public ProcessInstanceAssert isWaitingFor​(String... messageNames)
        Verifies the expectation that the ProcessInstance is currently waiting for one or more specified messages.
        Parameters:
        messageNames - the names of the message the process instance is expected to be waiting for
        Returns:
        this ProcessInstanceAssert
      • isNotWaitingFor

        public ProcessInstanceAssert isNotWaitingFor​(String... messageNames)
        Verifies the expectation that the ProcessInstance is currently waiting for one or more specified messages.
        Parameters:
        messageNames - the names of the message the process instance is expected to be waiting for
        Returns:
        this ProcessInstanceAssert
      • hasPassedInOrder

        public ProcessInstanceAssert hasPassedInOrder​(String... activityIds)
        Verifies the expectation that the ProcessInstance has passed one or more specified activities exactly in the given order. Note that this can not be guaranteed for instances of concurrent activities (see orderPartiallyByOccurrence for details).
        Parameters:
        activityIds - the id's of the activities expected to have been passed
        Returns:
        this ProcessInstanceAssert
      • hasVariables

        public ProcessInstanceAssert hasVariables​(String... names)
        Verifies the expectation that the ProcessInstance holds one or more process variables with the specified names.
        Parameters:
        names - the names of the process variables expected to exist. In case no variable name is given, the existence of at least one variable will be verified.
        Returns:
        this ProcessInstanceAssert
      • task

        public TaskAssert task()
        Enter into a chained task assert inspecting the one and mostly one task currently available in the context of the process instance under test of this ProcessInstanceAssert.
        Returns:
        TaskAssert inspecting the only task available. Inspecting a 'null' Task in case no such Task is available.
        Throws:
        ProcessEngineException - in case more than one task is delivered by the query (after being narrowed to actual ProcessInstance)
      • task

        public TaskAssert task​(String taskDefinitionKey)
        Enter into a chained task assert inspecting the one and mostly one task of the specified task definition key currently available in the context of the process instance under test of this ProcessInstanceAssert.
        Parameters:
        taskDefinitionKey - definition key narrowing down the search for tasks
        Returns:
        TaskAssert inspecting the only task available. Inspecting a 'null' Task in case no such Task is available.
        Throws:
        ProcessEngineException - in case more than one task is delivered by the query (after being narrowed to actual ProcessInstance)
      • task

        public TaskAssert task​(TaskQuery query)
        Enter into a chained task assert inspecting only tasks currently available in the context of the process instance under test of this ProcessInstanceAssert. The query is automatically narrowed down to the actual ProcessInstance under test of this assertion.
        Parameters:
        query - TaskQuery further narrowing down the search for tasks The query is automatically narrowed down to the actual ProcessInstance under test of this assertion.
        Returns:
        TaskAssert inspecting the only task resulting from the given search. Inspecting a 'null' Task in case no such Task is available.
        Throws:
        ProcessEngineException - in case more than one task is delivered by the query (after being narrowed to actual ProcessInstance)
      • externalTask

        public ExternalTaskAssert externalTask()
        Enter into a chained external task assert inspecting the one and mostly one external task currently available in the context of the process instance under test of this ProcessInstanceAssert.
        Returns:
        ExternalTaskAssert inspecting the only external task available. Inspecting a 'null' external task in case no such external task is available.
        Throws:
        ProcessEngineException - in case more than one external task is delivered by the query (after being narrowed to actual ProcessInstance)
      • externalTask

        public ExternalTaskAssert externalTask​(String activityId)
        Enter into a chained external task assert inspecting the one and mostly one external task of the specified activity id currently available in the context of the process instance under test of this ProcessInstanceAssert.
        Parameters:
        activityId - activity id narrowing down the search for external tasks
        Returns:
        ExternalTaskAssert inspecting the only external task available. Inspecting a 'null' external task in case no such external task is available.
        Throws:
        ProcessEngineException - in case more than one external task is delivered by the query (after being narrowed to actual ProcessInstance)
      • externalTask

        public ExternalTaskAssert externalTask​(ExternalTaskQuery query)
        Enter into a chained external task assert inspecting only external tasks currently available in the context of the process instance under test of this ProcessInstanceAssert. The query is automatically narrowed down to the actual ProcessInstance under test of this assertion.
        Parameters:
        query - ExternalTaskQuery further narrowing down the search for external tasks. The query is automatically narrowed down to the actual ProcessInstance under test of this assertion.
        Returns:
        ExternalTaskAssert inspecting the only external task resulting from the given search. Inspecting a 'null' external task in case no such external task is available.
        Throws:
        ProcessEngineException - in case more than one external task is delivered by the query (after being narrowed to actual ProcessInstance)
      • calledProcessInstance

        public ProcessInstanceAssert calledProcessInstance()
        Enter into a chained process instance assert inspecting the one and mostly one called process instance currently available in the context of the process instance under test of this ProcessInstanceAssert.
        Returns:
        ProcessInstanceAssert inspecting the only called process instance available. Inspecting a 'null' process instance in case no such Task is available.
        Throws:
        ProcessEngineException - in case more than one process instance is delivered by the query (after being narrowed to actual ProcessInstance)
      • calledProcessInstance

        public ProcessInstanceAssert calledProcessInstance​(String processDefinitionKey)
        Enter into a chained process instance assert inspecting the one and mostly one called process instance of the specified process definition key currently available in the context of the process instance under test of this ProcessInstanceAssert.
        Parameters:
        processDefinitionKey - definition key narrowing down the search for process instances
        Returns:
        ProcessInstanceAssert inspecting the only such process instance available. Inspecting a 'null' ProcessInstance in case no such ProcessInstance is available.
        Throws:
        ProcessEngineException - in case more than one process instance is delivered by the query (after being narrowed to actual ProcessInstance)
      • calledProcessInstance

        public ProcessInstanceAssert calledProcessInstance​(ProcessInstanceQuery query)
        Enter into a chained process instance assert inspecting a called process instance called by and currently available in the context of the process instance under test of this ProcessInstanceAssert. The query is automatically narrowed down to the actual ProcessInstance under test of this assertion.
        Parameters:
        query - ProcessDefinitionQuery further narrowing down the search for process instances. The query is automatically narrowed down to the actual ProcessInstance under test of this assertion.
        Returns:
        ProcessInstanceAssert inspecting the only such process instance resulting from the given search. Inspecting a 'null' ProcessInstance in case no such ProcessInstance is available.
        Throws:
        ProcessEngineException - in case more than one ProcessInstance is delivered by the query (after being narrowed to actual ProcessInstance)
      • job

        public JobAssert job()
        Enter into a chained job assert inspecting the one and mostly one job currently available in the context of the process instance under test of this ProcessInstanceAssert.
        Returns:
        JobAssert inspecting the only job available. Inspecting a 'null' Job in case no such Job is available.
        Throws:
        ProcessEngineException - in case more than one task is delivered by the query (after being narrowed to actual ProcessInstance)
      • job

        public JobAssert job​(String activityId)
        Enter into a chained task assert inspecting the one and mostly one task of the specified task definition key currently available in the context of the process instance under test of this ProcessInstanceAssert.
        Parameters:
        activityId - id narrowing down the search for jobs
        Returns:
        JobAssert inspecting the retrieved job. Inspecting a 'null' Task in case no such Job is available.
        Throws:
        ProcessEngineException - in case more than one job is delivered by the query (after being narrowed to actual ProcessInstance)
      • job

        public JobAssert job​(JobQuery query)
        Enter into a chained job assert inspecting only jobs currently available in the context of the process instance under test of this ProcessInstanceAssert. The query is automatically narrowed down to the actual ProcessInstance under test of this assertion.
        Parameters:
        query - JobQuery further narrowing down the search for jobs. The query is automatically narrowed down to the actual ProcessInstance under test of this assertion.
        Returns:
        JobAssert inspecting the only job resulting from the given search. Inspecting a 'null' job in case no such job is available.
        Throws:
        ProcessEngineException - in case more than one job is delivered by the query (after being narrowed to actual ProcessInstance)
      • variables

        public org.assertj.core.api.MapAssert<String,​Object> variables()
        Enter into a chained map assert inspecting the variables currently - or, for finished process instances, historically - available in the context of the process instance under test of this ProcessInstanceAssert.
        Returns:
        MapAssert(String, Object) inspecting the process variables. Inspecting an empty map in case no such variables are available.