Grails 2.0.4 webflow "type mismatch" exception
===

I'm still pretty new to Grails and I'm developing an online survey. I decided to use web flow and I have been running into many issues. I'm trying to pass the survey id from the gsp page to the flow controller. This works perfectly fine on any other controller action but whenever I do it to the action for the start state of the flow I always get the same error. I've followed a tutorial in a text book that does this the EXACT same way and I'm running out of ideas.

here is the link from the gsp page:

    <g:link controller="surveyPage" action="beginTest" id="${survey.id}">
    ${survey.surveyName}
    </g:link>

and here is the flow with the start state

	def beginTestFlow = {

		showSurvey{

			def survey = Survey.get(params.id)
				
			on("cancel").to "cancelSurvey"
			on("continueSurvey").to "nextQuestion"

		}

		cancelSurvey { redirect(controller:"surveyPage") }
	}

it always throws the exception:

argument type mismatch on the line with

    def survey = Survey.get(params.id)

I've also tried:

    flow.survey = Survey.get(params.id)

or even:

    flow.survey = Survey.get(session.survey.id)

always the same error. Also, I made sure class Survey implements Serializable. I've copied and pasted the same code into a different action with the same controller and it works flawlessly. Any ideas to what is different with the web flow?

