views:

33

answers:

1

Hello,

I have a cancel button which should bring the user back to the start page. The Cancel button is in a flow createXYZ.xml the start page is a view-state in the flow start.xml how can I link from one flow to another.

Start:

<view-state id="start" view="start">
</view-state>       

Cancel Button:

<view-state id="createXYZ" view="createXYZ">
    <transition on="cancel" to=" ? ">
    </transition>
</view-state>
A: 

A subflow state is useful when you have a situation where you want to continue your main flow, but want some added functionality. You would invoke the subflow, do some work, then exit out and return back to the original flow.

I am not sure if that is what you are trying to do. If you are simply trying to end the flow and start a new flow you can do soemthing like

<view-state id="createXYZ" view="createXYZ">
   <transition on="cancel" to="endFlow"></transition>
</view-state>
<end-state id="endFlow" view="externalRedirect:../myOtherFlow.action"/>

This will not only end the flow you were just working on (which is very useful) but also start the new flow. In this case the new flow is called myOtherFlow

John V.
But I want to jump in a view-state of the myOtherFlow which is not the start state of the flow.
SCBoy
okay for the cancel functionality it has worked. Just had to tip the name of the view in it:<end-state id="endFlow" view="externalRedirect:start"/>I am just interessted if there is a way to jump into a state of another flow (no sub-flow). Or is that impossible?
SCBoy
There really isnt another way to invoke another view state without it being a subflow.
John V.