Package org.camunda.community.bpmndt.api
Class SignalEventHandler
java.lang.Object
org.camunda.community.bpmndt.api.SignalEventHandler
Fluent API to handle signal catch events. Please note: a signal is broadcasted by default.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidBroadcasts a signal, when the process instance is waiting at the corresponding element.customize(Consumer<SignalEventHandler> customizer) Customizes the handler, using the givenConsumerfunction.voidexecute(BiConsumer<io.camunda.zeebe.client.ZeebeClient, String> action) Broadcasts a signal using a custom action, when the process instance is waiting at the corresponding element.Verifies the signal event's waiting state.verifySignalName(String expectedSignalName) Verifies that the signal event has a specific signal name.verifySignalName(Consumer<String> signalNameConsumer) Verifies that the signal event has a specific signal name, using a consumer.verifySignalNameExpression(Consumer<String> signalNameExpressionConsumer) Verifies that the signal event has a specific signal name FEEL expression (see "Signal" section), using a consumer function.
-
Constructor Details
-
SignalEventHandler
-
SignalEventHandler
-
-
Method Details
-
broadcast
public void broadcast()Broadcasts a signal, when the process instance is waiting at the corresponding element. -
customize
Customizes the handler, using the givenConsumerfunction. This method can be used to apply a common customization needed for different test cases.tc.handleSignalCatchEvent().customize(this::prepare);
- Parameters:
customizer- A function that accepts aSignalEventHandler.- Returns:
- The handler.
-
execute
Broadcasts a signal using a custom action, when the process instance is waiting at the corresponding element.- Parameters:
action- A specific action that accepts aZeebeClientand the signal name.- See Also:
-
verify
public SignalEventHandler verify(Consumer<io.camunda.zeebe.process.test.assertions.ProcessInstanceAssert> verifier) Verifies the signal event's waiting state.- Parameters:
verifier- Verifier that accepts anProcessInstanceAssertinstance.- Returns:
- The handler.
-
verifySignalName
Verifies that the signal event has a specific signal name.- Parameters:
expectedSignalName- The expected signal name.- Returns:
- The handler.
-
verifySignalName
Verifies that the signal event has a specific signal name, using a consumer.- Parameters:
signalNameConsumer- A consumer asserting the signal name.- Returns:
- The handler.
-
verifySignalNameExpression
Verifies that the signal event has a specific signal name FEEL expression (see "Signal" section), using a consumer function.- Parameters:
signalNameExpressionConsumer- A consumer asserting the signal name expression.- Returns:
- The handler.
-