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
General Board / How to change FK name label?
« on: June 04, 2019, 11:49:16 pm »
I'm trying to change Foreign Key label name. But it seems something is broken, or I cannot find proper place to change it.

I found two different places I can do that:
- double clicking on relation on diagram, then can change Foreign Key / Name
- Table Columns and Constraint (available for example from RMB over table in Browser and then Features/ Constraints/Indexes. Then the name can be changed directly  in a list of constraints.

But none of those methods changes a label displayed on diagram. Right mouse clicking on the label, I can see "Edit label" option, but EA does nothing after selecting this. I cannot found any other place, where unchanged name is displayed to be able to change it.

Any suggestions?

General Board / v15 - more strict FKs
« on: June 04, 2019, 10:30:03 pm »
Our model has been created using reverse engineering feature of EA from existing db. It imported serial datatype showing it as valid datatype of column. In postgresql, serial datatype is nothing more or less than integer designating assigned sequence to the column.
Anyway it works without additional effort before v15.

In v15, serial datatype remained in tables, but attempt of creating FK referencing this such column ended with error.

I figured out, that I need to add serial (and bigserial) datatype do database datatype dictionary (you can find it in Develop / Data Modeling / Datatypes).

It seems that EA turn into more strict mode, comparing datatypes when creating relationship. But they forgot to add datatypes being already in-use to dictionary.

BTW when I mentioned that serial means integer plus linkage between column and a sequence, it is how it work in postgresql. It's not surprising that EA doesn't cover this relationship.

I narrowed it to following scenario:

1. Load a project
2. Select a (database) table from Browser
3. Open Special Action
4. Select General/Tags
5. Close window using [X] button

At step #5 EA hangs every time.

If the window is being closed by Cancel button - it works as expected.

BTW, if I stay on other tab (ie Main), and hit close button, EA asks to save changes, even if I touch nothing. If I answer NO, it still takes some  noticeable time (about 1sec) to close the window. For sure a lot longer than in v14.1

General Board / Database relaed tagged values
« on: May 24, 2019, 08:03:37 pm »
There are tagged values related to database, being applied to all db objects:
- Owner (a schema)
- DBVersion
- Tablespace

Before v15 those tagged values were found in tagged values window. But not anymore. On top of that I found the current state is inconsistent:
See image:

Those tagged values are not available in Properties/Tags (bottom left), but are in Special Action/General/Tags (top rights).
In addition to this those tags are exposed as properties (bottom right), and schema itself (Owner) is exposed in Special Action/General/Table detail.

BTW, if I change Owner available in Special Action/General/Table, it is not enough to apply changes to synchronize this change with other places (even to Special Action/General/Tags). It's needed to press OK, allowing to store/refresh data to/from underlying database. Saying that I'm emphasize that using "Apply" button is not enough which is I consider to be a bug.

General Board / v15 tagged values
« on: May 16, 2019, 11:14:19 pm »
It seems that in v15, tagged values are sub window (tab) of properties window.
I found more comfortable to have separate window for properties and taggedvalues. Is it possible to achieve the same in v15?

General Board / v15 - workspaces from v14
« on: May 16, 2019, 11:05:38 pm »
I found that v15 beta cannot see Workspaces set up in v14.x.
It's possible that this finding is valid also for other configuration settings.

is it possible somehow to force the new version to accept settings from v14?

General Board / v15 contains no bug fixes?
« on: May 16, 2019, 09:04:22 pm »
Am I blind or v15 beta contains no bugfixes at all? only changes / new features instead.
I reported a lot of bugs, found in v13.5, v14 and v14.1 which remains unfixed.
In one of recent emails from Sparx they wrote they are "hoping" to include some of those fixes in next release. Unfortunately I cannot confirm any of them.

What is happening? Is it normal for betas to not include bugfixes or it's common for all versions?

BTW where to find element "overview" window in v15 (this one which contain some general information about selected element in pure plain text)

General Board / Duplicated relationship - how to delete safely
« on: April 24, 2019, 11:28:02 pm »
From time to time I find duplicated relationship between elements (let's say between components).
I expect that one of those relationships has been created incidentally and is probably used on some diagrams. Hard is to find which one is the bad one.

Could you share your workflow to get rid of redundant one (less used) in a safe way, incl help with fix all affected diagram.

with regards

Bugs and Issues / ports - name and alias at the same time
« on: April 13, 2019, 01:33:15 am »
If a port has both name and alias set and diagram option "Use alias if possible" is disabled, both name and alias, separated by slash are displayed on the diagram.

Is it any serious reason behind it? Or it could be considered a bug?

Bugs and Issues / Legend for any connector type
« on: January 28, 2019, 11:47:18 pm »
In EA v13 it was possible to set up a Legend for all connector types at once.
Current version (14.1.1427) doesn't offer "All" option in drop list, while still does it for elements.

Is it a bug or a feature? How to cope with this?

Bugs and Issues / Session.Input doesn't work as expected
« on: January 25, 2019, 03:22:25 am »
I've noticed Session.Input doesn't show input requester in script run mode. The requester is being shown only in script debug mode.
Is it correct? Am I missing something?

Code: [Select]
!INC Local Scripts.EAConstants-JScript

function main()
var newData = Session.Input('Input dummy data');



with regards

General Board / Status for connectors
« on: December 18, 2018, 03:41:53 am »
Hi all.
Is there a possibility to have Status attribute for connectors?
I don't know if it's limited by some settings or by underlying data structure.

Similar question about other attributes like: version, phase, creation/update date and person.
If those all are unavailable, I really can't see a reason behind such design decision.

While I can mimic the status/version using TV, it's not applicable this way for creaded_by and dates.

thanks in advance

As I mentioned somewhere else on this forum, I have to move objects between packages to improve user experience while working with database models. EA's DB RE imports all objects of the same type to single package regardless schema. And this location is mandatory for further work with RE. However for daily usage, we have to have split those objects into schema-based packages.
In result, every time I need to update EA model based on existing database, I have to move objects back and forth. With number of objects (thousands) it takes a lot of time (recently it took almost and hour, while running outside of working hours). Maybe worth to mention we are using central repository.

I'm moving the objects using scripting, in particular creating needed packages and changing packageID of each element.

Is there any way to speed this operation up, considering production model so any risky moves have to be limited. A few come to my mind:
- updating model using SQL queries against repo
- performing complete RE outside production model, then import via XMI

Both ways do look to me kinda dirty.
Maybe it's possible to speed up existing script, ie by some bulk update/refresh instead of doing it for single object separately. But I'm not sure what is allowed to do in this matter.

Here is a code I'm using for moving objects from original EA structure into Schemas/<schema_name>/<object_type>/<object> sctructure

Code: [Select]
!INC Local Scripts.EAConstants-JScript
!INC MichalK Scripts.Shared-Lib-JScript

 * Script Name: DbObjects_ReorganizeIntoSchemasTypes
 * Author: Michal Kozusznik
 * Purpose: Move db objects located in object type packages (functions,tables and so on) into Schemas/schemaname/objecttype
 * Date: 2017-11-28

function main()
Repository.EnsureOutputVisible( "Script" );
Session.Output( "Move tables to schemas-packages" );
Session.Output( "=======================================" );
var err;



var pck as EA.Package;
var RootSchemaPackageName = 'Schemas';

oType = Repository.GetTreeSelectedItemType();

if (oType != 5 /* package */) throw new Error("No package selected. Exiting.");

pck = Repository.GetTreeSelectedObject();

if (pck.StereotypeEx != 'Database') throw new Error("It is no root database package. Exiting.");

schemapackage = CreatePackageIfMissing(pck, RootSchemaPackageName);

for ( var i = 0 ; i < pck.Packages.Count ; i++)
if (pck.Packages.GetAt(i).Name == RootSchemaPackageName) continue;
Session.Output( "Processing: " + pck.Packages.GetAt(i).Name);
ProcessObjects(pck.Packages.GetAt(i), schemapackage);

Session.Output( "Finished" );
catch (err)
Session.Prompt(err.message, 0);

Session.Output('Finished in: ' + MeasureTime() + 's');

 * Iterate through all elements found in <srcPck> package and move them into <schemaPck>
 * Inside of <schemaPck> subpackages representing db schemas will be created.
 * And inside of the latter, subpackages for object types (Functions, Tables etc)
 * <schemaPck>
 *    schema1
 *       Functinos
 *       Sequences
 *       Tables
 *       Views
 *    schema2
 *       Functinos
 *       Sequences
 *       Tables
 *       Vies
 *    etc
function ProcessObjects(srcPck, schemaPck)
var sourcePackage as EA.Package;
sourcePackage = srcPck;

var schema as EA.Package;

var currPackage as EA.Package;
var obj as EA.Element;

for ( var i = 0 ; i < sourcePackage.Elements.Count ; i++)

obj = sourcePackage.Elements.GetAt(i);
Session.Output( obj.Name);
schema = CreatePackageIfMissing(schemaPck, GetSchemaFromTaggedValue(obj));
currPackage = CreatePackageIfMissing(schema, sourcePackage.Name);

obj.PackageID = currPackage.PackageID;



 * Find a <schemaname> package collection of <pck>, or create one if not existist.
function CreatePackageIfMissing(pck, schemaname)
var currentObj as EA.Package;
var currentPackage as EA.Package;
currentPackage = pck;
currentObj = null;

currentObj = currentPackage.Packages.GetByName(schemaname);
catch (err)
// do nothing

if (currentObj == null)
currentObj = currentPackage.Packages.AddNew(schemaname, "Class");

return currentObj;

 * Get Schema name from 'Owner' TaggedValue of given <obj>
function GetSchemaFromTaggedValue(obj)
var element as EA.Element;
var retval;
element = obj;

if (element.TaggedValues.GetByName('Owner') != null) retval = element.TaggedValues.GetByName('Owner').Value;
    else if (element.TaggedValues.GetByName('OWNER') != null) retval = element.TaggedValues.GetByName('OWNER').Value;

if (retval == null)
throw new Error('Element ' + element.Name + ' has no tagged value Owner');
return retval;


Don't bother of included script. It provides MeasureTime() to measure script execution time. Nothing critical.

With regards

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:

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

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

Pages: [1] 2