I want to create process engine in spring boot integration test with unique process engine name every time a process engine is loaded.
Tried following post but this does not create process instance as per deployment descriptor in src/test/resources/META-INF/processes.xml but rather points to src/main/resources/META-INF/processes.xml when I am not providing process-engine tag in deployment descriptor of src/test/resources. I am refreshing test context by using @DirtiesContext annotation for each integration test.
This is sample process deployment descriptor i am using.
As mentioned in the question I have already tried the above post, but it does not detail about deploying process using user configured processes.xml when auto deployment of camunda files in spring boot is disabled using @EnableProcessApplication.
In my case I am using a processes.xml file in src/main/resources/META-INF folder of my spring boot application to deploy process definitions using default engine.
When integration tests are running, it is still referring to the file in src/main/resources/META-INF. But I would rather want it to refer the processes.xml file from src/test/resources/META-INF folder.
I want unique process engine being created for every integration test. For that I have added the following properties in application-test.yml with appropriate Active profile for all tests.
Thanks for the link. Just wanted to know what should be processes.xml configuration for process engine when we want uniquie name for process engines for each integration test.
So you just need to make sure the properties for uniqueness are set in the tests. Or the tests are using the correct profile (application.properties file) where they are defined. (How to achieve the latter, you can check the Spring boot user guide.)