Set up tenant id for a process definition in Spring Boot

Hi,

We can pass a tenant id when starting a process in @SpringBootApplication in a main class or @EventListener:


runtimeService.createProcessInstanceByKey("myprocess")
.processDefinitionTenantId("tenant1")
.execute();


Using Spring Boot, process definitions are automatically deployed (from process folder in resources).

How can I set up the tenant Id in such a case?

Thanks,

Hello @ilyas ,

if you use the annotation @EnableProcessApplication, you will require the file src/main/resources/META-INF/processes.xml which can be empty by default.

However, this file holds the properties that describe how a process application interacts with the process engine.

Please find extensive documentation about this here:

You will see that you can provide a tenant there as well.

I hope this helps

Jonathan

1 Like

thanks a lot, that helped me!

1 Like