I m working on a website which consists of a home page, and several flows that are started from there. Now my "home" site is a view state in my "main" flow. Which already implicates my issue, i am starting the website in a flow. which is good, i think. now that main flow inherits from a abstractSuperParent flow, that defines some global transitions to "static pages" (that are designed as view states as well) and exception handlers, conversationScope variables and so on. Also in this abstractSuperParent is a transition that says
. In the main flow, that exitFlow State is actually my "home" state and the first view-state to be displayed. All my other flows inherit from a abstractParent flow, which itself inherits from abstractSuperParent as well and defines
<transition on="exitFlow" to="exitFlow" />
<end-state id="exitFlow" />
In my layout i have a button with my websites icon which invokes the exitFlow action. Now all my subflows (in subflows, in subflows....) will terminate to the exitFlow up to the main-flow where everything began. That all works out neatly. Almost. Because it only works when my homepage is started in the main-flow (i have a redirect to that flow in my index.html). But i do also have direct links to flows such as userActivation, entryDetails and so on that are mailed to my users and should enable them to access certain content (i.e. flows) directly. But when my "home" button is pressed in such a flow, it will terminate and has no "parent" flow and i do get an exception.
Now to my question (sorry for such a detailed and confusing intro). Is my design any good? is it a good idea to have something like my main-flow with the home-state and so on or would you start with a plain MVC controller? I quite like the approach that everything is run in a flow, although that means that, in my case my main flow, will never be terminated. would you rather let all flows inherit from my mainflow (which would mean that the subflows would never terminate). How do you guys handle these problems?
Now I know that there are many possible solutions for that and i don't expect you to do my work. i m just looking for some inspiration and maybe new ways of solving this, that i m not aware of....
i appreciate any comments!