FlowScoped is a CDI scope that causes the runtime to consider classes
with this annotation to be in the scope of the specified Flow
. The implementation must provide an
implementation of jakarta.enterprise.inject.spi.Extension
that implements the semantics such that beans with
this annotation are created lazily, when referenced, after the user enters
into the specified Flow
, and made available for garbage collection
when the user exits the specified Flow
. See FlowHandler.transition(jakarta.faces.context.FacesContext, jakarta.faces.flow.Flow, jakarta.faces.flow.Flow, jakarta.faces.flow.FlowCallNode, java.lang.String)
for the specification of flow
entry and exit.
When replacing (rather than decorating) the flow implementation with a custom FlowHandler
implementation, it
is necessary to also replace the CDI extension that implements the specified behavior regarding
FlowScoped
beans.
Events with qualifiers @Initialized
, @BeforeDestroyed
, and @Destroyed
as defined by the CDI specification must fire for this built-in scope.
- Since:
- 2.2
-
Required Element Summary
Modifier and TypeRequired ElementDescriptionMust be equivalent to theFlow.getId()
of a defined flow for this application. -
Optional Element Summary
Modifier and TypeOptional ElementDescription
-
Element Details
-
value
String valueMust be equivalent to the
Flow.getId()
of a defined flow for this application.- Returns:
- the id of this flow
- Since:
- 2.2
-
definingDocumentId
-