Book a Demo

Author Topic: Modelling processes that exchange messages  (Read 14104 times)

Frans van Gool

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Modelling processes that exchange messages
« on: April 03, 2013, 06:33:29 am »
Hello,

I need to model a system of processes exchanging messages. The most natural way to model this seems to be with sequence diagrams, using lifeline elements for the processes and message connectors for the messages. This way it is easy to see which messages are send and/or received by a particular process. However, I do not seem to be able to find all processes that send and/or receive a particular message. How can I model my system in such a way that both questions are easy to answer. Furthermore, the model should also be able to define the content of the messages (e.g. as an XSD or a class).

Regards, Frans.

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Modelling processes that exchange messages
« Reply #1 on: April 03, 2013, 07:03:52 am »
Hello Frans,

if I'm right you want to know which messages are exchanged between processes (sender and receiver).

You can model it with:
  • Sequence Diagram
  • Activity Diagram (actions)
  • Receiving Messages by Interface (signals)

To find out which messages are exchanges you need to analyze the system at hand. If it's implemented in a programming language you may use DoxyGen. You may find a tool with google or you may develop your own scanner.  

The content of a message you can model as a signal. I think, not sure about that, that you can export signals as XSD.

A signal is a class with the stereotype <<signal>>. The operation parameter represents the information conveyed (message).

The EA online help may give you further advice.

Best regards,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Modelling processes that exchange messages
« Reply #2 on: April 03, 2013, 07:59:26 am »
What I do:
- for each use case create a collaboration with realize relation
- inside the collab create activity and sequence diagrams for the various scenarios described in the use case
- to create it use the context menu Add/Activity/... etc
- also be sure to just use instances in sequence diagrams, not classes. Unfortunately EA does not check this and when using VC you run in big trouble if you do not obey that.

q.

Frans van Gool

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Modelling processes that exchange messages
« Reply #3 on: April 03, 2013, 05:52:32 pm »
Hello,

Probably I did not state the problem clear enough.

The system I intend to model has many hundreds of processes and many hundreds of messages and I would like to model it in EA to get an overview of all interactions. Given the amount of objects, no single diagram will be useful to get the overview I need (although I do want to use diagrams to highlight parts of the system, see below).

To get the overview, I need to be able to search and browse my model. If I use elements (like lifelines) and connectors (like messages), then it is easy to get an overview starting from the elements, since if you select an element in the model browser and view its properties, you can see the connectors to other elements. It does not seem possible to do something similar starting from connectors (any type of connectors as far as I can see).

I know I can get the same information from the code; actually that is what I am currently doing. But this information usually is the starting point of new designs and hence I would like to put it in EA, so people can easily use it in those designs. Actually, this is where the diagrams come in; the designs typically use (sequence) diagrams to highlight the changes made to the system.

So I seem to have a dillema here:
  • If I model messages as connectors, then I do not seem tobe able to search and browse them (and hence cannot get the overview I need).
  • If I model messages as elements, then I will not be able to use them in the diagrams that are natural for the problem domain (e.g. sequence diagrams).
I would like to know what is the best way out of this dilemma.

Regards, Frans.

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Modelling processes that exchange messages
« Reply #4 on: April 03, 2013, 07:10:26 pm »
Hello,

if it's important for you: Consider writing an Addin.

With an Addin you can do almost everything. A good example is the Navigator from Geert Belleken.

Kind regards,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Paulus

  • EA User
  • **
  • Posts: 152
  • Karma: +0/-0
    • View Profile
Re: Modelling processes that exchange messages
« Reply #5 on: April 03, 2013, 09:33:24 pm »
Hi Frans,

If it's about visualisation: consider using activity diagrams instead of sequence diagrams, and link actions using objectflows: Action1 -> Object -> Action2.

What you would do:

- create an Activity for each process
- create a class for each message type
- create activity diagrams representing views on processflows where:
1) you don't directly use activites in you diagrams but rather activity instances (=action)
2) you don't directly use classes  in you diagrams but class instances (= object)
3) don't link actions directly (=controlflow) but link them through objects (=objectflow)

This i think provides a neat visualisation of processflow including messages involved.

The problem then of determining the relationship matrix between activites and classes reduces to a fairly lenghty but straightforward SQL statement that:
- for a specific activity (=process) locates all its instances (actions)
- from that determines all its object flows, and from that the objects involved
- and from that, for each object, the class (=message) for that object.

best regards,

Paulus

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Modelling processes that exchange messages
« Reply #6 on: April 03, 2013, 10:37:53 pm »
Quote
So I seem to have a dillema here:
  • If I model messages as connectors, then I do not seem tobe able to search and browse them (and hence cannot get the overview I need).
  • If I model messages as elements, then I will not be able to use them in the diagrams that are natural for the problem domain (e.g. sequence diagrams).
Fortunately it's not a dilemma since you can solve the first alternative. Just select the method in the browser and press Ctrl-U. This will list all occurrences of the methods (also where used as message). Alternatively you can write a SQL search to list messages (my book Inside EA contains examples).

q.