Detect process deployments in a spring boot application

Hi,

I need to detect when a new process is deployed on my spring-boot application in order to read the deployed process and send this data to another app.

I tried to use the PostDeployEvent but it seems that it is only fired when the ProcessEngine is built, also using @EnableProcessApplication disables the auto-deployment of my processes and I don’t want that.

I also tried to configure a BpmnParseListener but I need to get the raw xml of the process …

Is there another way to trigger custom code when a process is deployed ?

Thanks

Do you have an application that runs continuously, and some clients deploy process models into it? When using spring, I’ve never seen it like that. What I’ve seen so far is that if a new model is needed then you just create a new version of the application that contains the new model, and then deploys it. But then the app already knows what it has inside.

Of course, my view is very limited.

You can register a custom “deployer.class”.

See the process engine config and the Deployer.class

Thanks for your response,
I guess I need to the preInit of an AbstractCamundaConfiguration right ? The problem using that is I have a cyclic dependencies problems since I need the repositoryService to be called in the deployer …

I tryied a workaround by setting the repository service of m’y custom service manually in the preinit function instead of using @Autowired but all m’y requests return an empty result :confused:

Why do you need the repository service in your custom deployer?

(You create a ProcessEnginePlugin which adds the custom deployer)

I need the raw xml bpmn definition.

The deployer should provide you access to the raw string of each of the resources deployed

You should not require to write a dB query