FlexBE / flexbe_app

The classic user interface (editor + runtime control) for the FlexBE behavior engine. See the flexbe_webui for latest
BSD 3-Clause "New" or "Revised" License
48 stars 49 forks source link

Behavior SM generation does not quote string parameters #78

Open tropappar opened 2 years ago

tropappar commented 2 years ago

When having string parameters for states they are plain in the generated state machine python script. They should be put into quotation marks. For example, the when specifying the topic for the SubscriberState, python throws an error if I don't add quotes around the topic. I believe this shouldn't be the responsibility of the user.

dcconner commented 1 year ago

FlexBE is set up to allow the user to specify variables (e.g. from the dashboard) as well as strings.
If you input without quotes, it treats the input data as a request to use a variable.

If you want text you need to add the quotes yourself.

I appreciate the confusion this causes, and I'm open to suggestions on UI improvements to help differentiate the use of variables vs. strings.

As we allow for importing manual code blocks, I don't think it is as simple as assuming all single word strings are text unless variable is pre-defined in dashboard. I suppose we could assume that all multi-word inputs are intended to be strings, but may open up to more ambiguity in how things are treated.

We are working on some enhancements to the UI over the next 6 months, so I am open to suggestions.

Some potential ideas: