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 - yonatan.lehman

Pages: [1] 2
1
Automation Interface, Add-Ins and Tools / undoing checkout on a branch
« on: September 20, 2022, 04:52:19 am »
I want to do an uncheckout on an entire branch in the same way I can do check out branch and check in branch.

Way back in 2014 this was not available,
https://sparxsystems.com/forums/smf/index.php/topic,25186.msg200688/topicseen.html#msg200688

In EA 14 it's not available via the GUI.

I'm fine to write a script that will walk down a branch and undo each package - but I couldn't find an API to undo checkout even on a single package.
Am I missing something?
Perhaps this is available in EA 16?
Is there a good reason why this is not available?

Cheers
Yonatan



2
General Board / upgrading from EA 14 to EA 16
« on: September 06, 2022, 10:19:42 pm »
Hi
We're about to jump from EA14 + Eapx file  to EA16 + SQL server
1) Are there any issues with mixed usage of E14 and EA16 (some users might stay with EA14 initially)
2) Any tips or warnings about making this double move ? (version and local to server)
Thanks

3
PCS General Board / DBMS recomendations
« on: August 08, 2022, 03:28:16 pm »
Hi
We are considering moving from EA14 with eaxp files over VSN to EA16 with a DBMS server.

Can anyone recommend a preferred DBMS  - or alternatively recommend to continue working with SQLite file repository over VSN  - or perhaps we should be looking at the proCloud solution ?

I'm looking for speed and trouble free operation. We're about 6 people modeling a system which will eventually grow to about 1000 modules (components) and 10000 Activities.

The options provided by Sparx is:
  • Firebird from v2
  • MySQL from v5
  • MariaDB
  • Microsoft SQL Server from 2005, all editions including Express and Azure SQL Database
  • Microsoft Access from 2007
  • Oracle from 9i (all editions)
  • PostgreSQL from v8
Thanks !

4
General Board / shortcuts for connector types EA14
« on: July 20, 2022, 05:29:45 pm »
I spent a lot of time drawing Activity diagrams (in EA 14)

Most of the connectors I draw are
- Control Flow
- Line Style Orthogonal Square

At the moment this takes a lot of clicking - there are 3 ways to choose a Control Flow (depending on what you are connecting) and I have to set the Line Style explicitly on every line.

Is there a way to change the default Line Style, or to define a keyboard shortcut that will set a connector type and Line Style?

The only think I found in the help was "F3 - create another connector of the same type as the last connector you used" - but nothing happened when I used F3.

For the curious this is what I'm doing at the moment:

1) Select Element, Quick Link, Drag
   a) Depending on what is being connected I get a different Dialog so
         i) Select Control Flow, 
         ii) Select Control Flow>Control Flow,
         iii)Curse-escape-select Control Flow from Toolbox
   b) connect the Source to the Target

2) Select Connector > Line Style > Orthogonal Square

I did find "Apply Line Style on Diagram" - but that doesn't really help unless I first draw all the lines on the diagram and then start laying out the connectors.

Thanks

5
Bugs and Issues / ever growing eaxp file
« on: July 11, 2022, 11:59:20 pm »
We use E 14.0 on top of SVP. Each user copies the eaxp file from the repository into a local folder and then works on that.
Recently we have noticed that this file grows very quickly and at some point reaches 2GB and get latest stops working.
Here is a typical scenario
1) eapx file size is 31,891,456  bytes
2) we check a branch out with about 50 elements - the file size changes to 83,652,608 bytes
3) We check the branc back in without change
4) We check out the same branch again - the file size changes to 135,012,352

We are pretty sure that the underlying model did not change between checkouts - it looks like the acrion of checking out seems to increase the eaxp file even though nothing in the model has changed.

Running compaction on the eaxp reduced it back near to where it started -  31,870,976 bytes

Can someone explain what is going on and how we can prevent the eapx file growing?

6
Hi
I can ask the user to select a file using Repository.InvokeFileDialog  or use DLGOpenFile from EAScriptLBi.JScript-Dialog.

How do I open a dialog that allows the user to select (or create) a directory (folder)?
I know almost nothing about VB - so a good example in JS, or can be converted to JS would be great!

Thanks

7
Hi
I'm trying to add an Action defined by our MDG toolbox. But the shape and fill color depends on how I add it to the Diagram.

1) I get the correct shape and fill color when I use the Add to Diagram button from the Find Toolbox item dialog. A rectangle with rounded edges and fill as defined by the Layout>Style>Default Style

2) When I drag it from the Toolbox (after doing Activate Toolbox), (or from the Find Toolbox Item) it comes out with the wrong color and a shape that depends on the Kind that I set as default (using Ctrl Drag)'

The correct-looking Action has no Kind - and I couldn't get the dragged Action to look the same.

I also noticed that the Package of the correct-looking action is the same as the Diagram - but the Package of the dragged action is from a different package (called Activity Template funnily enough - is this a reserved name in EA?)

Keeping the Find Toolbox item open all the time and clicking Add to Diagram and then moving the Action to where I want it is very inconvenient - Does anyone know how I can get the dragged Action to look the same as the Add to Diagram?

Thanks


8
Hi
As far as I know, EA (14) does not have a way to do "get latest" for a tree of packages.
You can either do get all  latest  on the entire project tree or get latest on a single package.
I tried to write a script to do this :

Code: [Select]
var forceImport = true;
function process_package(aPackage) {
var thePackage As EA.Package
thePackage = aPackage;

if (thePackage.IsVersionControlled) {
thePackage.VersionControlGetLatest(forceImport);
thePackage.Update();
}

for (var p = 0; p < thePackage.Packages.Count; p++ ){
pkg = thePackage.Packages.GetAt(p);
process_package(pkg);
}
thePackage.Update();
}

Problems
1) After the call to thePackage.VersionControlGetLatest the package has no sub packages (thePackage.Packages.Count == 0) - even though after the script runs I can see the sub-projects in the project tree, and indeed when I run the script again, this time the script sees the children.

I can run the script multiple times, but this is slow, doing get latest on each package multiple times, - and I can't think of a simple way of knowing if I've already done get latest on a package and I've reached the bottom level packages of the tree.

Any solutions?


9
Hi
I need to move a diagram and all of its diagram objects from a source to a destination
The source and the destination can be a Package or an Element (e.g. an Activity)
I manage to move all the diagram objects by changing the ParentID (to an Element) or the Package (by setting PackageID)


But I can't move the actual Diagram - setting the ParentID and/or PackageID makes no difference
It doesn't move. If I move it using the UI then the  ParentID and/or PackageID update as expected.

Do I have to create a new Diagram on the destination and copy all the fields from the source diagram or is there an easier way to do it?

I'm working in JScript EA14
Thanks

10
Hi
I'm trying to select a Package from the project tree using

Code: [Select]
var includedTypes_str = "Package";
id = Repository.InvokeConstructPicker(includedTypes_str);

Even though I selected a package - InvokeConstructPicker is returning an Element
I know this because
Code: [Select]
element = Repository.GetElementByID(elementID); works and
Code: [Select]
package = Repository.GetPackageByID(element.PackageID); fails
The returned element has Type 4 (element)
 - but the name is the name of the package I selected
 - the PackageID  returns the package that encloses the selected package

I suspect I'm getting the Element associated with the Package and not the Element - how can I either get the Package directly or obtain the associated Package object from element?


11
I am writing a Jscript (EA14) to set the stereotype of Activities.
The stereotype is called interface and its defined by the fully qualified MyCompany::interface
My problem is that in the component diagram I only want to see <interface> (without the qualifier) but I've tried various combination of assigning a value to activity.StereotypeEx, activity.Stereotype and both of them.  I tried assigning Stereotype before and after StereotypeEx and of course I always did activity.Update() and Refesh() at then end

1) If I assign only activity.StereotypeEx - then I get <MyCompany:interface>
2) If I assign only activity.Stereotype - then I get <interface> - but not the one I want (it's using some other default)
3) If I assign both activity.StereotypeEx and activity.Stereotype then I get both names <inteface,MyCompany::interface>)

I do the same thing with a sterotype called <internal> - this works as expected and shows only the simple name, I guess because it does not clash with anything else.

I tried to use Start>Perspective>Customize List of Available Perspectives> to disable almost everything else apart from bare UML and MyCompany - but that didn't help.

What do I need to do - either in the Script - or in the UI so that the diagram will only show the simple stereotype name and that it will behave as defined by the fully qualified stereotype name ?

Thanks

12
Hi
I need to check in JavaScript (EA V14.0) if an element (e.g. Activity, Component) is used in any diagram.
i.e. the same as doing Find in all Diagrams (^U) in the project  browser
The best I can find at the moment is:

1) get all the model diagrams
diagramList = Repository.GetReferenceList("Diagram")
(I assume this is the same as walking down the entire project tree looking for diagrams - but much faster)

2) nested on all diagram objects, and on all DiagramObjects in each diagram

3) Check if the DiagramObjects refers to the required element
   Here is where I'm stuck.... How do I find the ID of the element being referred to by the diagram object?
   In the UI Diagram Properties, I can see that it in the Behavior Tab, Behavior Field, as a long string of type Package::SubPackage::ElementName
    a) How do I convert that string to the ElementID or how do I get the path to the ElementID to compare them?
    c) What is the Behavior Field and how do I access it ?- it is not mentioned anywhere in the API reference


Thanks
Yonatan







13
I'm trying to add a package to version control in JScript  that is is equivalent to doing it manually:



pkg.VersionControlAdd("OM_SW_ONE","","",true);

The outcome is no exception, and the package is not in version control (no version control icon in the project tree and error if I try to check it in/out)

I pass the 2nd parameter as an empty string as the 2nd because I don't want "Export as Model Branch" - I also tried passing undefined and null - undefined gave me a type error and null didn't work, just as the  empty string.
If I pass a string as a 2nd Parameter it works - but I don't want an EAB file or the bother of making it unique.

Solutions ?
Thanks


14
Hi
I model out C code using mostly activity diagrams, component diagrams, and sequence diagrams.
I would like to generate output (raw text if possible) showing the modeled relationships such as:

X calls/uses Y
Where X and Y are activities and their enclosing packages  (or some other entity)

Is there any way I can do using EA (V14 at the moment) ?
Should I be using some other types of EA entities to model C modules/functions/data in order to be able to generate such cross-reference information?

Ideally, I would like to compare this to the output generated by cxref so that I could compare the modeled interconnection information to the interconnection information from the C code.

Maybe I'm missing something  - how do people manage to keep the EA-based documentation up to date with the code (assuming we're not using generated code).

Thanks
Yonatan


15
General Board / Activities in diagrams as hyperlinks
« on: February 20, 2022, 11:13:33 pm »
As part of our workflow we create Activities that model component operations and insert the activities into Activity diagrams and Component diagrams.
We want the activities to act as hyperlinks so that when they are clicked , the diagram associated with that activity will open.

This works if we create an activity by right clicking on a component and doing Add>Activity>With Activity diagram.

But it only works with the diagram created when the activity was created. Our problem is that all out activities have already been created (automatically from the code) - only later in the workflow do we draw the details of each particular activity.

If we add an diagram underneath an activity, by dragging it there, of even by doing Add>Diagram on the activity,  when the activity in a diagram is clicked is does NOT open the diagram, but rather opens the Elements Property window instead.

So the question is
What do we need to do to get an activity in a diagram to act as a hyperlink so that double clicking it will open a diagram that was at some point associated with that activity ?

We are using EA 14.0
Thanks




Pages: [1] 2