Doing it in a listener makes it more pluggable. If you want to reuse your flow in a servlet and portlet environment, you can plug in the correct listener in each case and the flow itself remains protocol independent.
A listener could e.g. do it in the "requestSubmitted" hook:
Code:
public void requestSubmitted(RequestContext context) {
if (!context.getFlowContext().isActive()) return;
PortletRequest request = ((PortletEvent)context.getSourceEvent()).getRequest();
Map userInfo = (Map)request.getAttribute(PortletRequest.USER_INFO);
context.getFlowScope().setAttribute("userInfo", userInfo);
}
Erwin