cancel
Showing results for 
Search instead for 
Did you mean: 

SpringProcessEngineConfiguration - autodeploy

chris889
Champ in-the-making
Champ in-the-making
Hi,

Is there a built in way to auto-deploy bpmn resources only if there has been a change in the bmn20.xml file? Setting the deploymentResources property of the SpringProcessEngineConfiguration bean seems to deploy everytime the spring container is started.

br
Christoph
15 REPLIES 15

trademak
Star Contributor
Star Contributor
Hi,

No, there's no feature built-in yet to listen for changes in the bpmn20.xml.
You could however do this with the Camel or Mule ESB integration. Or implement a file listener yourself.

Best regards,

chris889
Champ in-the-making
Champ in-the-making
Thanks for the quick reply. I just wrote my own deployer bean, you can find it here for reference: http://pastebin.com/JU4J0rCr.

trademak
Star Contributor
Star Contributor
Okay great!,

Best regards,

frankee787
Champ on-the-rise
Champ on-the-rise
Isnt deploymentResources supposed to take care of this ? Every time I run it keep deploying again. As per the documentation

Spring integration also has a special feature for deploying resources. In the process engine configuration, you can specify a set of resources. When the process engine is created, all those resources will be scanned and deployed. There is filtering in place that prevents duplicate deployments. Only when the resources actually have changed, will new deployments be deployed to the Activiti DB. This makes sense in a lot of use case, where the Spring container is rebooted often (eg testing).

it shouldnt be deploying it again. Am I missing something ?

jbarrez
Star Contributor
Star Contributor
The check is done  compring the xml bpmn 2.0 files with each other.
Only when something has changed it such a file, the processes are redeployed.

frankee787
Champ on-the-rise
Champ on-the-rise
Just to clarify my understanding.So if I were to re-run my test cases would it keep deploying a new version?

For eg:
Lets say I run my test at 10:00 for the first time. Now the xml bpmn 2.0 has timestamp of 10:00 in the file system. Hence it will be deployed and will be registered as a new version in the Activit DB.

Lets say now I run my test at 10:05 for the second time. Now the xml bpmn 2.0 has still timestamp of 10:00 in the file system.

Will it be re-deployed now ?

Best Regards,
Franklin

frederikherema1
Star Contributor
Star Contributor
It compares based on the content of the file (the inputStream sent to the DB) not the actual file-metadata.

frankee787
Champ on-the-rise
Champ on-the-rise
Thanks for the clarification.

However, each time I bootstrap the spring context the a new version is being deployed in the Activit DB. I am sure, neither the metadata nor the content of the file is changing.

Still the process is being redeployed. Any one got this working ?

Regards,
Franklin

st_patriick
Champ in-the-making
Champ in-the-making
There is a bug in this feature. See (and vote for): http://jira.codehaus.org/browse/ACT-736