Class ProcessInstanceInspections
java.lang.Object
io.camunda.zeebe.process.test.inspections.ProcessInstanceInspections
Inspections for process instance events. This class is particularly useful to find process
instances that have been started by other process instances (e.g. by a call activity).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFinds the first process instance that matches the applied filtersFinds the last process instance that matches the applied filtersfindProcessInstance(int index) Finds the process instance that matches the applied filters at a given indexwithBpmnProcessId(String bpmnProcessId) Filters the process instances to only include instances that have the given BPMN process idwithParentProcessInstanceKey(long key) Filters the process instances to only include instances that were started by the given parent process instance key
-
Constructor Details
-
ProcessInstanceInspections
-
-
Method Details
-
withParentProcessInstanceKey
Filters the process instances to only include instances that were started by the given parent process instance key- Parameters:
key- The key of the parent process instance- Returns:
- this
ProcessInstanceInspections
-
withBpmnProcessId
Filters the process instances to only include instances that have the given BPMN process id- Parameters:
bpmnProcessId- The BPMN process id of the desired process instance- Returns:
- this
ProcessInstanceInspections
-
findFirstProcessInstance
Finds the first process instance that matches the applied filters- Returns:
OptionalofInspectedProcessInstance
-
findLastProcessInstance
Finds the last process instance that matches the applied filters- Returns:
OptionalofInspectedProcessInstance
-
findProcessInstance
Finds the process instance that matches the applied filters at a given indexExample: If 3 process instances have been started, findProcessInstance(1) would return the second started instance.
- Parameters:
index- The index of the process instance start at 0- Returns:
OptionalofInspectedProcessInstance
-