PDA

View Full Version : AttributeMapper vs FlowExecutionListener to map request...



curtney
Jun 27th, 2005, 06:22 PM
I notice that the flowlauncher sample application maps request data to the flow scope using both AttributeMapper and FlowExecutionListener. Under what circumstances would one approach be better than the other?

I am currently using a FlowExectionListener to map request parameters/attributes from my parent flow to my child flows (subflows); all request attributes are put in the flow scope.

However, I am using an AttributeMapper to map back request attributes from my subflow to my parent flow. In that respect, it seems that AttributeMapper may be the best way to go since, you can map attribute back and forth?

Curtney

klr8
Jul 20th, 2005, 09:33 AM
I would say: prefer attriburte mappers to map info between parent and sub flows. You can use a listener to map data into a new flow from the incoming request, e.g. to keep your flow free of HTTP request dependencies.

Erwin