use of io.zeebe.model.bpmn.impl.instance.ProcessImpl in project zeebe by zeebe-io.
the class CreateDeploymentTest method shouldNotDeployNonExecutableModel.
@Test
public void shouldNotDeployNonExecutableModel() {
// given
final WorkflowsClient workflowService = clientRule.workflows();
final io.zeebe.model.bpmn.instance.WorkflowDefinition workflowDefinition = Bpmn.createExecutableWorkflow("not-executable").startEvent().endEvent().done();
final ProcessImpl workflowImpl = (ProcessImpl) workflowDefinition.getWorkflows().iterator().next();
workflowImpl.setExecutable(false);
// then
exception.expect(ClientCommandRejectedException.class);
exception.expectMessage(containsString("BPMN model must contain at least one executable process"));
// when
workflowService.deploy(clientRule.getDefaultTopic()).addWorkflowModel(workflowDefinition, "workflow.bpmn").execute();
}
Aggregations