Announcement Announcement Module
No announcement yet.
Entering sub flow in state other than start-state Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Entering sub flow in state other than start-state


    Is it possible to enter a subflow in a state other than the start state?

    I have a simple app that mimicks a shopping cart. The flow contains all of the crud options of a cart. The default state is set to add an item to the cart. When I want to view the cart, from a link outside the flow( start a new flow) can I enter the flow in a state other than the start-state?


  • #2
    Yes, it is possible.

    The functionality is available since the release PR3 using "state properties", just like this:
        <subflow-state id="..." flow="...">
           <attribute-mapper bean="..."/>
           <transition on="..." to="..."/>
           <property name="startState" value="xyz"/>


    • #3
      I would be careful about *why* you want to do this. Maybe it would be better to carve up your subflow into smaller workflows.

      Jumping in the middle of a subflow, whilst possible seems to go against the grain, and implies your subflow is not granular enough.

      It will also make your subflow much more difficult to manage because you can no longer make the assumption that all previous steps have been carried out.

      Be careful


      • #4
        Thanks everyone.

        As to my flow, this is how I have it setup.

        I have an originating flow that does the menu for the application. All subflows are derived from the menu flow.

        A basic master-detail drills down to the where a user can add and Item to the cart. The cart flow has only one view, but it is a form that updates/deletes/adds/displays items in the cart. I would also like to view the cart at any time(start a new flow if need be).

        Any observations would be greatly appreciated.



        • #5
          I wouldn't model navigation as a flow in itself *unless* there is some state you are capturing, or performing some logic *other than navigation*.

          I only have "atomic business processes" modelled as flows, navigation is done via standard MVC controllers.