Porting xml workflow to hibernate