0
votes

I have a problem with a webflow action-state. The structure I want is: if...else if....else if .....else

In my action state (see below),

  • I call getTestTypeName();
  • This method returns a string. There could be ten valid values although currently there are only two.
  • However, I may also get an invald String which is not an error but needs to be sent to a specified view-state.
  • How do I do this. Currently, I get an error

<action-state id="selectPostITSAction">
    <evaluate expression="testEntranceViewService.getTestTypeName(flowScope.vwUser)" />
	
        <transition on="ProgramChoiceTemplate" to="paymentGateway" />
		
	<transition on="CPCFeedbackTemplate" to="report" >
		<evaluate  expression="testEntranceViewService.reactivateTestOnHold(vwUser, flowRequestContext)"
				result="flowScope.vwUser" />
	</transition>
		
	<transition on="error" to="entry" />
		
</action-state>

"Prototype Test Template1467832258812" is an invalid option but I cannot handle with webflow. I get this error is

ExceptionNo transition was matched on the event(s) signaled by the [1] action(s) that executed in this action state 'selectPostITSAction' of flow 'flow-entry'; transitions must be defined to handle action result outcomes -- possible flow configuration error? Note: the eventIds signaled were: 'array['Prototype Test Template1467832258812']', while the supported set of transitional criteria for this action state is 'array[ProgramChoiceTemplate, CPCFeedbackTemplate, error]'org.springframework.webflow.engine.NoMatchingTransitionException

1

1 Answers

0
votes

Ok, got it The answer is to have a transition with no "on="

See below

<action-state id="selectPostITSAction">
    <evaluate expression="testEntranceViewService.getTestTypeName(flowScope.vwUser)" />
	
        <transition on="ProgramChoiceTemplate" to="paymentGateway" />
		
	<transition on="CPCFeedbackTemplate" to="report" >
		<evaluate  expression="testEntranceViewService.reactivateTestOnHold(vwUser, flowRequestContext)"
				result="flowScope.vwUser" />
	</transition>
  
  <transition  to="expectedError" >
		
	<transition on="error" to="entry" />
		
</action-state>