It seems features are being deprecated or don't exist that would help with self-deployment during application start-up.
A self-deployment scenario could be:
1) Is persistence service set up (do database tables exist)? If not, set up persistence service (create schema).
2) Is Process Definition deployed? If not, deploy Process Definition.
The problem is that the API has methods to do things, but not test if they are already done, e.g. JbpmConfiguration.createSchema() -- how do you test if schema already exists (JbpmSchema.hasTables() only available through deprecated JbpmSessionFactory?). JbpmContext.deployProcessDefinition() -- to test if deployed, requires trapping error with JbpmContext.getLatestProcessDefinition()?
jBPM version 2 seemed to have properties to tell the persistence service to create the schema if not already created (jbpm.create.tables); disappeared in version 3?
It would be useful if the API exposed methods to test the state of deployment to help the self-deployment scenario.
1) hibernate has functionality for this. Just change the hibernate.cfg.xml
2) is what? 3 or 4 lines or real code? Yes, it could be an enhancement to the api, but since there is no real processversioning IN the pd, how would we tell. Currently it is best to just do this (imo simple thing) yourself.
3) .... Yes, lets implement this. ;-)