Book a Demo

Author Topic: Operation Realisations  (Read 5564 times)

swilks

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Operation Realisations
« on: April 25, 2012, 03:04:45 am »
Hi there,
I am trying to write a query that shows me if there are any unrealised operations in my classes.
I have put a realisation link between the physical component and the logical class and then selected the operations from the inherited class that the component implements/overrides (shown as a dialog when the realisation link is put between the two nodes). I need to find out if there are operations in the class that I have not implemented in the component.
Has someone done this before? If so please help?!!
Thank you!
Sam

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Operation Realisations
« Reply #1 on: April 25, 2012, 06:31:19 am »
What do you mean by "unrealised operation"? Whether it has been used in a sequence diagram?

q.

swilks

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Operation Realisations
« Reply #2 on: April 25, 2012, 05:38:18 pm »
No, I mean that it has not been implemented, i.e linked to a component via a realisation link and then the operation/method selected in the resulting dialog box.
I hope this makes more sense...
Regards

Sam


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Operation Realisations
« Reply #3 on: April 25, 2012, 06:30:43 pm »
Well, that's possible but difficult. As you need to use Link to Element Feature the information where a link is placed (which operation) is stored in the t_xref table. For the rest of it you can find information in my book (see link below). But the t_xref part is something you need to dig out by yourself.

q.

swilks

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Operation Realisations
« Reply #4 on: April 25, 2012, 07:01:56 pm »
Thank you. How can I tell which of the xrefs is an operation however. I have been scanning the contents of the table and it is not obvious to me....?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Operation Realisations
« Reply #5 on: April 25, 2012, 07:34:28 pm »
I haven't read your message well enough. Now I see that you seem to use the relation name for the operation. Is that right? So you draw a realize relation from the class to the component and name the realization like the operation.

If so, you don't need t_xref.

q.

swilks

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Operation Realisations
« Reply #6 on: April 25, 2012, 10:24:11 pm »
I don't name the realisation link at all.
I have a number of operations in the parent class, when I link the child class (component) to the parent class via a realisation link a dialog box comes up that gives you a list of all of the operations that are available in the parent class that can be implemented in the child class. (Test it in EA if you like - create a class with an operation, create another class and link it to the former with a realisation link. A dialog will come up asking which operation/s you want to implement)
Many components can 'realise' the parent class i.e. the parent's operations can be implemented in various components. I am trying to query the database such that I can find out which (if any) of the parent class' operations are not implemented/realised by any of the component classes....
is this any clearer....?
S

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Operation Realisations
« Reply #7 on: April 25, 2012, 11:33:57 pm »
Now I see what you're doing. The realize simply creates an operation of the same name in the component. So you need to create a dissection of elements related (from Component, to Class, type Realization). Then you need to get the operations from the Class and of the Component. You then need to list those in the Class which do not appear in the Component.

No idea whether you can do that in a single SQL. I think yes, but I'm not sure. At least it will be quite tricky.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Operation Realisations
« Reply #8 on: April 26, 2012, 10:08:10 am »
Have a look at the tagged values of one of the implementing operations. It should have two tagged values: Implements, which names the operation it implements, and ImplementsGuid, which gives the GUID of the operation it implements. This suggests your easiest solution will be to search the t_operationtag table for any matches.
The Sparx Team
[email protected]

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Operation Realisations
« Reply #9 on: April 26, 2012, 06:48:38 pm »
I just tried that. t_operationtag did not contain anything.

q.

swilks

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Operation Realisations
« Reply #10 on: May 01, 2012, 02:47:47 am »
Quote
Have a look at the tagged values of one of the implementing operations. It should have two tagged values: Implements, which names the operation it implements, and ImplementsGuid, which gives the GUID of the operation it implements. This suggests your easiest solution will be to search the t_operationtag table for any matches.

I have had a quick look at the t_operationtag table and none of the columns seem to have 'implements' as a value within it. Could you expand on your answer pls?
Thank you!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Operation Realisations
« Reply #11 on: May 01, 2012, 08:50:32 am »
Sorry, my bad. It appears you only get the Implements and ImplementsGuid tagged value if you have a realization to an Interface element; you have a realization to a Class element so you don't get the tagged values.
The Sparx Team
[email protected]

swilks

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Operation Realisations
« Reply #12 on: May 02, 2012, 04:15:42 am »
Hi All,
Just for info, I have ended up extending the UML profile to include a 'SystemOperation' class in it's own right. I have then created some VB script that iterates through the operations within the original classes and creates individual SystemOperation classes for all of the operations. It then iterates through the parameters in the operation and creates these as (name-value pair) attributes in these classes that have been created. It also looks at the Operation return type and creates this as an attribute.
This then allows us to treat operations as classes in their own right and be able to query and/or manipulate them as such and in my case do the traceability to the required level.
Cheers
S