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

Pages: 1 [2] 3 4 ... 35
PackageID is not the same as ElementID.
You have to use Package.Element.ElementID

Of course, that worked a treat. Thanks Geert.

I'm trying to get a jscript to work that creates a diagram for each package and adds child elements and packages to the diagram.  I've managed to get the child elements to be added to the diagram but not the child packages.

I think its because I'm passing a Package ID to Diagram.Object.ElementID

theDiagramObject.ElementID( childElement.ElementID);
//Substituted the above code that works with element with this below
theDiagramObject.ElementID( childPackage.PackageID);

Here is a snippet of code
Code: [Select]
function AddDiagramToPackage(  thePackage )
    // Cast thePackage to EA.Package so we get intellisense
    var currentPackage as EA.Package;
    currentPackage = thePackage;

    var theDiagram as EA.Diagram;

    theDiagram = thePackage.Diagrams.AddNew( thePackage.Name, "Logical" );

    var diagramObjects as EA.Collection;
    diagramObjects = theDiagram.DiagramObjects;
    // iterate through all child elements and add them to the diagram -THIS DOES WORK
    var elementEnumerator = new Enumerator( currentPackage.Elements );
    while ( !elementEnumerator.atEnd() )
        var childElement as EA.Element;
        childElement = elementEnumerator.item();
var theDiagramObject as EA.DiagramObject;
theDiagramObject = diagramObjects.AddNew("","");
theDiagramObject.ElementID( childElement.ElementID );

    // iterate through all child packages and add them to the diagram -THIS DOESN'T WORK
    var childPackageEnumerator = new Enumerator( currentPackage.Packages );
    while ( !childPackageEnumerator.atEnd() )
        var childPackage as EA.Package;
        childPackage = childPackageEnumerator.item();
  var theDiagramObject as EA.DiagramObject;
theDiagramObject = diagramObjects.AddNew("","");
theDiagramObject.ElementID( childPackage.PackageID);


I've scoured the help but can't seem to see how to add packages to a diagram via the automation interface. Any thoughts/help welcome.

General Board / Re: Enterprise Architect - User Tips
« on: January 03, 2018, 08:29:02 am »
Whilst I admire your enthusiasm I think there are two problems with your approach.

General Board / Re: Repository security
« on: November 28, 2017, 01:43:40 pm »
Thanks Simon,
Had a feeling the express version might not have all the features.

General Board / Re: Repository security
« on: November 27, 2017, 01:57:14 pm »
There is actually a feature that uses row level locking on SQL Server and Oracle repositories.

It comes with pro cloud server, but I'm not sure how to use it.

Thats good to know - not using pro cloud server just yet so in a similar boat of knowing little about it. Was hoping to have time to look into it with the recent offer Free: Pro Cloud Server Express but alas other urgent things keep drawing my attention away from it.,38812.0.html

General Board / Re: Repository security
« on: November 25, 2017, 08:34:13 am »
You can create a group and lock the package with a group lock. Then assign users to the group to grant read/write access to that package. There is no mechanism to hide content from users unless you have multiple repositories and prevent users from access a repository.

General Board / Re: IS there a guide to recommended security groups
« on: November 23, 2017, 12:03:31 pm »
I've set mine security up in two dimensions
a) disciplines like business analyst, architect, etc
b) competence. i.e. beginner, intermediate, advanced, admin

where a) allows packages to be locked to certain users like business processes to BAs
and b) restricts what they can do. The beginners are very limited but advanced and admin can do just about everything.

Then allocate one or more for group a) so it restricts what package tree they can edit and one for group b) to restrict what they can do in that package tree.

Follow structure similar to TOGAF/Archimate

-Business Architecture
-Application Architecture
-Data Architecture
-Infrastructure Architecture

Hope that helps.

:) its helpful, thanks @ Sunshine
karma points welcome  ;)

I use the phase field and the filter to include one or more filters. So I might have a number of elements with phase 1.0, 2.0, 3.0 etc then create filters that include phase = '1.0', '2.0', '3.0' and enable one or more filters.
Now there are two patterns I've observed using this
a) Phased approach to implementing some system so that when the last phase is reached everything is included and all the filters enabled.
b) A phased approach to adding some components and retiring others. This requires a slightly different approach where in the phase I include the phases in which the component exists. For example if component A already exists and component B is being add lets say in phase 2 to replace it I might have 3 phases.
Phase 1.0 - component A only
Phase 2.0 - component A and B exist
Phase 3.0 - component B exists and component B has been retired.

Component A phase field = '1.0, 2.0'
Component B phase field = '2.0, 3.0'

I would use a filter that says contains rather than equals a phase value like '3.0'
Hope that helps.

There are also diagram filters that can gray out or hide elements based on selection criteria, but I have no idea if these can be made to be applied during document generation...
Enable the filter then generate the doc

Upon reflection of the suggestions from various people in previous posts I think if I had the problem I'd use fragment template with a custom script to navigate the relationships. I must admit I'd forgotten about fragment templates with scripts in my original suggestion.

Wonderful sharing ideas in the community to get a better outcomes isn't it? Thats what I love about this community - great people sharing their thoughts and ideas.

I've used phase to indicate which phase the requirements should be implemented in. You can then add a filter in the doc gen template to only include requirements, usecases etc for a particular phase. Now the trick is to use the "one of..." option on the element filter so that for phase 2 you include phase 1 as well 2. For example  "1.0,2.0" - can't remember if that is the correction format comma separated values or whether its semi-colons or something else but I think you get the idea.

As far as I know the only way to get that nesting using the built in doc gen is to structure your model that way. So a feature contained a requirement etc. If that's not how your want to structure your model the other options are;

a) To write some specialized SQL query along with some reporting. So if you are using eap files as your repository which is basically MS Access you can try writing MS Access SQL and using those in a MS Access Report. Or similarly if you are using MS SQL you can use SQL Server reporting services.  I'm sure there will be options for the other database supported too.

b) I've once seen someone do is by leveraging the built-in scripting and use jscript to create a rtf file. I think they did come a cropper when there was a cyclic set of relationships in the model and ended up  with infinite loop blowing the thing up.

General Board / Re: What is Sparx and for what purposes it should be used
« on: October 05, 2017, 01:15:58 pm »
Thank you very much for the answer. You mentioned such thing as " For enterprise architecture work I use a customised version of ArchiMate MDG. I have a meta model based on ArchiMate that describes all the elements and relationships along with a catalogue of viewpoints mapped to stakeholders. I based my catalogue of view points on the TOGAF and ArchiMate List."

Could you please show me some screenshots or maybe share the example of your work. It will definitely help me.. I would like to understand and to see how you have organized catalogs and mappings, viewpoints and some example of metamodel.
Sorry pretty much everything I do is for clients is usually confidential so can't share.

However, if you go to all the standards on ArchiMate meta model and view points are there. Similarly for TOGAF. Also Marc Lankhurst the main author of ArchiMate works for bizzdesign and he has a blog with some good stuff on using ArchiMate etc
Another place to check out is as they provide some posters for viewpoints and metamodel.

The extensions I've added to the ArchiMate metamodel are mainly attributes. For example an I've added to application component attributes like Annual Support Cost, Security Classification, etc to help manage the applications.

How I organise the Sparx Model for enterprise architecture is something like this. As Glassboy says its in align TOGAF. I mainly follow ArchiMate as thats the language I use in combo with UML and BPMN. There is some work going on to align the ArchiMate and TOGAF to use same metamodel.

Enterprise Architecture Model
          Application and Data
          Implementation and Migration

Document Generation
          Subject A
                    Model Doc X
                    Model Doc Y
          Subject B
                    Model Doc Z

I keep the doc gen separate from the main model so I can generate the enterprise architecture model as HTML making it available to everyone in the organisation. I keep the diagrams separate from the catalogs of objects to make sharing of the objects easier. The downside when you create new objects on a diagram they are stored in the same package as the diagram and you have to lift and shift them into the catalog package.

Like I said before the learning curve is massive for both Enterprise Architecture Discipline and the Sparx EA tool so you really need to bring in some experts. My colleagues call me an expert but I still sometimes struggle with some aspects from time to time and I've been using Sparx EA for Enterprise Architecture over a decade now.

Pages: 1 [2] 3 4 ... 35