Book a Demo

Author Topic: Search for messages between certain life lines  (Read 4667 times)

EaUser111

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Search for messages between certain life lines
« on: March 07, 2013, 12:56:03 am »
Hi everybody,

I have been using EA for quite some time already. I am mostly defining and detailing UCs by means of sequence and activity diagrams. Now the model consists of quite a few diagrams in a substructure of packages.

My problem is as follows:
I need to search for messages in sequence diagrams which meet the following criteria:
They are exchanged between two life lines (regardless of the direction) with the life lines being objects of particular classes. So the criteria are the classes of the two lifeline objects between which the messages are exchanged. It would be helpful to get the name of the message and also the name of the containing diagram.

So far I have used the search feature of EA only in very simple searches. I am not familiar with SQL and I also would want to avoid diving into the depths of UML metamodels if possible.
It would also be good if I could limit the search to a certain packete and below.

Is anybody here who can help me out on this? Any support would be greatly appreciated!

BR and thanks in advance
EaUser111

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Search for messages between certain life lines
« Reply #1 on: March 07, 2013, 01:48:28 am »
Hi EaUser111,

The good news is that with all that is possible with an SQL search, and that it won't take that long to develop it (1/2 day or so).

The bad news is that I have too much work at the moment to do it for free.

Geert

ChrisDr

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: Search for messages between certain life lines
« Reply #2 on: March 07, 2013, 02:41:33 am »
I wrote a search script that might provide nearly the information that you are asking for. Maybe you can check this out and see whether it lists the information you need. If it is so, then we can further narrow down the search by limiting the classifier type and the name of the relation.
Chris

EaUser111

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Search for messages between certain life lines
« Reply #3 on: March 07, 2013, 08:12:11 pm »
Chris,

thanks a lot for providing the hint to your script. In the meantime I installed it in EA and ran it on our model.
What I see goes definitely in the right direction, but some information which I need is missing. For each message, I would need the instance:class of source and sink lifeline being shown. Ideally a capability to filter for particular pairs would be provided as well, but I think I can do that afterwards with export to csv and text based filtering.
BTW, what is meant to be displayed in the "Element" column? That is always empty in my search result.

@Geert:
I understand. I could try to get some funding within our company but before that would ever bear fruit, the task should be done or I would actually have learnt JS, SQL and the UML meta model to do it on my own.  ::)

Thorsten

EaUser111

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Search for messages between certain life lines
« Reply #4 on: March 07, 2013, 09:08:07 pm »
I gained some more insight:
I now understand that "Element" ist the name of the life line object, which consumes the message (e.g. which provides that interface). Since we usually have unnamed instances of classes, this field is mostly empty and the class name has the real relevance in our case.

ChrisDr

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: Search for messages between certain life lines
« Reply #5 on: March 07, 2013, 11:14:36 pm »
Let me know if you need some more help on how to adjust it for your needs.
Chris

EaUser111

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Search for messages between certain life lines
« Reply #6 on: March 07, 2013, 11:42:56 pm »
Well, actually that is the case. I am not knowlegdable in Jet or SQL programming. I think we have the Jet data base in our model, since we use a rather standard configuration.

I really hoped you would offer some additional help. I don't want to be cheeky, but here is what additional information I'd require to be displayed in the search results:
  • class of the target lifeline (in addition to its name in "Element")
  • name and class of the source lifeline
It would be very nice if you could help me out on this, if it is not too much work.

Thorsten

Konrad Wieland

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Search for messages between certain life lines
« Reply #7 on: March 09, 2013, 01:06:47 am »
Hi,

I developed some months ago a SQL query doing similar things as described by you. The output are operations used in messages between objects in e.g. Sequence Diagrams. With this query you can check whether a real operation is used for a message or not.

Maybe it helps you to develop your own query satisfying your requirements.

Code: [Select]
SELECT C.Name AS ClassName, t_operation.Name AS OperationName, t_operationparams.Name, t_operationparams.Type, t_object.Name
FROM ((( t_connector  as C
LEFT OUTER JOIN t_connectortag ON C.Connector_ID = t_connectorTag.ElementID)
LEFT JOIN t_operation ON t_connectorTag.VALUE = t_operation.ea_guid)
LEFT JOIN t_object ON t_object.Object_ID = t_operation.Object_ID)
LEFT JOIN t_operationparams ON t_operation.OperationID = t_operationparams.OperationID
WHERE (C.DiagramID BETWEEN 1 AND 99)

Cheers
Konrad
« Last Edit: March 09, 2013, 01:07:30 am by konradw »