Is there "Definition Deployed Event"?

Hi guys,

is it possible to consume anything like “Definition Deployed Event”?

Especially, I’m talking about autodeployed definition on spring boot applications startup. Are there any kind of listeners for that?

In the past I have used the Deployer.class configs in the process engine configuration. Should be able to use that to trigger on deployment.

Hi Stephen!

Can you please find any example for that? I took a look to the implementation of DeployCmd - and there is only usage of Deployer classes just for simply constants, like, “isBpmnResource”.

Are you looking for something post-deployment and pre-deployment listener

	public void onPostDeploy(PostDeployEvent event) throws Exception {
		// migrateProcesses();

	//	startService();

	public void onPreUnDeploy(PreUndeploy event) throws Exception {
		// migrateProcesses();


)) No, this is the other kind of “Deploy”. This PostDeployEvent is about deployment of spring application, but nothing about deployment of bpmn definitions )).

The funny part is that this PostDeployEvent listener (“deploy” in terms of spring) will works only in case of EnableProcessApplication annotation. Which will turn off auto-deploy feature (“deploy” in terms of camunda) :smile:

1 Like

when you have EnableProcessApplication annotation, it will look for processes.xml in the META-INF folder. You can place an empty processes.xml file to do the auto-deployment of all your process.

Unfortunately, no, it’s not working in that way. But it’s even doesn’t matter ). PostDeployEvent - it’s not about definition deplyment.




So you can use that to throw your own event to wherever. Everything about the deployment would be in the entity passed into the Deployer. So you can add your own handling logic.

Hi @StephenOTT!

Yes, I have seen these method/interface ),
and already trying to go in this way,
and after your reply I’ve decided to retry everything again just to prove that it’s not working… But it works! )))

Thanks a lot, man ). Probably, I did something wrong during my prev attempt ). Now it’s ok and working well )