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 - ngong

Pages: [1] 2 3 ... 8
1
General Board / Integrate helper functions to EA
« on: April 02, 2022, 04:55:22 pm »
Currently, I have some Python scripts which access remote REST services deployed on a server hosting a MySQL EA repository. On the server the REST service accesses the EA repository as well as other project information in order to gather some analysis result. The result is stored locally on the client site in a text file.

The Python scripts offer some simple item list selection or file selection dialog to specify one or two parameters for the REST service.

Now, I got the request to start these scripts from within EA - or rewrite them as an EA extension. The analysis result shall be presented in a window which shall pop up from the start of a script.

As there are several options to go - and I am not experienced in any of them - I need some help with the decision how to achive this.


2
General Board / How to change XSD generation to flat style?
« on: March 17, 2022, 09:07:09 pm »
Some time ago I created a XSDschema package to generate an XML schema. The XML schema is taken as an input to XMLBeans for Java code generation.
XMLBeans works best for me, if I define just one top element and associate other complex types to it.
The result shall be totally flat, no nested element definitions inside complex types. Elements in a Sequence should just refer to types on the outer level.
This worked some time ago.
Now I had to introduce an extention (named runnable). The Schema Composer/Export XSD generates all complex types in a flat manner for all older classes. But all newly introduced classes are generated in an unwanted nested style (with some errors as well, non-associated complex types added as elements in the Sequence).
I was not able to find the difference between the new and the old complex types.
I have zipped the eapx and the generaed result here. (updated to include the eapx and the expected XML schema generation result, that I did manually.)

I would really appriciate if someone would get me back on track, so that a completely flat XML schema will be generated.

3
General Board / understanding SQL access
« on: September 07, 2021, 06:17:10 pm »
I wonder why I am not able to access t_diagram by

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

 function getClassDiags() {
var ids = Repository.GetElementSet(
"select Diagram_ID from " +
"t_diagram"
,2)
return ids.Count;
 }
 
function main()
{
var diags = getClassDiags();
Session.Output(diags + " finished");
}

main();

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

 function getClassDiags() {
var ids = Repository.GetElementSet(
"select Object_ID from " +
"t_object"
,2)
return ids.Count;
 }
 
function main()
{
var diags = getClassDiags();
Session.Output(diags + " diagrams");
}

main();

works fine.

I am looking at the create statements of t_object and t_diagram in EASchema_1558_MySQL, which I believe shall describe the JET4 database of the eapx file as well.

4
General Board / print/println in Javascript
« on: September 05, 2021, 07:37:52 pm »
does not work for me.
e.g. there is a simple example in Local Scripts: JavaScritp1, that also does not work on my computer: Win10+EA15.2:1559

Do you got any idea to make print for Javascript scripting work?

5
General Board / highlighting a variant
« on: June 08, 2021, 12:40:29 am »
I was looking around Shape Scripts in order to find how I can conditionally highlight elements belonging to a certain variant of my architecture. Could not find it immedately.
Therefore this question:

In a tag (introduced by a stereotype) there I have variant values, e.g. V1, V2, V3, ALL.
If I select - somehow interactivily - a certain system Variant (other than ALL) on the diagram I only what to see or highlight those elements having ALL or the selected variant. E.g. if I select V1, all elements shall be highlited having V1 and ALL in that Variant tag. All elements having only V2 or V3 are not shown or grey out.

Is there a Shape Script example (or any other method) to do this?
I am also interested in similar concepts.

Thank you in advance for helping.

6
General Board / update stereotypes profile is not recognized
« on: May 21, 2021, 12:20:18 am »
I am maintaining a project specific profile in a separate EA model. I am changing it with about a biweekly frequency (as the definition of our DSL progresses).
In the past I could Import Profile and then Sychronize and the updated version takes place for all used DSL stereotypes.

Now, when importing, a new profile is shown by the same name with about the same stereotype names.

How to tell EA (15.2) that is shall update the exiting one rather than creating a new one?

7
General Board / VBA how to kill a long loop, each with DB error
« on: May 13, 2021, 02:01:54 am »
Again, trying to conquer SQL from VBscript I got an annoying problem:

When I have an error in a script using SQL such as
Quote
function getElementsWithMultipleTags()
   set getElementsWithMultipleTags = Repository.GetElementSet( _
      "select * from t_taggedvalue" _
   ,2)
end function

sub main
   dim objects
   Repository.EnsureOutputVisible "Script"
   Repository.ClearOutput "Script"
   set objects = getElementsWithMultipleTags()
   Session.Output "count of elements " & objects.count
end sub

I get the error message DOA.Fields [0x00000cc1] Item not found in this collection in a loop, too many times.
I found no method to stop the execution of the VBscript program (other than killing the EA task).

Is there one, a bit more smooth?

BTW: why is this script wrong? It works with t_object, but not for t_taggedvalue . EASchema_1558.sql shows both tables to be existant.

8
General Board / encoding chartset for XMI export
« on: May 03, 2021, 02:49:03 pm »
When I export to XMI, the xml top line tells the encoding - it tells
Code: [Select]
<?xml version="1.0" encoding="utf-8"?>.
This is a contradiction when inspecting elements description. There, it uses windows-1252 - but in the 2-pass ampersant notation.
E.g.
Code: [Select]
<properties documentation="&amp;#228;&amp;#246;&amp;#252;&amp;#223;&amp;#196;&amp;#214;&amp;#220;&#xA;€&amp;#181;" for several German special characters.

What is the strategie behind this?


Why not simply use utf-8 for all characters - or use windows-1252 also in the xml top line? Either case the ampersant notation is problematic and should be avoided, imho. You nerver know how many pathes of transformations (e.g. xslt) of the XMI will follow. And the ampersant notation using windows-1252 while the xml top line tells utf-8 seems to me simply wrong.

9
General Board / how to get rid of multiple tags?
« on: April 09, 2021, 01:55:20 pm »
Somehow - I guess by updating and repeated importing of the same profile - I got multiple tags at elements of certain stereotype.
In the Properties window this looks like this.

How to reduce each tag to appear only ones?

10
General Board / How Items-conveyed are linked to Information-Flows?
« on: March 24, 2021, 10:51:33 pm »
I am about to do an SQL query to find the start and end object, connected by information flows for a certain data type.

Using the EASchema_1558, I can find information flows in t_connector. I can find data types in t_object, but I need a hint (or the documentation where it is explained) how they are linked.

11
General Board / sort packages
« on: March 19, 2021, 03:29:25 am »
Below a package I have about 30 child packages.
How to sort them by name in the Browser - other than manually?

12
General Board / size of stereotyped element
« on: March 11, 2021, 07:27:41 pm »
By applying a stereotype from my profile, the regarding element gets colored correctly as specified in the profile.
That stereotype is defined to create certain tags for that element, which increases its size on the diagram in the profile model.

Unfortunately EA uses that size for the initial size when I drag such a stereotyped element to a diagram in the applying model.

Is it anyhow possible to define an initial size for a stereotype independend from the size that shows up in the profile diagram according to the number of attributes/tag fields the stereotype shall expose?

13
General Board / locate search result in browser
« on: March 11, 2021, 07:14:10 pm »
Applying SQL I created a query listing the names of several elements of intrest.

I'd like to be able to locate a certain element listed in the result in Project Browser window.
I mean to have the same Find in Project Browser functionality that I can use for the results of Common Searches/Simple with the result of My Searches.

Is this anyhow possible?

14
General Board / Custom Shortcuts
« on: February 26, 2021, 04:28:19 pm »
How can I improve my productivity to define the sequence
  • right-click on an interface
  • Advanced
  • Use Circle Notation
as a shortcut?

15
General Board / What is common between Partition and Alias at Actions?
« on: February 25, 2021, 05:31:56 pm »
Using EA 15.2. First, I was wondering why there is no Alias field shown in the docked Properties window of an Action, but a field named Partition at the same slot. Than I opened the Properties/Properties dialog, where I found the Alias field. Entered something in there.

The same value appeared at the Partition field in the still docked and open Properties window.

Is this just a bug in EA or is some meaning behind it?

Pages: [1] 2 3 ... 8