Interface Mocker.MockedCall

  • Enclosing interface:
    Mocker

    public static interface Mocker.MockedCall
    A mocked Call/UI operation
    Since:
    9.2
    API:
    This is a public API.
    • Method Detail

      • call

        void call​(Tuple parameters,
                  Tuple results)
           throws NoSuchFieldException
        This operation is executed instead of the Call/UI part of an element. You can map the given input parameters to the given result parameter. Or simulate user input by setting the given result parameters.

        Example how to mock the UI part of an HTML Dialog:

        
         BpmElement HTML_DIALOG = BpmProcess.name("ProcurementRequest").elementName("Registration Form");
         bpmClient.mock().uiOf(HTML_DIALOG).with((parameters, results) -> 
         { 
           ProcurementRequest data = new ProcurementRequest();
           data.setDescription("PC"); 
           data.setPricePerUnit(877.99);
           data.setAmount(1);
           data.setNotes("My old PC broke down");
           results.set("procurementRequestData", data);
         });   
         
        Parameters:
        parameters -
        results -
        Throws:
        NoSuchFieldException
        API:
        This public API is available in Java.