Skip to content

WW-5850 docs: design for declarative multi-step flows on ScopedModelDriven - #2130

Draft
lukaszlenart wants to merge 1 commit into
mainfrom
WW-5850-scoped-model-driven-flows
Draft

lukaszlenart wants to merge 1 commit into
mainfrom
WW-5850-scoped-model-driven-flows

Conversation

@lukaszlenart

Copy link
Copy Markdown
Member

Fixes 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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Nov 8, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant