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.


Messages - Geert Bellekens

Pages: [1] 2 3 ... 566
1
You shouldn't use GetByName (ever)

Why don't you simply loop the packages until you have the one you need?

Something like:

Code: [Select]
    dim myP as EA.Package
    dim curP as EA.Package
    set curP = nothing 'initialize

    For Each packageString In packageArray
        For Each curP in rootPackage.Packages
            If curP.Name = packageString then
                 Set myP = curP
                 exit for
            end if
        next
   next

Geert

2
Yes, report as bug to Sparx.

Little obvious bugs like this often get fixed quite quickly.

Geert

3
[SNIP]

The Message Composer copies the stereotypes from the source to the subset model.

Then depending on what you wanted to generate you'll have to
- generate it using your own script/add-in
- transform it to a PSM for the technology you are generating to (XML Schema model in case of XSD target) and then use the standard XSD generation tool.

Geert
Hi again Geert,
I just wanted to clarify your usage above with what I saw on the website for EA Message Composer.

As I understand it, the Message Composer is used to create the subset model and then the Schema Composer is used to generate the payloads.  When you mention "standard XSD generation tool" do you mean marking the [X] XML Schema (XSD) checkbox in the Schema Export dialog of the Schema Composer? If that's not the case, what function does the Schema Composer perform?

Paolo
Hi Paolo,

No we use the Schema Composer only to be able to cherry-pick the message content from the general model.
The EA Message Composer is is a Schema Composer add-in that reads the profile and creates the subset model (fully traceable to the main model)

Some clients use this tool on model with an XML Schema profile applied. They use the the standard XSD generation Ribbon =>  Code | Schema | XSD |  Export and XML Schema (XSD) File to generate the code.

Other clients use this on their logical model and have their own tool (one of them written by me) to generate XSD's from the logical model.

I don't think the Schema Composer as such is very useful for generating XSD's directly as it offers no options at all for style etc.., but the cherry picking part is very good.
The standard XSD generation feature is much better (has a lot more options), but you need to start from a physical XSD model to be able to use that.

Geert

4
I didn't see it at once, but that is indeed one of the classic gotcha's.
Still gets me once in a while, and I write VBscript code at least once a week.

Geert

5
Paolo,

I'm not that versed in Transformation templates, but I do have a lot of experience with the Schema Composer.

The way a lot of my clients use it is to first generate a subset model using my add-in EA Message Composer and then generate whatever they need (usually XSD) from that subset model.

The Message Composer copies the stereotypes from the source to the subset model.

Then depending on what you wanted to generate you'll have to
- generate it using you own script/add-in
- transform it to a PSM for the technology you are generating to (XML Schema model in case of XSD target) and then use the standard XSD generation tool.

Geert

6
There is actually a table called t_taggedValue table that is used for parameter tags and connector role tags.
They should be able to use it for diagram tags as well.

Geert

7
Good news indeed  ;D

Geert

8
General Board / Re: The mysteries of Roadmaps ... ?
« on: October 19, 2018, 04:51:41 pm »
Matthew,

The roadmap diagram stuff is fairly recent and what I like to call a "sales feature".
It's only true purpose is to allow the sales people to say "Look, we do Roadmap diagrams as well", but it hasn't been thoroughly designed and tested.
It probably only works well for the use case: "demonstrate the feature to a potential client"

As with many of these exotic features in EA (testing, debugging, project management, instant chat, email,...) there are most often better tools on the market for such tasks.

EA is really good as a general purpose modelling tool, and to generate development artifacts (code, database definitions, XSD) and documentation, but outside of that scope I'm not sure it is the best tool for the job.

Geert

9
General Board / Re: Logical Data Modelling in SPARX
« on: October 19, 2018, 03:09:05 pm »
David,

Using Class Diagram for Logical Data Model is pretty much an industry standard these days.

Class diagrams allow for modelling on a higher conceptual level, including things like inheritance, many to many relations, etc..
From this logical model you can transform to a number of different technical model such as XML schema models, relational database model, code (java, C#,...) models etc..

So the transformation to a relation database model is just one of the possible transformations. Also not that this specific transformation probably can't be done completely automatically. Often design decisions have to be made to decide how to transform inheritance (at which level will you collapse into a table) and how to deal with many to many relations.

Typically in a LDM you would use associations for relations between entities (that will be translated into tables) and attributes for relations with datatype.
There is a property IsID that can be used to identify the unique identifiers for each class. This information could be used to create the primary key on the table, but more often than not tables get a technical PK that has not business value. In that case the "isID" information could still be used to create Unique constraints though.

Geert

10
Not really.
You can either use the API like myElement.ElementGUID (see https://www.sparxsystems.com/enterprise_architect_user_guide/14.0/automation/reference.html for an API reference) or you can use Repository.SQLQuery() to get your data as a set.

I would probably go for the latter in case of an export. There is a huge difference in performance between the two.

Geert

11
C# and VBscript use the same API, so no  :-\

Geert

12
There is no way to use the CSV export/import definitions from scripting.

What you can do is write your own import/export routine. It is really not that difficult.

I have a couple of export script in my VBScript library: https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library

Geert

13
Bugs and Issues / Re: Timeout on SQL search query
« on: October 18, 2018, 08:38:46 pm »
I searched a bit online on the problem, and it seems like the query timeout is set by the application code.
If that is the case then only the Sparx developers will be able to solve the problem.

Hoping to get a reponse from someone at Sparx.

Geert

14
Bugs and Issues / Timeout on SQL search query
« on: October 18, 2018, 07:11:17 pm »
We are using an SQL Server backend and one of our export searches returning a timeout after a while.
Does anyone know if you can somehow increase the timeout?
When running the same query directly in SQL Server Management Studio we don't get a timeout.

I know I can probably improve the performance of the query by rewriting it, but that is not what I'm looking for.
Optimizing the query would take a non-trivial amount of time, and since it's something we run only once every couple of months, we don't care if it takes 10 minutes to execute.

The query is a bit too long to post here (34.000 characters, 508 lines, the forum only allows 20.000 characters per post)

Thanks

Geert

15
General Board / Re: Shape Script: print TaggedValue as decoration
« on: October 17, 2018, 11:57:35 pm »
Here's an example of one of my shapescript:
The "TAG" part is part of the syntax. The "condition" part should be replaced by the name.

Code: [Select]
shape expression
{
if (hastag("compositionExpression"))
{
print("#TAG:compositionExpression#");
}
else
{
PrintWrapped("Expression missing!");
}
}

For more example shapescripts see: https://github.com/GeertBellekens/Enterprise-Architect-Shapescript-Library

Geert

Pages: [1] 2 3 ... 566