How to delete/persist your JBPM process after restart ?

JBoss recipe of the day

The hibernate property “hbm2ddl.auto” controls what to do with persisted process data once the JBoss server is shut down or the application is redeployed.

By default you have:

<property name=”hbm2ddl.auto”>update</property>

which keeps the database updated at every restart. However if you change it to :

<property name=”hbm2ddl.auto”>drop-create</property>

then every time the database will be dropped and created. That’s an option if you are just testing your process and you dont’ want to fill the DB with useless data.