Uploaded image for project: 'Spring Web Flow'
  1. Spring Web Flow
  2. SWF-1699

SWF 1.0 to 2.4 - upgrade - missing enabling capability of single snapshat

    XMLWordPrintable

    Details

      Description

      Problem:
      SWF 2.4 does not have option to set/override DefaultFlowExecutionRepository.alwaysGenerateNewNextKey in webflow definitions.

      we need to have alwaysGenerateNewNextKey to false to fix our problem.

      Team, we are upgrading spring webflow from 1.x to 2.4.

      In 1.x, we created flowExecutor like below, one of the options in creation here is setting "repositoryType" to "SINGLEKEY" which will disable generating new next key for each flow.

      "SimpleFlowExecutionRepository#setAlwaysGenerateNewNextKey(boolean)"

      ~<bean id="flowExecutor"
      		class="org.springframework.webflow.config.FlowExecutorFactoryBean">
      		<property name="definitionLocator" ref="flowRegistry" />
      		<property name="executionAttributes">
      			<map>
      				<entry key="alwaysRedirectOnPause">
      					<value type="java.lang.Boolean">true</value>
      				</entry>
      			</map>
      		</property>
      		<property name="repositoryType" value="SINGLEKEY" /> Changed from simple to singleKey to disable Back button
      		<property name="maxContinuations" value="1" />
      		<property name="maxConversations" value="1" />
      	</bean~
      

      We need to have the similar behavior in SWF 2.4 as well,

      As per the documentation, we created flow executor through webflow config elements like below,

      <webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry">
      		<webflow:flow-execution-repository max-executions="1" max-execution-snapshots="0"/>
      		<webflow:flow-execution-attributes>
      			<webflow:always-redirect-on-pause value="true"></webflow:always-redirect-on-pause>
      		</webflow:flow-execution-attributes>
      	</webflow:flow-executor>
      

      But webflow:flow-execution-repository element doesn't have an attribute to update the field "alwaysGenerateNewNextKey".

      Please share if there is a workaround for this case or are we doing anything wrong.

        Attachments

          Activity

            People

            Assignee:
            rstoya05-aop Rossen Stoyanchev
            Reporter:
            vijayt27 Vijay Thangavelu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: