use of io.zeebe.client.workflow.impl.WorkflowInstanceEventImpl in project zeebe by zeebe-io.
the class CancelWorkflowInstanceTest method shouldRejectCancelWorkflowInstance.
@Test
public void shouldRejectCancelWorkflowInstance() {
// given
final WorkflowInstanceEventImpl event = Events.exampleWorfklowInstance();
event.setKey(2L);
brokerRule.onWorkflowRequestRespondWith(2L).put("state", "CANCEL_WORKFLOW_INSTANCE_REJECTED").done().register();
thrown.expect(ClientCommandRejectedException.class);
thrown.expectMessage("Command for event with key 2 was rejected by broker (CANCEL_WORKFLOW_INSTANCE_REJECTED)");
// when
clientRule.workflows().cancel(event).execute();
}
Aggregations