Hi,

A small correction to my previous mail: the flow support won't be added to
ScopedModelDriven itself. It will be a new, separate "flow" interceptor, so
the existing ScopedModelDriven interceptor and interface stay exactly as
they are and nobody using them today is affected.

Everything else stays as described: start/step/end roles declared on each
action, an optional resume of the existing model at the start, a redirect
to the start when a flow isn't running, and the same 7.6.0 / 7.7.0 / 8.0.0
timeline for the scope interceptor.

The ticket and the design are updated.

Cheers
Łukasz

On Sun, Nov 08, 2026 11:00 AM, Lukasz Lenart <[email protected]>
wrote:

> Hi,
>
> Thanks Prasanth for the reply, and thanks to everyone who read the thread.
>
> Multi-page forms are exactly the case the scope interceptor was meant for,
> so we won't deprecate it without something that covers the same job. The
> plan is to give ScopedModelDriven an explicit lifecycle for multi-step
> flows:
>
> - each action declares which flow it belongs to and its role: start, step
> or end
> - the start action begins the flow with a new model, or picks up the
> existing one if the action chooses to
> - step actions work on the same model stored in the session
> - an end action removes the model once the flow is finished successfully
> (a failed validation on the last page keeps the data)
> - requesting a step without starting the flow redirects to the start action
>
> The timeline we have in mind:
>
> - 7.6.0 - the new flow support ships, the scope interceptor stays unchanged
> - 7.7.0 - the scope interceptor gets deprecated, with a migration guide
> - 8.0.0 - the scope interceptor is removed
>
> The ticket is WW-5850:
> https://issues.apache.org/jira/browse/WW-5850
>
> and the design is open for comments in this pull request:
> https://github.com/apache/struts/pull/2130
>
> If you have a multi-page flow that would not fit this model, please let us
> know here or on the ticket.
>
> Cheers
> Łukasz
>
> On Fri, Oct 09, 2026 04:12 PM, Prasanth Pasala <[email protected]>
> wrote:
>
>> Hi Lukasz,
>>
>> We use the scope interceptor for actions that display more than one form,
>> as you have mentioned in the below email.
>> This would allow the action to retain the values the user has provided
>> over multiple pages.
>>
>> We have not used ScopedModelDriven interceptor, but something to look
>> into.
>>
>> Thanks,
>> Prasanth
>>
>> On 10/9/26 12:12 AM, Łukasz Lenart wrote:
>> > Hi,
>> >
>> > We are considering deprecating the "scope" interceptor
>> > (org.apache.struts2.interceptor.ScopeInterceptor) and removing it in a
>> > future major release.
>> > It is the interceptor you add with <interceptor-ref name="scope"/>. It
>> > copies a listed set of action properties to and from the session or
>> > application scope, and is meant for wizard-like flows.
>> > It came over largely unchanged from WebWork 2.2 and has seen little
>> > maintenance since. It is not part of any default stack. There are
>> > alternatives for the same job:
>> > - ScopedModelDriven (the "scopedModelDriven" interceptor), which keeps
>> the
>> > action's model in the session across requests
>> > - a session-scoped bean, or reading and writing session values through
>> > SessionAware
>> >
>> > Before we decide, we would like to know whether anyone still relies on
>> it.
>> > If you use it, please reply and tell us what you use it for, especially
>> if
>> > the alternatives above would not work for you.
>> >
>> > Thanks in advance!
>> > Lukasz
>> >
>>
>

Reply via email to