2 from flexbe_core
import EventState, Logger
7 Evaluates a condition function in order to return one of the specified outcomes. 8 This state can be used if the further control flow of the behavior depends on an advanced condition. 10 -- outcomes string[] A list containing all possible outcomes of this state 11 -- conditions function Implements the condition check and returns one of the available outcomes. 12 Has to expect one parameter which will be set to input_value. 14 ># input_value object Input to the condition function. 21 super(DecisionState, self).
__init__(outcomes=outcomes,
22 input_keys=[
'input_value'])
29 outcome = str(self.
_conditions(userdata.input_value))
30 except Exception
as e:
31 Logger.logwarn(
'Passed no function as predicate!\n%s' % str(e))
33 if outcome
is not None and outcome
in self._outcomes:
def __init__(self, outcomes, conditions)
def execute(self, userdata)