Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: ALL_IN_ONE on May 28, 2010, 03:36:08 pm

Title: Operation Links and CreationDate and Time
Post by: ALL_IN_ONE on May 28, 2010, 03:36:08 pm
Hello

I have a question regarding the operations / attributes. I have modelled the operations on different days on a EA project using Automation scripts. Now the issue is that I need to delete them. I dont have to delete all but only those which were imported on a specific date / time. Is there any possiblitliy to know the date and time of modelling of the operation or attribute. I am unable to see the date time feature for the operations / atributes, but for the elements. diagrams and packages it is availble.

Also I wanted to know whether the operation can have links?

Regards,
ALl_In_One
Title: Re: Operation Links and CreationDate and Time
Post by: Geert Bellekens on May 28, 2010, 04:15:50 pm
No, unless you had the auditing feature turned on, there is no way to know when a certain operation was created.

Yes, operations can have links.
They could be used on a message in a sequence diagram,
They could be the target of a CallOperation Action,
They could be linked in a behavior specification of a state operation,
They could be linked by any type of relation using the "link to element feature",
They could be referenced by a tagged value,
...


Geert
Title: Re: Operation Links and CreationDate and Time
Post by: ALL_IN_ONE on May 28, 2010, 04:35:40 pm
Hello all,

Thanx Geert for the info . . .

Before I posted this topic . .
Scenario
I verified on a sequecne diagram messgae. Like, When I drag the operation on the lifeline the messgae name is the operation name. Now when I delete the same operation from the browser, the message of the connector still remains. Hence I was thinking if there is a link then the message should also vanish . .hence this didnt happen . . .

Is my analysis correct? If yes then through automation I will not come to know the links of an operation . . .

Do you think so if yes then can you help?

Regards,
All_In_One
Title: Re: Operation Links and CreationDate and Time
Post by: Geert Bellekens on May 28, 2010, 04:46:18 pm
Yes, the name of the operation gets copied into the message, but there is also a "real" link to the operation.
So if the operation is deleted the name stays on the message, but the real link (using the guid of the operation) is now gone.

You can find the "real" links using automation.
Look at http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1274966969 to get inspiration.

Geert
Title: Re: Operation Links and CreationDate and Time
Post by: ALL_IN_ONE on May 28, 2010, 06:03:17 pm
Hello,

@Geert : Thanx a ton. In will try it and get back.

Regards,
ALL_IN_ONE
Title: Re: Operation Links and CreationDate and Time
Post by: ALL_IN_ONE on May 28, 2010, 09:19:57 pm
Hello Geert,

That C# code and the SQL Query was amazing . . it worked fine.
Now I will try for other Connector types . .

Regards,
All_In_One
Title: Re: Operation Links and CreationDate and Time
Post by: Geert Bellekens on May 28, 2010, 09:43:32 pm
Good luck  :)

Geert
Title: Re: Operation Links and CreationDate and Time
Post by: ALL_IN_ONE on June 02, 2010, 07:03:29 pm

@Geert : Can you elaborate more on the above points you made that "operations can be linked by any type of relation using the 'linkto element feature' " and also the last point "operations can be referenced by a tagged value ". Can provide some example?


regards,
ALL_IN_ONE

Title: Re: Operation Links and CreationDate and Time
Post by: Geert Bellekens on June 02, 2010, 07:10:15 pm
If you draw any type of relation between two classes on a diagram, you can right click on one of the ends and choose "Link to Element Feature".
The next dialog allows you to either choose an attribute or an operation to link the connector_end with.

If you setup a tagged values with type:
Code: [Select]
Type=RefGUID;
Values=Operation;
The it allows you to select an operation when filling in the tagged value.
Technically it stores the ea_guid of the operation in the value of the tagged value.

Geert
Title: Re: Operation Links and CreationDate and Time
Post by: ALL_IN_ONE on June 02, 2010, 07:58:00 pm
thanx a ton for the quick reply.

1) that element feature was amazing . .. i never noticed that there could be an additional option "link to element feature" if you right click on the right end of the connector. But now its fine and could detect the operation link. I made good progress in detecting the operation links in the diagram.

2) (In the above reply)Regarding the tagged value. I tried adding a tagged value to an element but i didnt get any option RefGUID. Is it profile specific. Or do i need to write it by hand the type of tagged value and the operation name.

Do you or any body else knows where can I find a document for poosible operations links in UML Diagrams?

Thanx in advance

Regards,
ALL_IN_ONE
Title: Re: Operation Links and CreationDate and Time
Post by: Geert Bellekens on June 02, 2010, 08:47:30 pm
Quote
2) (In the above reply)Regarding the tagged value. I tried adding a tagged value to an element but i didnt get any option RefGUID. Is it profile specific. Or do i need to write it by hand the type of tagged value and the operation name.

Yes you have to write it by hand in the tagged value description field.
There is some documentation about that in the help file.

With regards to a document listing all possible relations of an operation, I highly doubt that something like that exists.
You could try to ask Sparx support, they are usually pretty helpful.

Geert
Title: Re: Operation Links and CreationDate and Time
Post by: ALL_IN_ONE on June 03, 2010, 01:50:28 pm
Thanx Geert.

Hello Sparx,

Do you have any document or information for the possible links for an operation.

Regards,
All_IN_ONE
Title: Re: Operation Links and CreationDate and Time
Post by: Geert Bellekens on June 03, 2010, 01:56:38 pm
all_in_one,

Please note that this is a user forum.
Sparxians often visit it to help us out, but the official way of reaching support is to use the report a bug (http://www.sparxsystems.com/support/bug_report.html) or feature request (http://www.sparxsystems.com/support/feature_request.html) links on the bottom of the page. That will ensure that your request is logged into their system, and they will answer your question.

Geert
Title: Re: Operation Links and CreationDate and Time
Post by: Geert Bellekens on June 29, 2010, 04:44:48 pm
ALL_IN_ONE,

I don't know if it would still be useful for you, but I've uploaded and addin to the community site (http://community.sparxsystems.com/resources/scripts/navigator-addin-navigate-operations-sequence-diagrams-and-vice-versa) which allows you to navigate between operations and the messages on sequence diagrams that call such operation.

I've also included a separate package with the source code.

Geert
Title: Re: Operation Links and CreationDate and Time
Post by: SomersetGraham on June 29, 2010, 05:47:37 pm
Hi Geert
I have downloaded your addin, however in EA addin manager it shows the status as error- missing
Any ideas

I get the following when trying to register
Code: [Select]
RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can ca
use your assembly to interfere with other applications that may be installed on
the same computer. The /codebase switch is intended to be used only with signed
assemblies. Please give your assembly a strong name and re-register it.
Types registered successfully
*** registering addin with EA
Press any key to continue . . .
Graham
Title: Re: Operation Links and CreationDate and Time
Post by: Geert Bellekens on June 29, 2010, 06:07:30 pm
Graham,

Seems like registering went fine. The message you got is a standard warning message, not an error.

Have you moved the dll after registering it? The cmd file will register the dll in the same directory, so if you move it afterwards then EA can't find it.

Geert
Title: Re: Operation Links and CreationDate and Time
Post by: SomersetGraham on June 29, 2010, 06:14:50 pm
Hi Geert
OK thats good to hear
I have not moved the DLL
If I look in the registry the correct path is shown .....

Graham
Title: Re: Operation Links and CreationDate and Time
Post by: SomersetGraham on June 29, 2010, 07:16:45 pm
Hi Geert
Got this working now
I was using 64 bit version of regasm
Using 32 bit version works

Graham
Title: Re: Operation Links and CreationDate and Time
Post by: Geert Bellekens on June 29, 2010, 10:04:37 pm
ah, good, because I was running out of solutions ;)

Geert