Matt,
You can certainly test against arbitrary attributes in requestScope or flowScope, for example:
Request Scope:
Code:
<transition on="${#result == 'success' and requestScope.prev != null}" to="nameForm"/>
Flow Scope:
Code:
<transition on="${#result == 'success' and flowScope.prev != null}" to="nameForm"/>
However, neither of those will work for the originating http request's parameters, as those parameters are associated with the originating Event of the current flow RequestContext.
One option is to have a mapper action that maps a 'on submit' event parameter to a request-scope attribute. That's pretty easy using a EventParameterMapperAction--Phonebook does this already.
However, that seems a bit clunky here. There is a better solution that should work. As I mentioned, the RequestContext (what the OgnlTransitionCriteria has access to) exposes a property called "originatingEvent". This, in a HttpServlet environment, is a HttpServletEvent that wraps the current HttpServletRequest. So, through it, you should be able to access any request parameter.
Give this a try:
Code:
<transition on="${#result == 'success' and originatingEvent.parameters.prev != null}" to="nameForm"/>
We might in the future consider having Event implement Map, similiar to what Scope does now, so parameters can be accessed directly (e.g originatingEvent.prev). But the notation above is pretty good I think.