Hi All,
I have a simple flow to render just wondering what is the correct approach.
I have a customer form to update. When i click save (before the actual save process) I need to ask the user input for confirmation with list of things that will be affected by this changes on page. This page has a form with YES or NO and changes displayed in text.
I am thinking i should be using subflow for this.
couple of things
1)Is sub flow the approach as it seems a bit complicated for simple YES /NO form submit
2)If subflow is the approach how to pass the customer reference to the subflow and pass the error back so that it will be displayed in the view in main flow
I have managed to get the subflow to be called from the mainflow.
But i am unable to have the customer reference in the subflow
and i am getting the error
Below i have copied the bits in my flow xml fileCode:org.springframework.webflow.engine.NoMatchingTransitionException: No transition was matched on the event(s) signaled by the [1] action(s) that executed in this action state 'saveEdit' of flow 'editProfileComplete'; transitions must be defined to handle action result outcomes -- possible flow configuration error? Note: the eventIds signaled were: 'array<String>['no']', while the supported set of transitional criteria for this action state is 'array<TransitionCriteria>[success, error]' at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:132) at org.springframework.webflow.engine.State.enter(State.java:194)
and the sub flow i haveCode:<view-state id="profileCard" view="editProfileCard" model="customer"> <transition on="saveProfileCard" to="saveProfileCardConfirmSubflow" validate="true"> <evaluate expression="customer.customizeUiValuesForDB()"/> <evaluate expression="customerAction.checkEmail(customer, messageContext)" /> </transition> <transition on="saveProfileCardOnTab" to="saveProfileCardConfirmOnTabSubflow" validate="true"> <evaluate expression="customer.customizeUiValuesForDB()"/> <evaluate expression="customerAction.checkEmail(customer, messageContext)" /> </transition> <transition on="cancel" to="cancel" validate="false"/> <transition on="profileSecurity" to="profileSecurity" validate="false"/> </view-state> <subflow-state id="saveProfileCardConfirmSubflow" subflow="editProfileComplete"> <input name="customer" value="flowScope.customer"/> <transition on="editComplete" to="close"/> <transition on="editError" to="profileCard"/> <transition on="editCancel" to="profileCard"/> </subflow-state> <subflow-state id="saveProfileCardConfirmOnTabSubflow" subflow="editProfileComplete"> <transition on="editComplete" to="profileSecurity"/> <transition on="editError" to="profileCard"/> <transition on="editCancel" to="profileCard"/> </subflow-state>ThanksCode:<view-state id="editProfileComplete" view="editProfileCompleted"> <transition on="saveProfileCardConfirm" to="saveEdit"></transition> <transition on="saveProfileCardConfirmCancel" to="editCancel"/> </view-state> <action-state id="saveEdit"> <evaluate expression="customerAction.editProfile(flowScope.customer,messageContext)"/> <transition on="success" to="editComplete"/> <transition on="error" to="editError"/> </action-state> <end-state id="editComplete" /> <end-state id="editError" /> <end-state id="editCancel" />
Thomas


Reply With Quote