Announcement Announcement Module
Collapse
No announcement yet.
Problem with flow redirection in a portlet Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with flow redirection in a portlet

    Hi,

    What I would like to do is to have a flow with only one action state and many end states. The action state is a kind of routing state, and each end state redirects to another flow. It works perfectly in a servlet environment, but not in a portlet (I have tested it in Liferay Portal).
    Here is an idea of what I would like to do:
    Code:
    <flow start-state="route">
    	<action-state id="route">
    		<action bean="routeAction"></action>
    		<transition to="end" on="*"></transition>
    	</action-state>
    	<end-state id="end" view="flowRedirect:another-flow"/>
    </flow>
    Code:
    2006-07-18 08:47:10,268 DEBUG [org.springframework.webflow.Transition] - <Comple
    ted execution of [Transition@17dbcb6 matchingCriteria = *, executionCriteria = *
    , targetStateResolver = [targetStateId = 'end'], attributes = map[[empty]]], as
    a result the flow execution has ended>
    2006-07-18 08:47:10,268 ERROR [org.springframework.web.portlet.DispatcherPortlet
    ] - <Could not complete request>
    java.lang.IllegalArgumentException: Don't know how to handle response instructio
    n [ResponseInstruction@1f07251 flowExecutionKey = [null], viewSelection = [FlowR
    edirect@e1374c flowId = 'another-flow', input = map[[empty]]], flowExecutionContext
     = [Inactive FlowExecution:flow=[TravelPlanner-flow]]]
            at org.springframework.webflow.executor.mvc.PortletFlowController.toMode
    lAndView(PortletFlowController.java:302)
    ...
    The problem only occurs when there is an action state in the first flow. If I use a view state and I use a link in the jsp to transition to the end state, it works. (I don't know if I'm clear...)

    Is this a bug?

    Xand
    Last edited by XandFish; Jul 18th, 2006, 08:08 AM.

  • #2
    Are you using 1.0 RC3?

    Flow redirects weren't supported for awhile in a Portlet environment. Highly recommend 1.0 RC3 with Portlets, and 1.0 nightly if you need to pass the flow input parameters on redirect.

    Keith

    Comment


    • #3
      Thanks for your reply Keith.

      I'm using 1.0 RC3, maybe I should try 1.0 nightly (but here I don't need to pass input parameters).

      Flow redirection works if I use a view state first, but not with an action state.
      This works:
      Code:
      <flow start-state="view1">
      	<view-state id="view1" view="view1">
      		<transition to="end" on="*"></transition>
      	</view-state>
      	<end-state id="end" view="flowRedirect:another-flow"/>
      </flow>
      But this doesn't:
      Code:
      <flow start-state="route">
      	<action-state id="route">
      		<action bean="routeAction"></action>
      		<transition to="end" on="*"></transition>
      	</action-state>
      	<end-state id="end" view="flowRedirect:another-flow"/>
      </flow>
      In a Servlet environment, everything works fine.
      Any idea?

      Xand

      Comment


      • #4
        Help needed

        What is the problem? Am I missing something?

        Comment

        Working...
        X