Announcement Announcement Module
Collapse
No announcement yet.
flowRedirect used in endstate of a subflow Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • flowRedirect used in endstate of a subflow

    Hi,

    I need to redirect to a new flow from a subflow, using this syntax in the subFlow :

    <end-state id="dossierrecapbeneficiaire"
    view="flowRedirect:consulterundossierbeneficiaire-flow?reference=${flowScope.objetformulaire.lePensi onne.representantLegal.beneficiaire.reference}">

    </end-state>


    It doesn't work and I get an exception which says there is no transition for "dossierrecapbeneficiaire" in the subflow state of the parent flow.

    Is there a way to end both subflow and parent flow from the endstate of a subFlow, redirecting to a new created flow ?

    Thanks
    Wenceslas

  • #2
    Try leaving the end-state in the subflow without the redirect and instead do the redirect in the calling flow

    SubFlow:
    Code:
    <end-state id="dossierrecapbeneficiaire"/>
    Calling Flow:
    Code:
    <subflow-state id="callSubFlow" subflow="thesubflowname">
      <transition on="dossierrecapbeneficiaire" to="dossierrecapbeneficiaire"/>
    </subflow>
    
    <end-state id="dossierrecapbeneficiaire" view="flowRedirect:consulterundossierbeneficiaire-flow?reference=${flowScope.objetformulaire.lePensi onne.representantLegal.beneficiaire.reference}">
    </end-state>

    Comment


    • #3
      Yes, philwebb has the right idea.

      The "view" attribute of an end-state is ignored if it is within a subflow. Only in the top-level flow will an end-state's "view" attribute get evaluated.

      Comment


      • #4
        Use of view-state instead of end-state

        Thanks for your help, but I don't want to put in the root state any state related to a child flow.

        I use a view-state instead of a end-state to do the redirection (It is not a perfect solution because the flow is not terminated and leave in the repository until the user session has reached the maximum of flow it can keep alive).


        Wenceslas

        Comment


        • #5
          I think that you can't use an end-state with redirect from a subflow. Syntax let do it, but doesn't work.
          As you say, using a view-state, the subFlow is not terminated and parent flow too. A solution could be return to the parent flow, using conversationScope to send a param from subflow to parent flow. Then, parent flow, process this param and transits to end-state with the flowRedirect instruction.

          Comment

          Working...
          X