Skip to main content
Minor rewording, making title more general, and improving layout (i.a. moving the question above the big diagram, for increased visibility)
Source Link
Christophe
  • 82.2k
  • 11
  • 136
  • 202

In a sequence diagram, where does the "authenticated user" informationdo message parameters come from?

I'm drawing some sequence diagrams to give a graphical depiction of the use cases written during the requirements elicitation phase for my project. This is a simple one:

Vote Post Use Case

  • Precondition: the user must be logged and the post the user wants to vote exists
  • Postcondition: the post is voted by the user
  • 1: the user reaches the posts (includes "View Post" use case)
  • 2: the user clicks the dedicated button, according to the vote he intends to cast that can be either a negative or positive vote
  • 3: the system registers the vote cast by the user. If the post was already voted by the user, the system will override the old vote with the new one.
  • 4: the system throws a visual feedback to indicate that the operation has been performed successfully

Vote Post Use Case

  • Precondition: the user must be logged and the post the user wants to vote exists

  • Postcondition: the post is voted by the user

  • Steps:

    • 1: the user reaches the posts (includes "View Post" use case)
    • 2: the user clicks the dedicated button, according to the vote he intends to cast that can be either a negative or positive vote
    • 3: the system registers the vote cast by the user. If the post was already voted by the user, the system will override the old vote with the new one.
    • 4: the system throws a visual feedback to indicate that the operation has been performed successfully

Now here'sIn the sequence diagram with the analysis objects for this use cases:

enter image description here

This, there is a portion of my entity class diagram:

enter image description here

The question is: where does the user argument inmessage votePost(...user, post, vote) should come from?. Where does the user argument come from?

complex sequence diagram

Currently iI did it so that the boundary object PostPage calls votePost(user,post,vote), assuming that it has knowledge of the user entity associated to the actor partecipatingparticipating in the use case. Is it a correct approach, or should a third control object (called AuthenticationControl) be involved in order to get the current user?

If deemed useful, this is a portion of a class diagram showing the relevant entities :

class diagram with user, post and vote

In a sequence diagram, where does the "authenticated user" information come from?

I'm drawing some sequence diagrams to give a graphical depiction of the use cases written during the requirements elicitation phase for my project. This is a simple one:

Vote Post Use Case

  • Precondition: the user must be logged and the post the user wants to vote exists
  • Postcondition: the post is voted by the user
  • 1: the user reaches the posts (includes "View Post" use case)
  • 2: the user clicks the dedicated button, according to the vote he intends to cast that can be either a negative or positive vote
  • 3: the system registers the vote cast by the user. If the post was already voted by the user, the system will override the old vote with the new one.
  • 4: the system throws a visual feedback to indicate that the operation has been performed successfully

Now here's the sequence diagram with the analysis objects for this use cases:

enter image description here

This is a portion of my entity class diagram:

enter image description here

The question is: where does the user argument in votePost(...) should come from? Currently i did it so that the boundary object PostPage calls votePost(user,post,vote), assuming that it has knowledge of the user entity associated to the actor partecipating in the use case. Is it a correct approach, or should a third control object (called AuthenticationControl) be involved in order to get the current user?

In a sequence diagram, where do message parameters come from?

I'm drawing some sequence diagrams to give a graphical depiction of the use cases written during the requirements elicitation phase for my project. This is a simple one:

Vote Post Use Case

  • Precondition: the user must be logged and the post the user wants to vote exists

  • Postcondition: the post is voted by the user

  • Steps:

    • 1: the user reaches the posts (includes "View Post" use case)
    • 2: the user clicks the dedicated button, according to the vote he intends to cast that can be either a negative or positive vote
    • 3: the system registers the vote cast by the user. If the post was already voted by the user, the system will override the old vote with the new one.
    • 4: the system throws a visual feedback to indicate that the operation has been performed successfully

In the sequence diagram with the analysis objects for this use cases, there is a message votePost(user, post, vote). Where does the user argument come from?

complex sequence diagram

Currently I did it so that the boundary object PostPage calls votePost(user,post,vote), assuming that it has knowledge of the user entity associated to the actor participating in the use case. Is it a correct approach, or should a third control object (called AuthenticationControl) be involved in order to get the current user?

If deemed useful, this is a portion of a class diagram showing the relevant entities :

class diagram with user, post and vote

Source Link
cidra
  • 363
  • 4
  • 11

In a sequence diagram, where does the "authenticated user" information come from?

I'm drawing some sequence diagrams to give a graphical depiction of the use cases written during the requirements elicitation phase for my project. This is a simple one:

Vote Post Use Case

  • Precondition: the user must be logged and the post the user wants to vote exists
  • Postcondition: the post is voted by the user
  • 1: the user reaches the posts (includes "View Post" use case)
  • 2: the user clicks the dedicated button, according to the vote he intends to cast that can be either a negative or positive vote
  • 3: the system registers the vote cast by the user. If the post was already voted by the user, the system will override the old vote with the new one.
  • 4: the system throws a visual feedback to indicate that the operation has been performed successfully

Now here's the sequence diagram with the analysis objects for this use cases:

enter image description here

This is a portion of my entity class diagram:

enter image description here

The question is: where does the user argument in votePost(...) should come from? Currently i did it so that the boundary object PostPage calls votePost(user,post,vote), assuming that it has knowledge of the user entity associated to the actor partecipating in the use case. Is it a correct approach, or should a third control object (called AuthenticationControl) be involved in order to get the current user?