Hi Hari,
When you say, new documents get generated, do you mean new document types witch corresponding Java Beans, or are you talking about new documents as in new content, because that is highly unconventional.
I’m going to assume you mean the first, so having said that, let me help.
How you normally go about this is with the bootstrap function. When you make a new document type, you don’t want to delete your production database, because your all the work done on production will be lost. So what Hippo built is the hippoecm-extension. In these xml files, you can edit which files need to be loaded or reloaded on a project restart.
So lets say you have a news document, and your editors on production have been making a bunch of those.
Now let’s say you continue coding and you’ve made a new document type : EventDocument and you want those events to be coupled to the news document.
What you want to do on restart is load the new EventDocument so editors and authors can create those, and reload the news document so the new option is available.
Good luck
Wim