@Bean public ZeebeClient zeebe() { System.out.println("Connect to Zeebe at '" + zeebeBrokerContactPoint + "'"); // Cannot yet use Spring Zeebe in current alpha ZeebeClient zeebeClient = ZeebeClient.newClientBuilder() // .brokerContactPoint(zeebeBrokerContactPoint) // .build(); // Trigger deployment zeebeClient.workflowClient().newDeployCommand() // .addResourceFromClasspath("order-kafka.bpmn") // .send().join(); return zeebeClient; }
public static void main(final String[] args) { final String broker = "localhost:26500"; final ZeebeClientBuilder clientBuilder = ZeebeClient.newClientBuilder().brokerContactPoint(broker); try (ZeebeClient client = clientBuilder.build()) { final DeploymentEvent deploymentEvent = client.newDeployCommand().addResourceFromClasspath("demoProcess.bpmn").send().join(); System.out.println("Deployment created with key: " + deploymentEvent.getKey()); } } }