Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class/Sequence diagram questions

 
Zm Mohammed
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

I have a Stateless Session Bean which is acting as a Web Service client and I am using EJB Timer Service to invoke the Web Service at regular intervals.

1) Do I need to show the EJB TimerService in the Sequence diagram to show that the Web Service is invoked at regular intervals or can I just mention it in the notes?

2) I have read discussions which ask to show all classes in Sequence diagrams in the Class diagram. If my above mentioned SLSB is just invoking an external system and not interacting with any other classes, how do I show it in the Class Diagram?

Thanks in advance!
 
san kumar parihar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my opinion:

1) Both. You may use Loop Fragment with [0,*] iterations and add notes. I have not seen any notation in sequence diagram (is there any?) to denote activities that occur periodically so you need to mention that in notes
2) I have similar situation and I am inclined towards using an isolated class digram (on side of main class diagram). Fortuantely I have more to depict that what you have
 
Nilessh Ganu
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Zm Mohammed wrote:Hi friends,

I have a Stateless Session Bean which is acting as a Web Service client and I am using EJB Timer Service to invoke the Web Service at regular intervals.

1) Do I need to show the EJB TimerService in the Sequence diagram to show that the Web Service is invoked at regular intervals or can I just mention it in the notes?

2) I have read discussions which ask to show all classes in Sequence diagrams in the Class diagram. If my above mentioned SLSB is just invoking an external system and not interacting with any other classes, how do I show it in the Class Diagram?

Thanks in advance!


Hi,
I am also planning to use EJB TimerService. Did you thought off the option of assuming an asynchronous WS ?
Once the WS has the data generated, we will get it right a way, something like this.
 
Raja Pal
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the event of the timing interval is to be depicted use the UML Diagram - "Activity Diagram" - which can best represent this! Sequence only shows the timing order of method calls not the trigger/time event of the method call. However you can use the sequence diagram with the timer(int inerval) method invocation depicted on the service instance.
 
Raja Pal
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry missed you question 2 in my post.
If the classes implementing your functionality here are outside your scope, simple depict their component interface in the class diagram nd use the component diagram to elaborate the implementation details.
 
Zm Mohammed
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for replying guys. After checking everyday I actually lost hope that someone is going to reply to this. Its good to see other people in the same boat, it boosts confidence.
san kumar parihar wrote:In my opinion:
1) Both. You may use Loop Fragment with [0,*] iterations and add notes. I have not seen any notation in sequence diagram (is there any?) to denote activities that occur periodically so you need to mention that in notes
2) I have similar situation and I am inclined towards using an isolated class digram (on side of main class diagram). Fortuantely I have more to depict that what you have

San Kumar,
I have to depict that the SLSB (WS client) invokes the Webservice once every month. In my opinion, loops in Sequence diagrams are used for "Number of Elements" and not for "Number of Days" . Like "Loop for each particular element" may be right but can we also use the loop in the sequence diagram for "Loop for each month"? Correct me if I am wrong.
Raja Pal wrote:
If the event of the timing interval is to be depicted use the UML Diagram - "Activity Diagram" - which can best represent this! Sequence only shows the timing order of method calls not the trigger/time event of the method call. However you can use the sequence diagram with the timer(int inerval) method invocation depicted on the service instance.

Raja,
I am reluctant to show the Activity Diagram. Can you please elaborate on the "timer method invocation depicted on the service instance"?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic