2

I'm working with spring webflow and I need to generate a requestParameter in my first flow, put and pass it in the url to the next flows.

For example:

http://myHost/flow1?_flowExecutionKey=e1s1&personName=Anne  
http://myHost/flow2?_flowExecutionKey=e2s2&personName=Anne  
http://myHost/flow3?_flowExecutionKey=e3s3&personName=Anne  

Is it possible to use URL with parameters in Spring WebFLow? How can I put it in the url? How can I persist the value and pass it to the next flow?

Thanks!

psantamaria
  • 602
  • 6
  • 17

2 Answers2

2

Spring Webflow passes HTTP GET params via the the 'input' tag.

see: How to pass parameters to spring webflow

Community
  • 1
  • 1
Selwyn
  • 3,118
  • 1
  • 26
  • 33
0

You can use

<evaluate expression="myService.myFunction(requestParameters.id, flowDTO)"></evaluate>

This will call a myFunction from mySerivce, now in that function you can set the value in the flowDTO

flowDTO.setId(id);

To use this in the next flow you can access id field of the flow DTO in HTML page using:

"${flowDTO.id}"
Anurag Phadnis
  • 817
  • 7
  • 13