Skip to content
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

Remove the requirement for behavior default value override #38

Closed
tcassell94 opened this issue Sep 26, 2017 · 3 comments
Closed

Remove the requirement for behavior default value override #38

tcassell94 opened this issue Sep 26, 2017 · 3 comments
Assignees

Comments

@tcassell94
Copy link

tcassell94 commented Sep 26, 2017

Let's say I have a behavior named BehA, which has a state within it that requires a userdata input key named KeyA. The default value for KeyA is stored in the State Machine Userdata box of BehA.

Sometimes I want to run BehA standalone, and sometimes I want to run it within another behavior. Because of the second desire, BehA has KeyA declared as an 'Input Key' in the State Machine Interface box. Then, in my other behavior named BehB, that uses BehA, I have to again set a default value for KeyA in the State Machine Userdata box. This value overrides the value set in the state machine definition for BehA when running BehB (good).

This is fine for when I actually want to override a userdata input key value. But lets say the BehA has 10 userdata input keys, and sometimes I want to override 1 key but other times I want to override all 10. Declaring all 10 keys of BehA as behavior input keys is fine. However, I think the requirement to override their default values in the State Machine Userdata of BehB is both unnecessary and annoying.

I think a much better approach would be that if a key is declared as a behavior input key, but has no value passed to it from 'above' then it should use its default value according to its own behavior.

Apart from this one small issue I have to say that FlexBE is a great piece of kit and is working well for us!

@pschillinger
Copy link
Member

Thank you for the feedback! I agree that this requirement gets a bit annoying for more input keys.

The reason that is like this is primarily the fact that an embedded behavior is, during execution, nothing else than an ordinary state machine with the content from the respective behavior. Thus, the same requirements apply. But on the other hand, all information would be there to handle this requirement internally.

I will look into this and let you know.

@pschillinger
Copy link
Member

Behavior input keys can now be checked as "default" to indicate that the default value should be used instead of overwriting the value.

Let me know if this properly addresses what you had in mind. Please note that I pushed the changes only for the new FlexBE/flexbe_app (and there on the develop branch). The version number should say 2.0.4 or higher.

@tcassell94
Copy link
Author

tcassell94 commented Oct 11, 2017

Thanks @pschillinger. I have implemented your updated app and can say I'm very happy with the result. FlexBE going well for us at the moment. Feel free to close issue. Cheers

fmessmer added a commit to fmessmer/flexbe_behavior_engine that referenced this issue May 23, 2024
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

No branches or pull requests

2 participants