Wrapped groovy rule in transaction

Also fixed a minor parse on delivering the sources map