[ 
https://issues.apache.org/jira/browse/WW-5850?focusedWorklogId=1053383&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1053383
 ]

ASF GitHub Bot logged work on WW-5850:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 08/Nov/26 09:59
            Start Date: 08/Nov/26 09:59
    Worklog Time Spent: 10m 
      Work Description: lukaszlenart opened a new pull request, #2130:
URL: https://github.com/apache/struts/pull/2130

   Fixes [WW-5850](https://issues.apache.org/jira/browse/WW-5850)
   
   Design document only, for discussion before implementation: 
`docs/superpowers/specs/2026-11-08-WW-5850-scoped-model-driven-flows-design.md`.
   
   ## Summary
   
   Struts has two mechanisms for keeping form state across several requests: 
the `scope` interceptor and `scopedModelDriven`. This design gives 
`scopedModelDriven` an explicit lifecycle so it becomes a full alternative to 
`scope` for multi-page forms:
   
   - A **flow** is identified by namespace + name. Each action declares its 
flow and role (`start` / `step` / `end`) in `struts.xml` or with a Convention 
annotation.
   - `start` creates a new model by default; an action can opt in to resuming 
an existing one per request via an `*Aware` interface that receives the 
existing model.
   - A `step` or `end` with no running flow redirects to the flow's `start`.
   - An `end` finishes the flow only when the action ran and returned neither 
`input` nor `error`, so a failed final validation keeps the user's data.
   - Flow definitions are validated at startup (one start, at least one end, 
same model type, `scopedModelDriven` present in the stack).
   
   ## Rollout
   
   - 7.6.0 — this ticket: flows ship, `ScopeInterceptor` unchanged.
   - 7.7.0 — deprecate `ScopeInterceptor` with a migration note (separate 
ticket).
   - 8.0.0 — remove `ScopeInterceptor` (separate ticket).
   
   Background: the "Is anyone using the scope interceptor?" thread on user@ 
(2026-10-09).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   




Issue Time Tracking
-------------------

            Worklog Id:     (was: 1053383)
    Remaining Estimate: 0h
            Time Spent: 10m

> Add declarative multi-step flows to ScopedModelDriven
> -----------------------------------------------------
>
>                 Key: WW-5850
>                 URL: https://issues.apache.org/jira/browse/WW-5850
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Core, Core Interceptors, Plugin - Convention
>            Reporter: Lukasz Lenart
>            Assignee: Lukasz Lenart
>            Priority: Major
>             Fix For: 7.6.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Struts has two mechanisms for keeping form state across several requests 
> (wizard-like flows): the {{scope}} interceptor ({{ScopeInterceptor}}) and the 
> {{scopedModelDriven}} interceptor. This ticket gives {{scopedModelDriven}} an 
> explicit flow lifecycle so it becomes a full alternative to {{scope}}.
> User poll on the mailing list: "Is anyone using the scope interceptor?" 
> (user@, 2026-10-09). One reply, describing a multi-page form flow, which this 
> feature covers.
> h2. Proposal
> A flow is a named set of actions sharing one model stored in the session. 
> Each action declares the flow name and its role, in {{struts.xml}} or with a 
> Convention annotation:
> * *start* — exactly one per flow. Begins the flow. Whether it creates a new 
> model or picks up an existing one is configurable by the developer.
> * *step* — any number. Requires a running flow and works on the stored model.
> * *end* — any number. Requires a running flow; the model is removed from the 
> session after the action runs.
> Behaviour:
> * A step or end action requested with no running flow redirects to the flow's 
> start action.
> * Multiple flows can be defined in one configuration, distinguished by name.
> * One running flow per user per flow name.
> * Flow definitions are validated at startup (one start, at least one end, 
> consistent model type).
> h2. Planned sequence for ScopeInterceptor
> * 7.6.0 — this ticket: the alternative ships. {{ScopeInterceptor}} is 
> unchanged.
> * 7.7.0 — deprecate {{ScopeInterceptor}}, with a migration note to 
> declarative flows.
> * 8.0.0 — remove {{ScopeInterceptor}}.
> h2. Out of scope
> * Deprecating or changing {{ScopeInterceptor}}.
> * Visualising flows (Config Browser plugin, IntelliJ IDEA plugin) — possible 
> follow-up.
> * Independent concurrent runs of the same flow in one session (e.g. two 
> browser tabs).
> * Application-scoped state.
> A design document will be attached via the pull request.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to