users@javaserverfaces-spec-public.java.net

[jsr344-experts mirror] jsf2.2 feedback: give control back to calling flow

From: <nromanetti_at_jaxio.com>
Date: Wed, 2 Jan 2013 18:33:16 +0000 (GMT)

  Hello,

I am studying the latest JSF2.2 spec and the examples provided here:
https://svn.java.net/svn/mojarra~svn/trunk/test/web-profile/flow/

I could not find how a calling flow can take the control back once the
called flow returns.

I am used to Spring Web Flow... So I was expecting something like this.

In "flow b" definition:
================

    <j:flow-return id="taskFlowReturn1">
      <outbound-parameter>
          <name>resultFromFlowB</name>
          <value>The returned Value</value>
      </outbound-parameter>
    </j:flow-return>

<!-- note that I have not specified any navigation case as I want to
go back to the calling flow (the current spec does not allow this)
       From flow B I should not know who called flow-b, I just want to
give the control back... -->


In "flow a" definition:
================

            <j:flow-call id="callB">
                <j:faces-flow-reference>
                    <j:faces-flow-id>flow-b</j:faces-flow-id>
                </j:faces-flow-reference>
                <j:outbound-parameter>
                    <j:name>param1</j:name>
                    <j:value>param1Value</j:value>
                </j:outbound-parameter>
                <j:outbound-parameter>
                    <j:name>param2</j:name>
                    <j:value>param2Value</j:value>
                </j:outbound-parameter>

                <j:on-flow-return id="taskFlowReturn1">
                    <!-- Here I would know that flow-b returned using
the 'taskFlowReturn1' node. Knowning this I could
                        decide what to do... for example call a
method, select an appropriate node etc..
                    -->
                </j:on-flow-return>
            </j:flow-call>


I think it is an essential feature, the called flow should not have to
know who called it. And the caller should know what was the exit node
of the called flow.

I was relying extensively on such feature when using Spring Web Flow +
JSF.

Am I missing something?

Hope this helps.

Nicolas
--
twitter: @nromanetti