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 - Geert Bellekens

Pages: [1] 2 3 ... 21
1
Bugs and Issues / Updating attributes through the API is very slow
« on: June 22, 2021, 04:16:50 pm »
I had imported an xsd that contained an enumeration with lots of values 4000.
The name of the value was a numeric code, and the description of that code was imported into the notes.
I wanted to put the descrption into the alias so I could see the meaning of the values on a diagram by showing the alias, so I wrote a little script to do so (see below)

I ran this script on a few other imported XSD's and it was finished whithin a minute or so, but when it came to the xsd with the enumeration mentioned, it took ages.
I let it run, and it finally finished after 13 hours!

That is an average of over 11 seconds for each attribute. This is not workable anymore. Something should be done to improve the performance of the API in these circumstances.


Code: [Select]
const outputName = "CopyNotesToAlias"

sub main
'create output tab
Repository.CreateOutputTab outPutName
Repository.ClearOutput outPutName
Repository.EnsureOutputVisible outPutName
'get selected package
dim package as EA.Package
set package = Repository.GetTreeSelectedPackage
'inform user
Repository.WriteOutput outPutName, now() & " Starting CopyNotesToAlias for package '" & package.Name & "'", 0
'do the actual work
copyNotesToAlias package
'inform user
Repository.WriteOutput outPutName, now() & " Finished CopyNotesToAlias for package '" & package.Name & "'", 0

end sub


function copyNotesToAlias(parent)
dim element as EA.Element
for each element in parent.Elements
'inform user
Repository.WriteOutput outPutName, now() & " Processing element '" & element.Name & "'", 0
'move notes to alias
if len(element.Notes) > 0 then
element.Alias = Repository.GetFormatFromField("TXT", element.Notes)
element.Update
end if
'process attributes
dim attribute as EA.Attribute
for each attribute in element.Attributes
'move notes to alias
if len(attribute.Notes) > 0 then
attribute.Alias = Repository.GetFormatFromField("TXT", attribute.Notes)
attribute.Update
end if
next
'process subElements
copyNotesToAlias element
next

end function

main

Reported

Geert

2
PCS General Board / Direct link to element or diagram in WebEA
« on: June 11, 2021, 06:46:50 pm »
I have a customer that uses WebEA to publish their model.

They were would like to be able to user hyperlinks to specific elements or diagrams.
With the HTML export this is possible by adding the parameter ?guid=DC62B0DA-0D60-4447-85E6-B9BBAE7FC90F to the url

like this: http://path/path/path/Index.htm?guid=xxxxxxxxxxxx

Is there a similar feature for WebEA? I can't seem to find it in the documentation.

Geert

3
Details:
I was trying to set the (sub)type of my Activity to callProcessActivity in order to link it to an existing Business process. But I found no way to change the subtype, or fill in tagged value calledActivityRef from the docked properties window.
Only when using the model properties Dialog I was able to change the type to callProcessActivity. After doing that the tagged value calledActivityRef became visible.


Steps to Reproduce:
- Create a BPMN Business Process diagram
- Add an Activity
- Select the activity and try changing it to callProcessActivity using the docked properties window.
- Notice that the tagged value calledActivityRef is not accessible.

Reported

Geert

4
Details:
When trying to add an ArchiMate3::ArchiMate_Flow relationship between two ArchiMate3::Archimate_ApplicationComponent in the relationship matrix we get an error saying:
---------------------------
Enterprise Architect
---------------------------
Invalid combination of source and target types for this connector type.
---------------------------
[ OK ]
---------------------------


This does not happen when trying to create the exact same relation in the diagram, or in the new relationship matrix diagram view.


Steps to Reproduce:
- Create 2 Archimate 3 Application components in a package
- make sure you have the option "strict connector syntax" on
- Open the package as source and target in the relationship matrix
- try create a flow connection between the two application components.
- Notice that you get an error and the relation is not created
- Notice that you can create the same relationship directly on the diagram without a problem

Reported

Geert

5
Bugs and Issues / Grouped properties are not set to read-only
« on: April 22, 2021, 05:55:56 pm »
Details:
When tagged values of a stereotype are grouped, they are no longer set to read-only with the rest of the properties.
Things like name, alias, or plain tagged values are read-only, but the grouped tags can still be edited.
This happens both with security based read-only or with version control based read-only


Steps to Reproduce:
-Create a BPMN Business process
-Set it to be read-only either by security or version control
-Try to change the property processType
-Notice that the property processType can still be changed, although the element is supposed to be read-only.

Reported

Geert

6
Details:
I have an add-in that copies attribute constraints.
Recently we had an error when copying because one of the attribute constraints contained two single quotes.
This resulted in a database error, which was caught by my add-in.
The DBError.txt read:
22-04-2021 07:44:46
Microsoft OLE DB Provider for SQL Server [0x80040e14]

Incorrect syntax near 'quotes'.

Context:
select * from t_attributeconstraints where ID=727432 and [Constraint]='constraint with two single 'quotes''

What happened here obviously is that the code forgot to make the name of the constraint SQL safe and escape the single quotes (SQL injection anyone?)

When trying to reproduce the same in a script I was surprised that I didn't get an error. After investigating I found that the error actually happened (and was written to dberror.txt), but had been swallowed by EA. My update didn't work, and EA didn't let me know


Steps to Reproduce:
- create an attribute with a attribute constraint containing two single quotes in the name
- execute the following script (using the correct attribute guid
- notice that the update didn't happen
- open dbError.txt and notice the swallowed error in there

Code: [Select]
option explicit

!INC Local Scripts.EAConstants-VBScript

sub main
dim attribute as EA.Attribute
set attribute = Repository.GetAttributeByGuid("{6C820356-61E4-4359-93AB-0F8F98128238}")
dim constraint as EA.AttributeConstraint
for each constraint in attribute.Constraints
constraint.Notes = constraint.Notes & "+;"
Session.Output constraint.Notes
constraint.Update
attribute.Update
next
end sub

main

Reported

Geert

7
Bugs and Issues / Users in nested groups are not recognized
« on: April 19, 2021, 07:38:29 pm »
Details:
We are setting up a new environment and we want to follow best practices with regards to the Active Directory structure (AGDLP)
So that means we setup a resource group to allow access to a certain EA model (e.g. RGP-SparxEA-RW)
This groups contains a number of global groups (eg. BGP-FunctionalAnalist, BGP-Developer)
These global groups then contain the actual users (geert.bellekens@company.com)
When I link a group in EA to the resource group, EA doesn't recognize my geert.bellekens@company.com user and doesn't allow me access.


Steps to Reproduce:
- setup security to automatically create users based on the linked AD group
- create a resource group that contains a global group that contains a user
- try to open the model with that user
- notice that the user is denied access

Reported

Geert

8
Details:
Using the API I can update diagrams and DiagramObjects for diagrams that are read-only in the GUI.
- Diagrams not locked when using "Require User Lock to Edit"
- Diagrams not checked out when using version control


Steps to Reproduce:
Write a script that updates Diagram properties, or DiagramObject properties
Execute this script on a diagram that is either
- not locked when using "Require User Lock to Edit"
- not checked out when using version control
Notice that you don't get an error, and EA happily updates the supposedly read-only diagram.
This is in contrast to other API objects, such as EA.Element that do honor the read-only status.

Reported

Geert

9
Bugs and Issues / Native XML import hangs
« on: March 24, 2021, 07:40:13 pm »
I'm using EA v15.2.1558 and wanted to copy a data model from one repository to another.

The data model has about 400 Classes, Enumerations and Datatypes, and about 4000 attributes.
So it's not a small model, but definitely not an extremely large model.
An earlier version of this model already exists in the target repository.

Since I've heard all kinds of good things about the Native xml format I thought I'd give that a try.
Exporting to xml was fairly quick and resulted in a 53 MB file.

Importing this file into the other repository however took ages and seemed to be stuck on importing connectors.
After about 15 minutes I killed the process.

Then I went back to using XMI 1.1 for the export/import.

Anyone else seeing this? Am I doing something wrong? Are there cases in which the new native xml format should be avoided?

Geert

10
Bugs and Issues / Format XMI for version controlled packages
« on: January 27, 2021, 10:52:55 pm »
We have a bunch of version controlled packages.
Up until very recently the xmi that ended up in the version control system is formatted to be human readable.

Now the whole xml content is on a single line.
That made comparing two versions go from difficult to impossible.

I think the option Preferences | XML specifications | Format XMI output used to control that, but that setting is on for all of us and hasn't changed.

We are currently using 15.2.1557

Anyone have the same experience and/or a solution?

Geert

11
Details:
When using "Require user lock to edit" it used to be enough to lock the diagram in order to add an existing element to the diagram (as link)
Pretty recently (v15) this has been changed. Now you also need a lock on the owner of the diagram (element or package), which is very annoying.


Steps to Reproduce:
- Set security to "Require user lock to edit" mode
- Apply user lock to diagram, but not to the owning package
- Drag an existing element onto the diagram
- Notice the error message

Reported

Geert

12
Details:
The Use Case relation between Actors and Use cases is not accessible from the quicklink or from the relationship matrix view on a diagram.
The relation is still available from the toolbox, and EA doesn't complain about it, even with the option "strict connector syntax" enabled.
If the connection is indeed valid, it should be accessible from the quicklink and relationship matrix. If it's invalid, EA should not allow it with strict connector syntax.

Steps to Reproduce:
- Create a use case diagram
- Add an actor an a use case
- Use the quicklink from the actor to the use case.
- Notice that the use case (Use) relation is not available
- Switch to the relationship view
- right click on the cell between actor and use case and click Create New Relationship
- notice that UseCase relation is not amongst the options.

Reported

Geert

13
Details:
When selecting an attribute in the project browser, the tagged values defined on the stereotype don't show in the docked properties window.
Only if the owner of the attribute is on the current diagram, the tagged values are shown.

In the properties dialog the tagged values are always visible.

Steps to Reproduce:
- create an attribute stereotype with some tagged values
- create a class with a stereotyped attribute and put them on the current diagram
- select the attribute in the project browser
- Notice that in the docked properties window the tagged values are visible
- Close the diagram
- select something else, and then the same attribute again in the project browser
- notice that the docked properties window doesn't show the tagged values. It looks like it's simply collapsed, but it is not possible to expand that section.

Reported

Geert

14
Automation Interface, Add-Ins and Tools / Scripting version control
« on: January 04, 2021, 06:56:14 pm »
For those who are more serious about script development in EA, I have added some tools to the EA-Matic add-in that make my life as a script developer a bit easier.

- It now automatically saves all of my scripts to a designated folder, where I can version control them
- It now integrates EARefdata splitter and TextHelper, two tool I use very often when developing script.

Here's more info: https://bellekens.com/2021/01/03/ea-matic-v2-3-introduces-developer-mode/

Geert

15
Bugs and Issues / Package.Alias not updated before Package.Update
« on: December 24, 2020, 08:07:41 pm »
If you set the Package.Alias before the package has been saved using Update(), the alias doesn't stick.
You have to first Update() the package and only after that setting the Alias has any effect.

Steps to Reproduce:
- Execute the script below
- Notice that the first line of the output reads "Alias before update: ''" where it should read Alias before update: 'Alias before update'

Code: [Select]
sub main
    dim package as EA.Package
    set package = Repository.GetTreeSelectedPackage
    dim newPackage as EA.Package
    set newPackage = package.Packages.AddNew("NewPackage","")
    newPackage.Alias = "Set Before update"
    Session.Output "Alias before update: '" & newPackage.Alias & "'"
    newPackage.Update
    newPackage.Alias = "Set after update"
    Session.Output "Alias after first update: '" & newPackage.Alias & "'"
    newPackage.Update
    Session.Output "Alias after second update: '" & newPackage.Alias & "'"
end sub

main

Reported

Geert

Pages: [1] 2 3 ... 21