-
-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UNHANDLED default behaviour #1273
Comments
You can pass a variable when delegating, for example, that you can use
later from delegated component and override UNHANDLED behaviour.
Remember you can use anotations on handlers ***@***.***)
El dom., 10 abr. 2022 9:32, debocsh ***@***.***> escribió:
… I'm submitting a...
- Documentation issue or request
As mentioned in the docs, unhandled will always be prioritized
[image: image]
<https://user-images.githubusercontent.com/44774270/162606551-04464aef-b904-4b4d-9105-df67ed9c084c.png>
My question is what was the thought behind this ? I would have expected
that "Unhandled" will be fulfilled if the input has no matching intent.
Here, it seems that **Unhandled** has more weight than other handlers even
if the input matched intent in another components.
I ran into the same scenario that you quote in the docs
[image: image]
<https://user-images.githubusercontent.com/44774270/162607393-0a880296-53b1-4235-9174-c1643fc602b4.png>
Since it's the default behaviour, should we have also an option to cancel
it instead of using *prioritizedOverUnhandled* or *intentsToSkipUnhandled*
which needs to be added on each new intent ? Does it mean that once I have
one component with the Unhandled behaviour, I'll be stuck in this loop ?
I'll appreciate if you can provide more information/explanation about the
UNHANDLED handler role and why this is the *default* behaviour ?
- Jovo Framework version used: 4.1.3
- Operating System:
Linux 5.10 Debian
Node: 16.14.0
—
Reply to this email directly, view it on GitHub
<#1273>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMTE3JABCVWPZYB4FWTWZX3VEJ7Y7ANCNFSM5TAN3SNA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
If you do not have an UNHANDLED Handler in your Component in question, you achieve the behavior that you want i think. The routing can find Intent handlers in other components. So its basically your decision if you want to create this blocking loop for the user. But if you have delegated to the component and there is no UNHANDLED handler, the component does not resolve, (which makes me wonder what happens on the state stack in that case...) and the routing can only find Global handlers in the Top Level components i think. This is a bit odd, since we explicitly have to declare components that we want to delegate to as child components. |
@fbublitz, that's correct. Furthermore it is also possible to have a component twice on the stack. At the moment I have no problems handling these cases, in fact it works quite well if you play with the annotations. @jankoenig @aswetlow I think it would be really interesting to have the ability to keep only ONE component on the stack. Avoiding keeping duplicates, with some mechanism (maybe some annotation). Basically because in more complicated logics, component-level memory doesn't work, since the necessary data may be in another "instance" of the same component. |
@jrglg i checked the behavior again and it turned out i was a partly wrong in my but part with the delegation. So when component X delegates to component Y and the next request comes in with intent myIntent , which is not handled in Y . The routing can find myIntent in the X component first (and it does not have to be a global handler) before looking in other components. This is quite nice and more what you would expect. |
I'm submitting a...
As mentioned in the docs, unhandled will always be prioritized
My question is what was the thought behind this ? I would have expected that "Unhandled" will be fulfilled if the input has no matching intent. Here, it seems that **Unhandled** has more weight than other handlers even if the input matched intent in another components.
I ran into the same scenario that you quote in the docs
Since it's the default behaviour, should we have also an option to cancel it instead of using prioritizedOverUnhandled or intentsToSkipUnhandled which needs to be added on each new intent ? Does it mean that once I have one component with the Unhandled behaviour, I'll be stuck in this loop ?
I'll appreciate if you can provide more information/explanation about the UNHANDLED handler role and why this is the default behaviour ?
Linux 5.10 Debian
Node: 16.14.0
The text was updated successfully, but these errors were encountered: