When creating a container that has no outcomes within a behavior, flexbe_app is generating a python code that gives an error next time the behavior is loaded. This occurs as the generated string is "OperatableStateMachine(outcomes=[''])" while it should be "OperatableStateMachine(outcomes=[])" .
Same problem does not occur with the getInputKeys() & getOutputKeys() as their length is checked before appending those strings. Same approach can also be used for the getOutcomes() method as an alternative to the solution given in this PR.
When creating a container that has no outcomes within a behavior, flexbe_app is generating a python code that gives an error next time the behavior is loaded. This occurs as the generated string is
"OperatableStateMachine(outcomes=[''])"
while it should be"OperatableStateMachine(outcomes=[])"
.An example behavior can be found in the attachment: codegenerationtest.zip
Same problem does not occur with the
getInputKeys()
&getOutputKeys()
as their length is checked before appending those strings. Same approach can also be used for thegetOutcomes()
method as an alternative to the solution given in this PR.