BSA – UML State Diagrams

I wanted to draw some simple, high level UML State diagrams using PLD and while it worked I also used far more time than I expected. This was in many ways a big failure with regards to the objectives I have set, so I need to do some re-thinking.

In this first diagram I use Connection Points (CP) to draw lines. The issue is that links in this case only goes between CP’s and from left to right. As the CP positions are automated it becomes close to impossible to have straight, nice lines and as the diagrams grows this becomes messy and we start using more and more time on making diagrams look pretty. More important is that real diagrams is very limited if you draw only top-down or left-right + I ended up removing the automated event/method names as well. All in all I managed to draw the diagram I wanted, but I concluded that I had achieved the opposite of what I wanted – I ended up using a lot of time fiddling with lines – lesson learned!

This next diagram is the same, but here I switched to Free drawing to avoid the CP’s. In this case the diagram is cleaner, I can easily make lines straight  and notice the added lines that goes back or use other edges. A State Diagram show flow of events/info between objects and visualizing the below using CP’s that only was Top-Left or Left-Right simply did not work well,

So, how do we move forward? Some of you will recall that we started with simple lines and changed to using CP’s. The arguments was that CP’s visualized what events that was available and also visualized mandatory events etc (mandatory must be implemented) – so yes going back to pure lines will add some work as we need another method to specify events and methods.

The name labes are the easy ones – I currently let CP’s control displaying of labels (event names or method names), but I will move that to the lines itself anyway. It is also possible that I can allow user to move CP’s themselves or simple not show the CP’s once they are connected. Moving a CP is a bit difficult as current mouse click is connect, but lets see. On the other hard I also want to be able to connect to the same method on several edges without having CP positions forcing my hand. What I will miss is the functionality where you just use your mouse, click on a CP and connect to another CP as having to select the Flow tool is extra work, but now I am just being pouty 🙁

As for getting things right – we have the compiler that can pick up if flow lines are properly terminated or not, but the nice think is that we can chose to not care about thos details as we design as it is an implementation issue.

Just for the record – PLD cover UML State Diagrams, SDL (Specification and Description Language) as well as basic flow charts. PLD is a merge of those modelling techniques. Your diagrams can be what you want them to be + design is an important task of SW engineering, so having nice, precentable diagrams are a must.

Another issue I need to dig into is flow of events vs flow of data. I had a need to differ the two for illustrative purposes. And I also need an option to use a single line for multiple events on high level diagrams – this can be a special, thicker line where the user can drill down to see details. All in all – this had to be expected – adjustments as we start using the tool.

Categories: BSA

Leave a Reply