Replace Java activity with Groovy