Book a Demo

Author Topic: Messages mapping to operations  (Read 4925 times)

solvi

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Messages mapping to operations
« on: August 26, 2009, 12:59:14 am »
I would like to know if there is a possibility of checking which messages in e.g. a sequence diagram are not mapped to a operation of the receiving class or interface.

I would like to have some kind of a list of the message mapping.


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Messages mapping to operations
« Reply #1 on: August 26, 2009, 04:23:59 pm »
you can probably come up with a search (SQL search) that shows these messages.

Geert

solvi

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Messages mapping to operations
« Reply #2 on: August 26, 2009, 06:04:59 pm »
Hallo Geert,

can you please make an example of such SQL search in EA?

Thank you!

Solvi

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Messages mapping to operations
« Reply #3 on: August 26, 2009, 09:23:53 pm »
something like this

Code: [Select]
select c.ea_guid as CLASSGUID,'Connector' as CLASSTYPE,c.name as Name
from t_connector as c
where not exists (select ct.ea_guid from t_connectortag as ct
                          where ct.ElementID = c.Connector_ID
                              and ct.Property = 'operation_guid')
and c.Connector_Type = 'Sequence'
Should work

Geert

solvi

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Messages mapping to operations
« Reply #4 on: August 26, 2009, 09:35:58 pm »
Super! It works.

Thank you so much Geert.

Solvi

P.S: Just one question Geert: Where did you find the information about the  EA data model with the explanation of the value "operation_guid"?
« Last Edit: August 26, 2009, 10:13:25 pm by solvi »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Messages mapping to operations
« Reply #5 on: August 26, 2009, 10:22:09 pm »
Quote
P.S: Just one question Geert: Where did you find the information about the  EA data model with the explanation of the value "operation_guid"?

I didn't, I just figured it out based on experience and the values that I found in the different rows.
Unfortunately there is no database schema documentation for the EA database (although it has been requested numerous times)

Geert

solvi

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Messages mapping to operations
« Reply #6 on: August 26, 2009, 10:34:57 pm »
Thank you again, Geert!

Solvi

IngoK

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Messages mapping to operations
« Reply #7 on: August 31, 2009, 07:51:19 pm »
Hi

this sounds interesting. I understood that the SQL should find all messages which are not formally defined in the class definition....
In my EA project this does'nt work :-/
What does the SQL really do?
And how can I find my messages "which have not been formally defined".

Thank you

Ingo

solvi

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Messages mapping to operations
« Reply #8 on: August 31, 2009, 08:14:33 pm »
Hi Ingo,

what do you mean it does not work?

The SQL query just searchs all "connectors" of type "sequence" in table t_connectors and then it cross-checks in table t_connectortag if they are associated with an operation.

what do you mean by "not formally defined"?

Solvi

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Messages mapping to operations
« Reply #9 on: August 31, 2009, 08:49:48 pm »
Ingo,

The SQL search query has been written on an SQL server database.
It works on local EAP file (MS Access) as well, but it could be that it doesn't work on the database you are using.
If that is the case you should get some database error complaining about the syntax errors or something.
In that case you'll have to modify the sql to match the dialect of the database you are using.
Also, check the version of EA you are using. I've written this against 7.5 (848). It could be that Sparx changed they way they store messages recently.

Geert


IngoK

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Messages mapping to operations
« Reply #10 on: August 31, 2009, 09:22:46 pm »
Hello Geert
I do not use any database - just EA 7.5 (847) with an ea file. I hoped SQL would work always - asuming that the ea-file is organized like a database. ::)

Hello Solvi
"Does not work" means: The list representing the SQL output is always empty - no error message.
Formally defined means: The message has been defined as a method of the associated class of the receiver and is not just text, i.e. it could be selected via dropdownlist.

Thank you to both of you

Ingo

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Messages mapping to operations
« Reply #11 on: August 31, 2009, 09:36:45 pm »
Ingo,

Standard SQL is supposed to work on all databases, but unfortunately many database vendors have their own dialect which is incompatible with dialects of other database vendors.
If you are using EA with an EA file this means that you are working with MS Access as database. Unfortunately MS-Access is the worst when it comes to SQL dialects.

BUT, if you are not getting an error message this means that the query is working fine.

Your definition of formally defined is exactly what I aimed for. This search is supposed to retrieve all messages that are just text.
I have tested this by creating a class (classA) with one operation (op1)
Then I made a sequence diagram and dropped an two object of classA (object1:ClassA and object2:ClassA) on the diagram.
Then I created two message from object1 to object2
For the first message I selected op1 from the dropdown, for the second message I just typed "test"
When running the search it showed the message "test" in the list and not the message op1.

That is actually all the testing I did so I can image that it won't work if the circumstances are a bit different.

Geert