0

In this video a part of an UML state chart can be seen :

enter image description here

However, the "provide funds" state is an action. How does that make sense ?

Is it possible for a state to be an action (verb) ?

Should the "provide funds" action not be rather a transition ?

Would something like this below not make more sense ?

enter image description here

jhegedus
  • 20,244
  • 16
  • 99
  • 167

2 Answers2

2

This is just poor naming. It should be called "Providing Funds". That would make clear what happens in that state and the fact that it is a state.

Jim L.
  • 6,177
  • 3
  • 21
  • 47
1

Provide Funds in this case is also a state with the same name as an action. So they are not identical. They just have the same name. Sometimes it's hard to avoid this situation. From the modeling perspective I would say this state is simply superfluous. You could do self-transitions from Funds Available while funds are > 0 and simply exit when fund gets zero.

P.S. Oh, I see your last picture is exactly what I said :-)

  1. So basically the [funds avail >$0] transition gets automatically triggered after the Provide Funds action completes?

    Yes and no. [funds avail >$0] is a guard. The trigger is request fund. This transition will only be performed if the guard won't block (so if money is available).

    So this is some kind of a "transient" state? So to say.

  2. Also, do I get it right that the state while providing funds is also called Provide Funds (not just the the action)? So a better name for the state would be : the state of the machine while providing funds ?

    Exactly.

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
  • Thanks, 1) So basically the `[funds avail >$0]` transition gets automatically triggered after the `Provide Funds` **action** completes ? So this is some kind of a "transient" state ? 2) Also, do I get it right that the state while providing funds is also called `Provide Funds` (not just the the action ) ? So a better name for the state would be : `the state of the machine *while* providing funds` ? – jhegedus Jul 14 '17 at 19:56