Creating the FSA meta-model: Transitions


Now we need to setup the cardinalities of our modeling environment. That is, specify the number of states that can be connected to transitions and vice-versa. This can become confusing, so let me explain clearly how the "connections" system works. Every Entity or Relationship can be a source or a destination. For example, multiple states could be connected to one transition and that transition could be connected to another state:  

 

In that case, the transition must be a destination for at least 3 states and a source for at least one state. (However, we do not want that type of model in our formalism since they are not allowed in standard FSA). The states must be a source and a destination for at least 1 state. Let's try to set the cardinalities for our formalism. Go in the "cardinality" section of the "state" entity properties screen and edit the "source":  

 

The "source" is the current entity. So, as a *source* each state can connect itself to any number of transitions (0...N, N being any number). This correspond to the logic of the FSA, where many transitions can originate from a state. Now, if you edit the destination part:  

 

The "destination" is the current entity. So, each state can be a *destination* for any numbers of transitions (0...N, N being any number). This correspond to the logic of the FSA, where a state can be the endpoint of many transitions. Now if we set the transition cardinalities (source/destination are the same):  

 

 

What does 1..1 means? It specifies that, for each transition, one and only one state can be connected to it or from it. Now, we only need to complete the appearance of the state and we will have finished our modeling environment!