Book a Demo

Author Topic: Tracking usage of component instances against uc  (Read 4686 times)

Stefan Christoph

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Tracking usage of component instances against uc
« on: July 19, 2010, 10:57:31 pm »
Hi,

Background info:
our current project consists of a component model in which all the system components are defined and a use case model which contains sequence diagrams to document those.
The components are used within sequence diagrams. In fact we are using instances of the components to prevent EA from loosing messages in the sequence diagram.

Question:
Is there anyway to create some traceability matrix which shows which component is used in which sequence diagrams?
I tried the Documentation - Traceability Matrix feature from EA User Interface, but couldn't get a reasonable output.
The Show all Diagrams provides a usable output per component, but I would need to collect the results for all components.

I played a little with the Automation Interface fom JScript, but yet I couldn't quite figure out how to obtain information about instance of a element. Looking into the EA DB, it looks like that those are stored in the q_connections table, but I'm not quite sure if and how I could utilize this from an automation script. Any suggestions?

Many thanks in advance!

Stefan

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13519
  • Karma: +573/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Tracking usage of component instances against
« Reply #1 on: July 26, 2010, 04:11:49 pm »
Stefan,

How exactly do you model the relation between the use case and the component (instance)?
Do I read it correctly that you have sequence diagrams nested under the use case, and on those sequence diagrams there are instances of components that either send or receive messages?

Geert

Stefan Christoph

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Tracking usage of component instances against
« Reply #2 on: September 11, 2010, 12:02:08 am »
Hi Geert,

sorry for the late reply, but I kind of missed your reply.
Your assumptions are correct. The sequence diagrams are right now below the use cases and hold the component instances which then send/receive the messages.

Cheers,

Stefan

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13519
  • Karma: +573/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Tracking usage of component instances against
« Reply #3 on: September 13, 2010, 03:37:06 pm »
Stefan,

This seems like a pretty weak link between use case and component to me.

You could make the relation a bit more explicit by adding the use case on the diagram, launching the first message.

If you are using the API you can get the nested diagrams using Element.Diagrams.
The other way around, the diagram keeps the id of the use case in the ParentID field.

The elements displayed on a diagram can be investigated using Diagram.DiagramObjects. Use the DiagramObject.ElementID to get the ID of the component instance.
The ClassifierID of the componentInstance will then point to the actual component.

Geert

Stefan Christoph

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Tracking usage of component instances against
« Reply #4 on: September 13, 2010, 06:25:04 pm »
Geert,

thanks for your feedback.

I just tried you first proposal. That would work, but actually having The use case as one of the objects in the related sequence diagram looks a little bit odd on the first glance - I will nevertheless try it - might be a matter of getting used to it. At least this would be a easy to communicate rule to all the guys which are modifying the model.

Re your second proposal. What is the easiest way to populate the parent id of the diagram? Preferable that should be automated as we might have multiple guys working on the model. I couldn't find any spot in the UI where I could modify it..

Many thanks in advance

Steafn

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13519
  • Karma: +573/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Tracking usage of component instances against
« Reply #5 on: September 13, 2010, 06:35:05 pm »
Stefan,

The Diagram.ParentID is filled in automatically when a diagram is owned by an element (and not a package).

Geert

Stefan Christoph

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Tracking usage of component instances against
« Reply #6 on: September 13, 2010, 06:44:14 pm »
Geert,

thats sounds good. I'll give this one a try.

Cheers,

Stefan