Bug fixes for jBPM and Hibernate integration