I am modelling a system that requires a state-chart before implementation.Given These Images:Main Questions:Can I use the word Elapsed Time if I do not know how long it will take to finish the first state?Can I use event-based time instead of stating how long in seconds or mins? See the second Image for an example.Can I use equality operation instead of time? For example: After(Something = 123)
Do I have to state the value of elapsed time in state-charts?
design;modeling;diagrams;finite state machine
The transitions in a state-chart correspond to events that occur in the system. These events can be the result ofThings 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/intentionTimeouts 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: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.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.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.