Class CustomMultiInstanceHandler

java.lang.Object
org.camunda.community.bpmndt.api.CustomMultiInstanceHandler

public class CustomMultiInstanceHandler extends Object
Fluent API to handle multi instances and multi instance scopes, using custom code - see execute(BiConsumer).
  • Constructor Details

  • Method Details

    • customize

      Customizes the handler, using the given Consumer function. This method can be used to apply a common customization needed for different test cases.
       tc.handleMultiInstance().customize(this::prepare);
       
      Parameters:
      customizer - A function that accepts a CustomMultiInstanceHandler.
      Returns:
      The handler.
    • execute

      public void execute(BiConsumer<TestCaseInstance,Long> action)
      Executes a custom action that handles the multi instance or the multi instance scope.
      Parameters:
      action - A specific action that accepts a TestCaseInstance and the related process instance key.
    • verify

      public CustomMultiInstanceHandler verify(Consumer<io.camunda.zeebe.process.test.assertions.ProcessInstanceAssert> verifier)
      Verifies the multi instance state.

      Please note: An application specific job worker may have already completed the related job and updated some variables.

      Parameters:
      verifier - Verifier that accepts an ProcessInstanceAssert instance.
      Returns:
      The handler.
    • verifyParallel

      public CustomMultiInstanceHandler verifyParallel()
      Verifies that the multi instance loop execution is done in parallel.
      Returns:
      The handler.
    • verifySequential

      public CustomMultiInstanceHandler verifySequential()
      Verifies that the multi instance loop is sequentially executed.
      Returns:
      The handler.