Xantrax, there is a lot easier way to do this using the Guvnor REST Api. If you for example have a process in Guvnor's myPackage called myProcess
just get:
http://localhost:8080/drools-guvnor/rest/packages/myPackage/assets/myProcess/source
Hope this helps.