Deploy BPMN Model or xml via repository

could you please let me the know the steps how to deploy the process via BPMN model directly or via XML directly not the file itself
I have tried repositoryservice.createDeployment().addBpmnmodel(“test”,bpmnModel).deploy()

Thanks in advance

repositoryService.createDeployment()
				.addBpmnModel(bpmnId + ".bpmn", bpmnModel).deploy();

You might need to pass the ${bpmnModelId}.bpmn as the resourceName from the DeploymentBuilder.
Hope this helps!

Thanks Phil. i have tried
repositoryService.createDeployment()
.addBpmnModel(bpmnId + “.bpmn20.xml”, bpmnModel).deploy();
it worked