Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - MaXyM

Pages: [1] 2
1
General Board / Cannot move state machine diagram between packages
« on: November 15, 2018, 04:31:38 am »
When trying to move state machine diagram from one package to another, following message does appear:

Quote
Diagram frame(s) are currently being displayed
Please disable them and save the diagram(s) before continuing

Well.. what exactly I have to do in order to move this diagram?

with regards

2
General Board / Table triggers on Activity Diagram
« on: October 13, 2018, 02:30:10 am »
I was looking for a way of documenting database table triggers. They are organized into determined sequence of calls, so I decided for Activity diagram.
EA allowed me to drag&drop a trigger from Project Browser into activity diagram, creating new activity with action pin.



So far so good.
But I cannot find any relationship between origin trigger element (which I guess is "trigger" stereotyped operation in fact) and the activity.

Any clues about it?
If not, can you suggest another way of documenting table triggers?

with regards

3
General Board / Updating DB model (walk through)
« on: October 05, 2018, 12:24:19 am »
A week ago I promised to provide a guide through experienced EA issues. Issues which I found during last year (since EA13.5 provided better support for modeling relational databases)

My experience is based on work with Postgresql. It's possible that listed issues are database specific (some of them definitively are).
Below, you find a link do PDF document, which contain the guide, description of automation scripts (also provided below in zip archive) as well as list of issues reported to Sparx. Unfortunately Sparx officially say that they cannot guarantee any date of solving those issues. Even if some of them are trivial (ie small change to SQL being sent to source database). Be it.

I hope it will help to all of you who is committed to maintain your db documentation in EA.

PDF document
scripts

4
Automation Interface, Add-Ins and Tools / Updating TaggedValues
« on: September 28, 2018, 12:36:57 am »
Hello.
Likely i'm performing some conceptual mistake... but cannot find the root cause.
Originally the need of writing the script comes from EA bug during database RE, resulting duplicating Tagged Values. See image:


Script should copy value from uppercase TV to lowercase one, and then remove the first one from the object.
Here is the code:
Code: [Select]
function main()
{
var tbl as EA.Element;
tbl = GetElementByGuid('{7E0B2D3D-ABB8-4c3b-9B2B-A7A2B38A5CE0}');

        NormalizeDoubledTV(tbl, 'Owner');
NormalizeDoubledTV(tbl, 'Tablespace');
NormalizeDoubledTV(tbl, 'DBVersion');
}


function NormalizeDoubledTV(tbl, tvname)
{
var lwr as EA.TaggedValue;
var upr as EA.TaggedValue;

lwr = tbl.TaggedValues.GetByName(tvname);
upr = tbl.TaggedValues.GetByName(tvname.toUpperCase());

if (lwr !== null && upr !== null)
{
lwr.Value = upr.Value;
lwr.Value = upr.Value;
tbl.TaggedValues.Refresh();
tbl.Update();

DeleteTaggedValue(tbl, tvname.toUpperCase());
}

}


function DeleteTaggedValue(objj, tvname)
{
var obj as EA.Element;
obj = objj;

for (i = 0; i<= obj.TaggedValues.Count; i++)
{
var currentTagVal as EA.TaggedValue;
currentTagVal = obj.TaggedValues.GetAt(i)
if (currentTagVal.Name == tvname)
{
obj.TaggedValues.DeleteAt(i, false);
obj.Update();
obj.TaggedValues.Refresh();
return;
}

}



}

I debugged the issue down to the point, that I know the value of lowercased TV is updated until entering for loop in DeleteTaggedValue. So currentTagVal  variable contains not updated value. I was sure that in javascript references to objects (variables) are being passed.

thanx in advance

5
General Board / Scripted Automation of database RE
« on: September 21, 2018, 10:11:48 pm »
hello
Does EA provides ability to automate RE of database (Show difference... option)? In particular I need to deselect some objects from the list to be imported.

The background for this need is the bug in a query EA sends to database which is being REd. The query doesn't exclude all system triggers (only relationship ones). So every time I do RE for updating existing model, I have manually unselected huge amount of triggers.
Or maybe some one knows how can I fix the SQL query EA is using? The issue has been acknowledged under id: 18038571 in April 2018. I even sent corrected SQL query.

with regards

6
Bugs and Issues / Database RE - game breaking bug - need workaround
« on: September 21, 2018, 12:34:00 am »
EA14 has a a bug reported a half year ago. Not fixed in neither v14.0 nor recent 14.1

While database initial reverse engineering (import from ODBC) works properly (with some glitches still, but it's another case), updating existing model process marks new elements with wrong attribute(s). It causes such elements to be not connected with the model, not supported by DatabaseBuilder therefore in next iteration of update process those are imported again and again.

Effectively it makes impossible to update existing model by changes already deployed to database.

Look at images below:

This image shows a table imported by initial import process.
You can see:
  • its type is "Table"
  • it has Database attribute in "Advanced" section
  • look at casing of tagged values

Now, look at table imported by "Show differences.." feature

  • its type is "Class" - you cannot change it to Table because there is no such entry in drop list
  • it has Language attribute in "Advanced" section instead of Database one
  • look at casing of tagged values. All is uppercase.


I attempted to compare attributes of those 2 objects using script debugger. I found that "Table" shown as type attribute comes from "MetaType" attribute, which is read only and comes from stereotype from an MDG Technology (see: https://sparxsystems.com/enterprise_architect_user_guide/13.0/automation/element2.html)

But since both elements has assigned "table" stereotype... I really have no idea what happens.

Sparx confirmed it as a bug, registered in their bug tracking system (under issue ID: 18048589) but I cannot wait years for the fix.

Do you think it could be managed anyway on my own? Ie fixing some data using scripting? If yes, how to do that?
I appreciate any help.

with regards

7
Bugs and Issues / v14 long lasting bugs
« on: August 13, 2018, 09:48:46 pm »
Hello
I'm really tired with situation of bugs remaining unresolved for long period of time.

With EA v14, the serious issues has been introduced. For example, making impossible to update database model by comparing its current state with database. In such case Type of imported object is  Table anymore. Instead it's Class. The consequence is, it is not linked with Database Builder, effectively it's not seen as part of model after importing. Moreover, in object properties, there is no "Table" type available in , so manual change is impossible (or I don't know how to achieve it).

This and more issues I was reporting months ago. I did my homework, narrowing issues down, preping test case scenarios to them reproducible by Sparx team.
All are confirmed and got assigned issue numbers. But till today remains not fixed (even with v14.1 beta). We are on hold due to those bugs.

I thought, fixing critical, breaking functionality issues, should be put on top of priority list. Am I wrong? Isn't it we are paying for a support? What is the point of paying annual fee, if fixes to show stoppers are delivered after such long time?

Is someone right here who has insight into Sparx ticketing system or can help us with speeding up issue fix delivery, issue numbers are: 18048589, 18017982, 18038571, 18058884.

I would appreciate any help.

BTW where can I get activation code for v14.1beta? The one valid for v14 doesn't work with v14.1 beta (Sparx pages don't list one)

8
Bugs and Issues / [v14beta] Wrong type of table object
« on: March 30, 2018, 12:05:14 am »
When doing RE from existing database, all tables are set to Type: Table, Stereotype: table
But when using synchronization of existing model with existing database (feature: Show Differences [With Options]), new tables are added with Type: Class, Stereotype: table.
The difference is indicated by different icons in Project Browser (see picture)

It causes the interconnected issues:
1. such added object (Type:Class) is not linked with DatabaseBuilder (DatabaseBuilder menu item is not present in contect menu of the element)
2. it's not possible to select Database type for such object. Instead of Database property, it has Language one
3. Further attempts of synchronization will suggest to add the same table again and again and again creating duplicated objects

Moreover, Type: Table cannot be set manually. Types list doesn't contain Table type. This particular behavior is the same as in v13.5


9
Bugs and Issues / [v14beta] Synchronizing model with DB
« on: March 29, 2018, 07:43:57 pm »
In DatabaseBuilder there is option to synchronize current model with database. It's called "ShowDifferences (With options)". It allows reverse engineering existing database mode and apply differences to the model or generate DDL to apply over database.

The feature can be initialized by selecting an option from context menu opened from root element (Postgres in this case) or from sub elements. The later allows to reverse engineering only particular types of objects (see picture below).

But there is another difference. I found, that selecting ShowDifferences from subelements (ie Tables) doesn't report objects existing in database but not existing in the model. While using root element, EA reports new objects allowing to add them to the model.

I can see some inconsistency here. But I'm not sure the behavior has some purpose or it's a glitch?



Found in v14beta. While I can see a lot important improvements comparing to v13, I don't know this issue is new in v14 or was present before.

with regards

10
Bugs and Issues / [v14beta] RE of system triggers (postgresql)
« on: March 28, 2018, 08:17:04 pm »
While testing database Reverse Engineering feature called Show Differences in Database Builder against postgresql database, I noticed that it retrieves logical replication triggers to add them to the model.
While replication triggers are system triggers and shouldn't be considered as model part, those should be excluded.

I narrowed the problem down to the SQL query which retrieves trigger data:

Code: [Select]
Select ns.nspname       As SchemaName,   -- 1
         tab.relname      As TableName,   -- 2
         trg.tgname             As TriggerName, -- 3
         pg_get_triggerdef(trg.oid)       As TriggerDef,  -- 4
         COALESCE(pgdesc.description, '') As Remarks,           -- 5
         trg.*
  From pg_trigger trg
  Inner Join pg_class tab ON trg.tgrelid = tab.oid
  Inner Join pg_namespace ns ON (tab.relnamespace = ns.oid)
  Left Join pg_description pgdesc  ON pgdesc.objoid = trg.oid
  Where trg.tgconstrrelid = 0
  And ns.nspname = 'schema_name'
  And tab.relname = 'table_name'
 
Please note condition: trg.tgconstrrelid - it excludes other system triggers which plays a role of relation constraint watchers. To exclude all system triggers the condition  should use trg.tgisinternal = FALSE. Like this:


Code: [Select]
Select ns.nspname       As SchemaName,   -- 1
         tab.relname      As TableName,   -- 2
         trg.tgname             As TriggerName, -- 3
         pg_get_triggerdef(trg.oid)       As TriggerDef,  -- 4
         COALESCE(pgdesc.description, '') As Remarks,           -- 5
         trg.*
  From pg_trigger trg
  Inner Join pg_class tab ON trg.tgrelid = tab.oid
  Inner Join pg_namespace ns ON (tab.relnamespace = ns.oid)
  Left Join pg_description pgdesc  ON pgdesc.objoid = trg.oid
  Where NOT trg.tgisinternal
  And ns.nspname = 'schema_name'
  And tab.relname = 'table_name'

Now, I'm going to report the issue official way. But I want to ask, is it possible to improve this SQL query by my self? Or is it hardcoded and I have to wait for fix (or write the script which will remove all unneeded triggers)

with regards

11
General Board / EA v14 backward compatibility
« on: March 21, 2018, 11:33:20 pm »
Hello all.
I cannot find information about backward compatibility of EA14 (beta).
Can I use it with database-based repository in parallel with v13.5? Will changes made with v14 be properly interpreted by v13.5?
Maybe there is a document describing compatibility issues (if any) - please share it.

thank you in advance

12
Automation Interface, Add-Ins and Tools / DiagramLink and Connectors
« on: December 05, 2017, 01:48:31 am »
Hello guys
I spent half a day searching for information but at the end I have to ask for it.
I need to change color of DiagramLink in relation to labels. But:

1. don't know how to get labels directly from DiagramLink
2. don't know how to find Connector which is represented by DiagramLink

BTW I found funny thing trying to set LineColor (attribute of DiagramLink). It seems to be BGR instead of RGB. So 255 is red (hex 00 00 FF), respectively blue is 16711680 (hex FF 00 00).

with regards


13
General Board / Dynamic list of dependencies
« on: September 21, 2017, 07:37:00 pm »
Hello.
Let's say I have an application component which have to communicate with all (dozens) db servers in my network. Components which represent db servers are located in packages.
I would like to save manual work (which is error prone) of adding connections while adding new servers
On the other hand I need to maintain traceability between the component and servers.

I could imagine some element which generates list of elements based on SQL. Something like ModelView but it doesn't provide traceability. Could you please suggest me some way? Maybe I'm trying to manage it from wrong end?

14
Bugs and Issues / Values of attributes always truncated
« on: September 21, 2017, 01:32:29 am »
Hello guys.
Please look at image below.
You can see 2 elements. GenericServer Node element on the left side and it's instance on the right.
Both are node type elements without stereotype.

Attribute values are truncated. Doesn't matter it is a classifier or an instance.
Please note that settings available in Features and Compartment Visibility simply doesn't work in this case, whatever I set.

On the other hand, RunState values are not truncated. Unfortunately Feature and Compartment settings are not applied to this area also. Longer strings protrudes out of the shape.

Do you have any idea what happens and how to cope with that?
Worth to say I would like to see attributes not truncated, or truncated only if they really don't fit the shape.
Also since duplicated information is waste of space I would like to hide one or another data (RunState ones or inherited from classifier). I know I can hide RunState, but then I can see truncated values. I can hide Classifier attributes, and yes, this is how I'm doing it right now, but this way I cannot see datatypes as well as attributes which aren't set in RunState (incl attributes set in classifier only)


thanx



15
Recently I was trying to set aggregation connectors between elements using scripting. Durring the process I realized I cannot set direction as well as Subtype (weak vs strong). While debugging my code I separated behaviour I want to describe below. I'm curious it's a bug or I'm missing something down the road.

There is a test case.

1. Create simple diagram with 2 class elements: Class1 and Class2.
2. Create aggregation by dragging connector from Class2 to Class1 and selecting "Composition to Part". Name it whatever you want. The result should look like the picture:

3. Run following script, entering GUIDs of Class2 and the Diagram, before you run:
Code: [Select]
!INC Local Scripts.EAConstants-JScript

/*
 * Script Name:
 * Author:
 * Purpose:
 * Date:
 */
 
function main()
{
var el as EA.Element;
var diagram as EA.Diagram;


el =  Repository.GetElementByGuid('GUID of Clas2 element');
diagram = Repository.GetDiagramByGuid('GUID of diagram');

for (var i=0; i<el.Connectors.Count; i++)
{
Session.Output(el.Connectors.GetAt(i).Name );
Session.Output(el.Connectors.GetAt(i).Direction);
el.Connectors.GetAt(i).Update(); // this line changes direction
Session.Output(el.Connectors.GetAt(i).Direction);

}

Repository.ReloadDiagram(diagram.DiagramID);

}

main();
4. The result on my end looks like on picture bellow. The direction of aggregation is changed from Source->Destination to Destination->Source. Debug console confirms it also



Also I don't understand why position of element Class2 has been changed by reloading diagram.
What am I doing wrong?

Pages: [1] 2