0

I am modelling a system that requires a state-chart before implementation.

Given These Images: enter image description here enter image description here

Main Questions:

  1. Can I use the word "Elapsed Time" if I do not know how long it will take to finish the first state?
  2. Can I use event-based time instead of stating how long in seconds or mins? See the second Image for an example.
  3. Can I use equality operation instead of time? For example: After(Something = 123)
1

The transitions in a state-chart correspond to events that occur in the system. These events can be the result of

  • Things that happen outside the system. For example, the user pressing a particular button. These events are typically represented by a one or two word description of the action/intention
  • Timeouts within the system. For a timeout event, there should always be some indication after how much time the event will occur.
  • Do-activities finishing. If a state has an activity labeled as do/ and that activity finishes, then the state machine will take any transition that isn't labelled with an explicit event.

To answer the specific questions:

  1. No, you can't specify a time-based event without knowing how much time will pass before that event occurs. Not knowing how long it takes before a time-based event occurs makes it really hard to really understand all the possible sequences of events that the state machine can respond to.
  2. Using an event-based time makes no sense, because you can just use the event itself as a trigger for taking that transition in the state-chart.
  3. It is unconventional to use operators in the events of a state chart, but it can be used without making the state chart harder to understand. The more common situation is that transitions have both a triggering event and a condition (shown within square brackets after the event) that must be true to be able to take the transition.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.