I'm new to UML but I'm tasked to draw some UML diagrams that describe some complex parts of our system.
One of these parts is the saving of data in the db, and the steps said data goes through before it can actually be saved.
These are roughly the steps involved:
- User wants to save
- App validates that all mandatory fields have values set
- If not valid, app shows a message. If valid, app sends a post request
- The controller maps the dto to the domain model object and passes it to the service layer
- Service layer validates the model according to business rules. If not valid, throws a validation exception
- If valid, model moves down to the data access layer, where EF is used to commit the changes to the db
- On trying to commit, EF might throw a validation exception (mapping) or database exception (bubbled up from the db itself)
- If commit succeeds, the model is passed to the controller which maps it back to its dto counterpart and displayed to the user
- If validation or database exception is thrown, these are displayed to the user
So far this is what I came up with:
Is this good enough to display the above steps or might there be improvements to the diagram?