public class EventHandler extends Object
execute(Consumer) with a custom
action, if the variable event is delete.| Constructor and Description |
|---|
EventHandler(org.camunda.bpm.engine.ProcessEngine processEngine,
String activityId,
String eventName) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
apply(org.camunda.bpm.engine.runtime.ProcessInstance pi) |
EventHandler |
customize(Consumer<EventHandler> customizer)
Customizes the handler, using the given
Consumer function. |
void |
eventReceived()
Continues the waiting execution with an action that calls
messageEventReceived,
signalEventReceived or setVariables (depending on the actual event type). |
protected void |
eventReceived(org.camunda.bpm.engine.runtime.EventSubscription eventSubscription) |
void |
execute(Consumer<org.camunda.bpm.engine.runtime.EventSubscription> action)
Executes a custom action that handles the intermediate catch event.
|
EventHandler |
verify(BiConsumer<org.camunda.bpm.engine.test.assertions.bpmn.ProcessInstanceAssert,org.camunda.bpm.engine.runtime.EventSubscription> verifier)
Verifies the events's waiting state.
|
EventHandler |
withVariable(String name,
Object value)
Sets a variable, which is passed to the execution when the default action is used.
|
EventHandler |
withVariableTyped(String name,
org.camunda.bpm.engine.variable.value.TypedValue value)
Sets a typed variable, which is passed to the execution when the default action is used.
|
protected void apply(org.camunda.bpm.engine.runtime.ProcessInstance pi)
public EventHandler customize(Consumer<EventHandler> customizer)
Consumer function. This method can be used to
apply a common customization needed for different test cases.
tc.handleEvent().customize(this::prepareEvent);
customizer - A function that accepts a EventHandler.public void execute(Consumer<org.camunda.bpm.engine.runtime.EventSubscription> action)
action - A specific action that accepts an EventSubscription.public void eventReceived()
messageEventReceived,
signalEventReceived or setVariables (depending on the actual event type).RuntimeService.messageEventReceived(String, String, java.util.Map),
RuntimeService.signalEventReceived(String, String, java.util.Map),
RuntimeService.setVariables(String, java.util.Map)protected void eventReceived(org.camunda.bpm.engine.runtime.EventSubscription eventSubscription)
public EventHandler verify(BiConsumer<org.camunda.bpm.engine.test.assertions.bpmn.ProcessInstanceAssert,org.camunda.bpm.engine.runtime.EventSubscription> verifier)
verifier - Verifier that accepts an ProcessInstanceAssert instance and an
EventSubscription.public EventHandler withVariable(String name, Object value)
name - The name of the variable.value - The variable's value.public EventHandler withVariableTyped(String name, org.camunda.bpm.engine.variable.value.TypedValue value)
name - The name of the variable.value - The variable's typed value.Copyright © 2023 Camunda Services GmbH. All rights reserved.