Search code examples
grailsspring-webflow

Grails web flow previous state url


is there a simple way to get previous state's URL (or flowExecutionKey is sufficient) in Grails web flow? I can get current flowExecutionKey from request['flowExecutionKey'].

Or alternatively is there a way to say that you want to go to the previous state in flow (to unwind your path in graph).

And I don't want to use the standard mechanism:

state1 {
   on("back").to "state1"
}

Because this way I'll get to the further state instead (the execution key would increment). Grails version 1.1.2


Solution

  • I solved it with history.back(1) in view, although I was avoiding this solution at first.

    But I still wonder whether there is a direct way how to force flow to go one step back and discard current state.