May 27th, 2012, 01:49 PM
Start new flow, populate model with query params
I am using Using SWF 2.3.
I have a "forgot password" flow (/password.do) that asks the user for their email address. These forms and flow populate the model object (password). The backend sends an email with the password url (/password.do), the email address and a hash (/password.do?hash=foo&email=bar). I want these params to be picked up by SWF and populate the model object (password).
However, when I use the url a new SWF execution is started and my params are lost. If the execution already exists, and I pass in execution=e2s1 (or something similar), then I have access to the email address and hash. However, I can not depend on an existing flow instance (execution) because sessions may timeout, etc.
I've tried passing in _eventId and _flowId (both with no success). I've also tried looking at the booking-mvc example to no avail.
I've seen examples where you access the request params directly from the request object, but this seems unnecessary. I would expect SWF has a way to populate the model object (password) automatically.
I would greatly appreciate an example SWF .xml and url to access the flow.
Thanks in advance.