Recent Posts

Pages: 1 ... 6 7 [8] 9 10
71
Automation Interface, Add-Ins and Tools / Re: How to compare objects
« Last post by Geert Bellekens on September 17, 2018, 08:31:20 pm »
The vbscript Is operator returns true if both variables point to the same object instance.

The API does not have some sort of "single object space" concept.
So each time you use Repository.GetPackageByID() you get a different object instance, possibly representing the same package in the model.

So you can either implement your own single object space using Dictionaries or something like that, or just compare the object instances with their unique identifier.
For packages you can use the PackageID or the PackageGUID for that purpose.

If case you are using the PackageID, please not that each object type (=>table in the repository) has it's own ID range. This means you can have a package with ID = 120, but also an element with ID 120 and a connector with ID 120.

If GUID's are unique across object types, except for the packages and the elements that represent that same package. Those always have the same GUID.

So if you were building your own "cache" of all objects you have used you could use a single Dictionary if you use the GUID. If you use the ID then you'll have to create a dictionary for each object type.

Geert
72
Automation Interface, Add-Ins and Tools / Re: How to compare objects
« Last post by bilon on September 17, 2018, 08:18:57 pm »
Try something like this, just replace ELEMENT_1 and ELEMENT_2 by real elements lying in the same package:
Code: [Select]
Sub TestObj
Dim pcg1 As EA.Package
Dim pcg2 As EA.Package
Dim coll
Set coll = Repository.GetElementsByQuery("Simple","ELEMENT_1")
Set pcg1 = Repository.GetPackageByID(coll(0).PackageID)
Set coll = Repository.GetElementsByQuery("Simple","ELEMENT_2")
Set pcg2 = Repository.GetPackageByID(coll(0).PackageID)
session.output "pcg1: " & pcg1.Name & ", " & pcg1.PackageID
session.output "pcg2: " & pcg2.Name & ", " & pcg2.PackageID
If (pcg1 Is pcg2) Then
session.output "Packages match"
Else
    session.output "Packages don't match"
End If
If (pcg1.PackageID = pcg2.PackageID) Then
session.output "IDs match"
Else
    session.output "IDs don't match"
End If
End Sub
73
Ah - so that's what those are for.
Pure genius, as always Q.
Thanks
Ian
74
Bugs and Issues / Re: Bizarre bug in QuickLinker!
« Last post by Paolo F Cantoni on September 17, 2018, 12:52:49 pm »
It's completely new and doesn't generate anything that earlier versions know to look for.

In terms of backwards compatibility, it will override an existing QuickLinker table if one exists. (If you have a metamodel only stereotypes not mentioned in the metamodel will be taken from the QuickLinker table.) So your technology can include both.
Thanks, Simon, for the clarification.

As I now understand what you've said, we can continue to generate the v13 QuickLinker section and overlay it with the V14 QuickLinker and distribute the one MDG until all our users have converted to v14.  Is that correct?  I am assuming that the new QuickLinker is in a new section.

Paolo
75
Hello,

I'm trying to specify some internal IT systems Components as resources for BPMN 2.0 Activities in some business process diagrams. When I try to specify them via the Activity's properties>BPMN 2.0>resources dialog, the Components don't appear in the resulting tree as available selections. As a workaround I've created links to the Components in the process diagrams and specified them as dependencies for the appropriate Activities, but that can make the diagrams pretty messy. If I remove the linked Component from the diagrams, I have to click through the properties->links for all the activities to see the Component resources, which is very cumbersome.

Is there a better way to specify and visually show an Activity's Component resources?

Thanks,
76
Bugs and Issues / Re: Bizarre bug in QuickLinker!
« Last post by Simon M on September 17, 2018, 11:52:40 am »
It's completely new, and doesn't generate anything that earlier versions know to look for.

In terms of backwards compatibility, it will override an existing quicklinker table if one exists. (If you have a metamodel only stereotypes not mentioned in the metamodel will be taken from the quicklink table.) So your technology can include both.
77
Bugs and Issues / Re: Bizarre bug in QuickLinker!
« Last post by Paolo F Cantoni on September 17, 2018, 09:44:34 am »
I'm not astonished that Sparx still sticks to that dinosaur format for the QL. However, I wonder why people don't really insist on something more handy that really seem to use it. Go kick their butt. Or the trainer's to send a "feature" request which requires improving (actually I mean replacing) it.

q.
Q, in fact, they did. In v14 you can now model metamodel constraints to control the quicklinker.
A big improvement over the old quicklinker CSV definition.

I did notice however that the new method is not backwards compatible. No quicklinker in v12.1 when defined via meta model in v14.

Geert
Hi Geert,
As I mentioned elsewhere, we're looking to move to the v14 mechanism once we get some time.  We first have to manually reverse engineer our bespoke, handcrafted, MDG.  However, I am now concerned that we will lose backwards compatibility (we're not anticipating moving the users to v14 soon).  Does the v14 method still create the QuickLinker element (to be placed into the MDG file)?  Is it a formatting or a structural problem?

Paolo
78
General Board / Re: Named default value constraints
« Last post by Simon M on September 17, 2018, 09:18:17 am »
Looks similar to the primary keys and uniqueness constraints etc that are modeled using a separate stereotyped operation.
79
General Board / Re: Create read-only tag in an UML profile
« Last post by Simon M on September 17, 2018, 09:16:18 am »
Predefined Structured Types
Quote
Code: [Select]
Type=Const;
Default=Val;
Used to: Create a read-only constant value.

To include this in a profile, see With Predefined Tag Types.
80
Bugs and Issues / Re: EA repository performance on Oracle db
« Last post by Glassboy on September 17, 2018, 06:55:57 am »
So, although it might be possible to tweak the database for EA, I've never come across a happy EA + Oracle user.
Most of them switch to MySQL or SQL Server at some point and are much happier after the switch.

I did have a file of suggested optimisations for Oracle but I appear to have lost it.  It ended up being easier to switch to MSSQL than to get an Oracle DBA's time to tinker.
Pages: 1 ... 6 7 [8] 9 10