Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.0-RC4
-
None
-
None
Description
The WELD-001303 error occurs because we are not yet in a flow officially (but will enter one). This means that the contextual storage for the flow has yet to be created. This cause the weld error as the FlowScopeContext is not yet active – see isActive call.
So flow scope is not active, but MyFaces starts to look at the nodes, it first checks the switch condition which references the flowScope implicit object:
Application Switch Case:
MyFace Switch Case Check:
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 (which is much later).
My only idea is to force a transition call before we check the nodes, which causes myfaces unit test failures.
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.
Unit Test Code:
spec/flows/intermediate: