1

As a follow up topic of this question , I would like to use a external function call of a class ( bool MyClas:: myFunc()) in order to evaluate a guard in EA. Is it possible to do this? This topic showed me how to assign external actions and function calls to the Effect field. I would also like to do it for the Guard field

The reason behind is that I want to separate the logic regarding the state machine (" go from state A to state B ") from the logic regarding the transitions ( here I want to write manual code for each guard implementation).

Community
  • 1
  • 1
iquasar
  • 11
  • 2

1 Answers1

1

You can not evaluate a method's return value as guard. You can only set the behavior of a transition to some method since the guard itself is plain text:

enter image description here

You could use some naming convention, though.

Also you can consider using a trigger like this:

enter image description here

Still, this is not a result from a function.

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
  • Thanks for answer. I thought so, because I´have browsed the possibilities for about oen hour than I quit. I am now facing similar problem where I need to have the transitions evaluated in the order of defined priority. Such feature seems also to lack EA.. – iquasar Dec 17 '16 at 17:28
  • I have been thinking about it and maybe the edit shows an alternative. – qwerty_so Dec 17 '16 at 17:39