[
https://issues.apache.org/jira/browse/MYFACES-4553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17681175#comment-17681175
]
Volodymyr Siedlecki commented on MYFACES-4553:
----------------------------------------------
I've pushed my draft PR, but I'm at a loss on how to properly address this
problem. I keep getting failures in one test suite or another.
[~tandraschko], is there any chance you could look into this? I saw you had
refactored the flow code a while ago and maybe you have a better idea of
addressing this error? It's one of the last TCK failures left.
Thanks!
> TCK spec/flows/intermediate failure: WELD-001303: No active contexts for
> scope type jakarta.faces.flow.FlowScoped
> -----------------------------------------------------------------------------------------------------------------
>
> Key: MYFACES-4553
> URL: https://issues.apache.org/jira/browse/MYFACES-4553
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 4.0.0-RC4
> Reporter: Volodymyr Siedlecki
> Priority: Major
> Attachments: faces_flows_intermediate_web.war
>
>
> {color:#0e101a}The WELD-001303 error occurs because we are still in a flow,
> which means that the contextual storage for the flows has yet to be created.
> {color}
>
> {color:#0e101a}As MyFaces starts to look at the nodes, it first checks the
> switch condition: {color}
>
> {color:#0e101a}Switch Case: {color}
> [{color:#4a6ee0}https://github.com/jakartaee/faces/blob/3fae98234692ec16545a6d27cf36fabaeb883f9b/tck/old-tck/source/src/web/jsf/spec/flows/intermediate/maintain-customer-record/maintain-customer-record-flow.xml#L39{color}]
>
> {color:#0e101a}MyFace Check: {color}
> [{color:#4a6ee0}https://github.com/apache/myfaces/blob/8956fd167f797a4e32511e268a6520715cb132a5/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java#L645{color}]
>
>
> {color:#0e101a}This is a problem because the context for flowScope still
> needs to be created, as mentioned above. This flow transition, which causes
> the scope to be activated, doesn't happen
> until[applyFlowTransition|https://github.com/apache/myfaces/blob/8956fd167f797a4e32511e268a6520715cb132a5/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java#L368]
> which is much later. {color}
>
> {color:#0e101a}My only idea is to force a transition call before we check the
> nodes, which causes myfaces unit test failures. {color}
>
> {color:#0e101a}I also believe this is an issue in previous versions -- we
> were lucky since the flowScope implicit object was evaluated to null (since
> no scope was active), and the "flowScope.customerId == null" check
> passed.{color}
>
> {color:#0e101a}Unit Test Code:{color}
> *{color:#0e101a}spec/flows/intermediate:{color}*
> {color:#0e101a}Test:
> {color}[{color:#4a6ee0}https://github.com/jakartaee/faces/blob/4.0.1/tck/old-tck/source/src/com/sun/ts/tests/jsf/spec/flows/intermediate/URLClient.java#L59{color}]
> {color:#0e101a}
> {color}[{color:#4a6ee0}https://github.com/jakartaee/faces/blob/4.0.1/tck/old-tck/source/src/com/sun/ts/tests/jsf/spec/flows/intermediate/URLClient.java#L91{color}]
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)