I want to model the following behaviour: When an administrator creates a blogpost, then it is something different compared to when an user creates a blogpost, as for example the moderator is involved in the create blogpost use case, as he verifies the blog post. However, when the administrator doesn't have his role as administrator, his blog posts also needs to be verified by a moderator, as he himself inherits the behaviour of the user.
This example below may only make sense if an administrator can remove his own role, when he doesn't want to use the system as administrator.
I hope this makes sense.
You should not have twice the same use-case name to represent different behaviors in the same model. This is extremely confusing.
By the way, the UML specification do not defined what exactly is meant when multiple actors are related to the same use-case: it can be multiple actors each involved separately in different occurences of the use-case, but it can be as well be that all actors must be involved each time.
As a consequence, I'd suggest to keep a single Create blogpost
use-case related to User
and Moderator
. You can still keep the Administrator
being a specialization of User
and use this specialization in the detailed description of the use-cases behaviors.
If you think that this does not express sufficiently accurately your situation, you have two possibilities.
Create blogpost
use-case associated only to the more general User
, and «extend»
it with an additional Moderate blogpost
use-case associated only with a Moderator
. THis makes sense, because the moderation use-case is a goal of its own for a moderator, that it can be reused (e.g. could also be an extension to Update blogpost
).Create unmoderated blogpost
being a specialization of a more general Create blogpost
. However this requires some more precision about redefinitions, and is in my view less expressive that #1.The first case would look like:
A Moderator
is in principle also a User
. By curiosity: what happens if a Moderator creates a blogpost: can he/she self modereate the own content? Or musta four eyes principle make sure that a different moderetor moderates this post ;-)