Author Topic: Manage Baselines / Version Control  (Read 10392 times)

Gary

  • EA User
  • **
  • Posts: 84
  • Karma: +1/-0
    • View Profile
Re: Manage Baselines / Version Control
« Reply #15 on: January 24, 2013, 10:15:06 pm »
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 ;)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Manage Baselines / Version Control
« Reply #16 on: January 25, 2013, 12:30:01 am »
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.

Stoppy

  • EA User
  • **
  • Posts: 115
  • Karma: +0/-0
    • View Profile
Re: Manage Baselines / Version Control
« Reply #17 on: January 29, 2013, 04:29:05 pm »
Quote
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

Quote
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

Quote
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
Skills: Business Process | Business Analysts | Product Configuration Manager | Business Intelligence