Class BpmClient

java.lang.Object
ch.ivyteam.ivy.bpm.engine.client.BpmClient

public class BpmClient extends Object
BPM engine client that allows to drive bpmn process workflows with fluent API.

Test

Allows to simulate real-user interactions with bpm processes and assert its results. Therefore this API is the key to protect your investment and make TDD approaches possible.

Since:
7.4
API:
This is a public API.
  • Method Summary

    Modifier and Type
    Method
    Description
    Mocks process elements for testing.
    Start a process, sub process or task.
  • Method Details

    • start

      public ByBuilder start()
      Start a process, sub process or task.

      Example:

      
       bpmClient.start().process(startElement).execute();
       bpmClient.start().subProcess(subStartElement).execute();
       bpmClient.start().task(nextTask).execute();
       
      Returns:
      request builder
      API:
      This public API is available in Java.
    • mock

      public Mocker mock()

      Mocks process elements for testing. Use it to mock UI elements or elements that communicate with external systems like databases, SOAP and REST web services, etc.

      Example how to mock an HTML Dialog:

      
       BpmElement HTML_DIALOG = BpmProcess.name("ProcurementRequest").elementName("Registration Form");
       bpmClient.mock().element(HTML_DIALOG).with(ProcurementRequest.class, (in, out) ->
         {
           out.setDescription("PC");
           out.setPricePerUnit(877.99);
           out.setAmount(1);
           out.setNotes("My old PC broke down");
         });
       
      Returns:
      mocker
      API:
      This public API is available in Java.