Search code examples
jakarta-eegrailsspring-webflow

Problem with webflow(s) in Grails


I've just come across a rather odd problem whilst testing my applications webflows.

I have two seperate webflows that are accessed once a user logs in depending on whether the user is male or female, they begin a process which sends them on a webflow. One for males, a different one for females.

So to test my app, I login as a male user and enter the flow, thats all fine.. then either by logging out and logging in as a female (or logging in as a female user in a different browser) I then attempt to go through the female process but Bang I get an exception:

Error 500: java.util.Collections$UnmodifiableMap cannot be cast to groovy.lang.Closure
Servlet: grails
URI: /ACUREG/grails/applicant/ma.dispatch
Exception Message: java.util.Collections$UnmodifiableMap cannot be cast to groovy.lang.Closure
Caused by: java.util.Collections$UnmodifiableMap cannot be cast to groovy.lang.Closure
Class: ApplicantController

Now this is strange, as the reverse is also true, If I started first going through as a female, then attempt to try the Male process, the same issue occurs but this time the exception will point to the first event in the male webflow code...

Does anyone know why this may be happening? I did think its perhaps something to do with two webflows in the same controller but after seperating them into their own controllers and still seeing the same issue thats clearly not the case.

Thanks,


Solution

  • The problem was down to webflow events having the same name across multiple webflows. When I renamed the events so they were all different, no more problems.