Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: Stoppy on January 16, 2013, 04:51:36 pm
-
Hi All,
In a previous organisation i lead the implementation of EA and TFS integration successfully. Since then I have moved on to a smaller organisation and I am back evaluating the version control feature in EA.
We are a small shop of 2/3 modellers and I have stumbled accross the Manage Baseline feature which offers a manual way to version control items in EA.
I am just wondering if anyone has used this feature and can think of any pros/cons I should consider if we embark down this road.
I have played with it today have so far found:
Pros
- Provides manual incremental version numbering
- Provides the ability to comment on version
- Provides the date of the version
- Provides the ability to roll back and forward my incremental changes
- Provides a show differences (Yet to get my head around this :-/)
- Is Free ::)
Cons
- Can only be used on Packages (meaning all my processes need to have a package level to get granular version control per diagram)
Thanks in advance,
Stoppy ;)
-
Manage Baselines also:
- is completely internal to EA, so doesn't require to manage another piece of software
- cannot be used in in a distributed environment
- doesn't enforce explicit checkouts and exclusive edits
I would be inclined to promote a real version control rather then manage baselines as I'm afraid the manual part of the process will too easily be forgotten (so nobody bothers anymore to take baselines and there is effectively no version control anymore)
Geert
-
The organisations I have worked in have been using basic EAP repositories or have not been willing to buy another tool so I have been using the manage baselines a fair bit.
It does, as Geert implies, require a discipline to create the baselines and in where to create them as you have to know what package they are created in as there is no way of finding them otherwise (unless maybe you do some sort of underthe covers SQL search).
As I have been using EA for business requirements and process modelling and we have to generate documents we have a protocol of creating a baseline each time a document is generated and that works well.
If you can get that discipline in place I find the baseline comparison tool a better way of seeing what has been changed when rather than using the audit facility.
-
A compromise is to create baselines, export them to files and then place these baseline files under source control. Still have to remember to create them though :)
-
What we did was to write a script to export the repository as XMI (plus reference data) and check in that into VC on a nightly basis.
q.
-
Hi Geert, Robert, Gary and Qwerty,
Thanks very much for your input and aggree the benefits of Version Control out weigh the Manage Baseline.
But given the cost/time/resources to implement this and cost is the topic in this current climate, I will have to recommend the Manage Baseline option and highlight the risk if the users do not follow the intended procedure.
I wonder if sparx has considered providing a feature to enable accross the application to prompt a user when they close a diagram or save changes to force a baseline?
Stoppy :D
-
I wonder if sparx has considered providing a feature to enable accross the application to prompt a user when they close a diagram or save changes to force a baseline?
Actually they did. You can create an Addin and implement the EA_FileClose method. This is passed an EA.Repository object representing the Enterprise Architect model about to be closed. You could then call the CreateBaseline method, an operation of the Project class, on each top level package to create a baseline.
G
-
Thanks for the suggestion Gary, this sounds very practical and low overhead, should I go forward on this, I would only need to restructure the architecture slightly.
Do you know of any reference documents I can leverage from for this exact type of function?
Is it simple for a non techie to create a Addin of EA?
Stoppy :)
-
Is it simple for a non techie to create a Addin of EA?
Stoppy :)
Tutorial: Create your first C# Enterprise Architect addin in 10 minutes (http://geertbellekens.wordpress.com/2011/01/29/tutorial-create-your-first-c-enterprise-architect-addin-in-10-minutes/)
Geert
-
All of the information on the methods is in the EA user guide in the section on automation. If you take Geert's suggestion and use the tutorial, that will get you started. Some people have an issue with registering the dll, especially if they do not have admin rights, but there are plenty of articles in this forum on how to get round this.
Gary
-
Thanks for the link Geert and tips Gary.
It looks fairly simple to Build and deploy the addin based on Geerts tutorial.
My limited ability is to write and understand the code I am writing will be my issue.
So before I try and attempt, would it be possible to build an addin which performs in the following manner:
1. User selects exit diagram
2. User recieves prompt "Do you want to create a baseline for package/diagram?"
a) User selects No - Diagram is saved and closed (Process Terminated)
b) User selects Yes - Baseline dialogue box is presented
3. User Selects New Baseline
4. User Enters Baseline Details and selects OK
5. Baseline is created
6. Diagram is saved and closed (Process Terminated)
Please note I use this ea as a business user not a developer, hence the process perspective.
Stoppy :D
-
That is entirely possible yes, and it is also entirely possible that would be the most annoying add-in ever ;D
I would hate to have some an annoying message box popup everytime I try to close a diagram. As a result I would just never close any diagrams, just leave them open until I close EA (if I ever close it).
Even without an annoying add-in I tend to leave all my diagrams open, and I never close EA unless I have to restart, or EA has crashed, or...
If I were you I would either
- Setup version control (no custom development needed)
- Schedule a nightly baseline as suggested by qwerty
- Use plain old backups. You can always restore a backup, export a package to xmi, and do a compare between your model and the xmi file, if you ever need to do a compare.
Geert
-
I agree with Geert that it would become annoying quite quickly to be prompted at every diagram close, resulting in users leaving the diagrams open just to avoid the dialog. This is obviously not what you want.
I would go with creating a backup on EA exit with no user intervention. If your users do not have to do anything different to their normal workflow then they will not be resistant to the change and then will not actively try to avoid it. In fact they should not even notice that it is happening until of course they lose their work and you restore it for them.
-
G'day Geert and Gary,
Thanks again for your replies.
Yeah I read my post on the train on the way home and thought this could be a bit annoying, what was I thinking ;D.
Don't get me wrong, I am all for the other option and the benefits we gained integrating EA and TFS, Project and Sharepoint were great at my last organisation.
But given the size of where I am now, I really am looking for a cost effective and instant solution due to limited technical resources.
Thanks for your input and guidance.
Stoppy :)
-
Dear Stoppy,
if you are working with limited ressources in environment and budget, I assume your number of developers is also limited.
With limited people it is possbile to describe them the process about creating the included baselines. (And talk to the EDV to make a nightly server backup ;) )
Enable the Auditing feature might also give you many informations about changes.
I'm consulting a few companies with EA - one of them has 40 developers permanently on the model and the baseline-feature has always been sufficient for this usage.
Regards
Stefan
-
In the interest of completing this discussion, and just in case someone comes along later and wants to implement a solution, I spent 20 minutes trying out the code to create a baseline. I played with two different ways of creating the baseline:
1) create a baseline for each package that sits just under the model package.
2) create a baseline for the package containing a diagram when it is closed. NOTE: this is everytime it is closed whether any change is made or not.
I have included the functions below.
public void EA_FileClose(EA.Repository Repository)
{
//get a colection of models in the repository
foreach (EA.IDualPackage p in Repository.Models)
{
//get a collection of next layer package in the model
// and create abaseline for each of them using the current date and time as a version
EA.IDualCollection c = p.Packages;
foreach (EA.IDualPackage Kid in c)
{
Repository.GetProjectInterface().CreateBaseline(Kid.PackageGUID, DateTime.Now.ToString(), "");
}
}
return;
}
public void EA_OnPostCloseDiagram(EA.Repository Repository, int DiagramID)
{
//get a diagram object identified by the ID
EA.IDualDiagram diag = Repository.GetDiagramByID(DiagramID);
//get the parent package object that contains the diagram
EA.IDualPackage p = Repository.GetPackageByID(diag.PackageID);
//create a baseline for the package containing the diagram just closed using current date and time as a version
Repository.GetProjectInterface().CreateBaseline(p.PackageGUID, DateTime.Now.ToString(), "");
return;
}
Enjoy
Gary ;)
-
FWIW: creating a baseline means the creation of a whole XMI dump stored in the DB. If you have EAP files note that they are "not optimized" for large data volumes. In case of a server site repository you will notice a remarkable slow down when closing EA. Further your reference data are not in synch with the baseline because they are not part of it.
q.
-
if you are working with limited ressources in environment and budget, I assume your number of developers is also limited.
Thanks for your input stefan, Yeah I have nothing available in developers. If you have 40 developers using a manual process, that's pretty good. I could imagine the solutions and suggestions to automate...... ;D
In the interest of completing this discussion
Thanks Gary, appreciate the follow up, if only I could read and understand the matrix aka "The Code" ;D
creating a baseline means the creation of a whole XMI dump stored in the DB
Thanks qwerty, I orginally wondered where this XMI file was going as there is a little dialogue box which pops up and has a temp path.
Regards,
Stoppy :D