Announcement Announcement Module
Collapse
No announcement yet.
Multiple actions Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple actions

    One very common aspect of a webflow is to define one or more actions, which retrieve datasets, in combination with a view state, which displays the data. If i have to invoke more than one action I have two options:
    1. I can define define more than one action states and stick the action states together. (this can get very confusing, since every action state has to have a unique name)
    2. as far as I see CompositeAction is used to model entry and exit actions, which can contain more than one action. (and I have to add another action to define a valid state)

    Are there any plans to allow multple actions inside am action state without the workaround of entry/exit actions? (or one action, which acts as a container for other actions, like CompositeAction)

    BTW: Another interesting feature would be to have these actions executed in parallel, since in this case they are not related.

    Regards,
    Harald Dietrich

  • #2
    That's actually already possible. Look at the webflow DTD:

    <!ELEMENT action-state ( property*, entry?, action+, transition+, exit? )>
    As you can see, it says 'action+', so an action state contains one or more actions. So e.g. you could have the following:

    Code:
    <action-state id="...">
       <action bean="..." name="first"/>
       <action bean="..." name="second"/>
       <transition on="first.error" to="..."/>
       <transition on="second.success" to="..."/>
       <transition on="second.error" to="..."/>
    </action-state>
    Note how the above code fragment is using 'named actions' to ignore the "success" event of the "first" action (e.g. there is no transition for it). This is needed because otherwise that transition would be selected when the first action signals the success event, interrupting action execution.

    We're not planning on doing a parallel action, which executes it's nested actions in parallel (e.g. in seperate threads), but it would be a cool thing try.

    Erwin

    Comment

    Working...
    X